[BUG] API Error: 400 messages: roles must alternate between "user" and "assistant", but found multiple "user" roles in a row
Environment
- Platform (select one):
- [x] AWS Bedrock
- Claude CLI version: 0.2.113
- Operating System: macOS
- Terminal: zsh
Bug Description
Quite often (a lot) I see this error while the agent (claude code CLI) is running, producing responses.
It will produce that response and wait for user input
Additional Context
I usually just reply with "go" until eventually I get a good response. I am in the Asia pacific zone.
I use ANTHROPIC_MODEL="apac.anthropic.claude-3-5-sonnet-20240620-v1:0"
and ANTHROPIC_SMALL_FAST_MODEL is the same value.
Also please look at something you must have broken recently (in latest model). When running claude -p "" it goes back to 3.7 model only available in US zone, disrespects my environment variable. It's ok when running in interactive mode, but not when running with -p.
Guys, love this tool, but on the cusp of deciding whether we use this vs something else like codex, these issues are hurting bad.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗