[BUG] Persistent API Error After Teleporting Session
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
After using claude --teleport session_011CUpE6ZSg5RQbETyMDpZha, every subsequent command results in a 400 API error about malformed tool_result blocks.
What Should Happen?
Teleporting should transfer the session cleanly without corrupting conversation state.
Actual Behavior: Session state corruption that persists even after reinstalling Claude Code.
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.48.content.0: unexpected tool_use_id found in tool_result blocks: toolu_01XmC5ysqAiDPKb5kABUiSCi. Each tool_result block must have a corresponding tool_use block in the previous message."}}
Steps to Reproduce
- Start a Claude Code session
- Used
claude --teleport session_011CUpE6ZSg5RQbETyMDpZha - Attempted to run any command
- Received 400 error on every message
Troubleshooting Attempted:
- ✅ Exited and restarted Claude Code
- ✅ Killed all Claude processes
- ✅ Uninstalled and reinstalled Claude Code
- ✅ Tried in different directories
- ❌ Error persists
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.33 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/11017
- https://github.com/anthropics/claude-code/issues/11026
- https://github.com/anthropics/claude-code/issues/8484
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
I am facing the same issue.
Claude Code Version
2.0.34 (Claude Code)
Operating System
macOS
Terminal/Shell
ghostty
Error
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.50.content.0: unexpected
`tool_use_id` found in `tool_result` blocks: toolu_019LH462QgZAC98M7ibbQJ8H. Each `tool_result` block must have a corresponding
`tool_use` block in the previous message."},"request_id":"req_011CUr7Tku1wHmUS2JcBrcup"}
Same issue
Same issue, also on MacOS using Ghostty
Session was teleported from a Claude Code Web session
Hello, can someone look into this please? I have the same issue every time continuing session by using teleport from Claude Code web. Thanks
This issue is still present on v2.0.37.
I have never once gotten teleport to work. Every time I get the API 400 error.
This issue still persists on v2.0.53.
This issue still persists on v2.0.55.
This issue still persists on v2.0.69
This issue still persists on v2.0.72
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.24.content.3: unexpected `tool_use_id` found in `tool_result` blocks: toolu_01LLjDFcWxGyYvTh5PchmaNu. Each `tool_result` block must have a corresponding `tool_use` block in the previous message."},"request_id":"req_011CWJ2roFn4MhGgseytCTx2"}
My current workaround is to /export the conversation to clipboard, then paste it in a new session.