400 diagnostics.previous_message_id error after usage-limit resume
Open 💬 0 comments Opened Jun 15, 2026 by joineskale
Summary
After a Claude Code session hits the 5-hour usage limit and resumes, every subsequent turn fails with:
API Error: 400 diagnostics.previous_message_id: must be the `id` from a prior /v1/messages response (starts with `msg_`)
The session is stuck until restarted.
Reproduction
- Active Claude Code session hits the usage limit and pauses ("sautéed").
- Limit resets, session resumes.
- Send any user message after resume.
- API returns 400 on
diagnostics.previous_message_id. - Every subsequent turn fails identically until the session is restarted.
Expected behaviour
On the first post-resume turn, Claude Code should either:
- Replay a valid
msg_…ID from before the pause, or - Omit
diagnostics.previous_message_identirely so the API doesn't reject the request.
Workaround
Exit the Claude Code session and start a new one. /clear may also work but I haven't fully verified.
Environment
- OS: macOS (Darwin 25.5.0)
- Model: claude-opus-4-7
- Channel: terminal CLI
Happy to provide session IDs or transcript snippets if useful.