Repository navigation
Conversation
|
Thanks for the regression cases. Review finding: this PR only changes The current helper only removes the exact |
dotCipher
left a comment
There was a problem hiding this comment.
This remains test-only: the expected max-steps conversion is not implemented in src/index.ts, so the new assertions fail and the reported Anthropic request failure is not fixed. Please add the implementation and run CI before re-requesting review.
Fixes Anthropic request failures when opencode appends its max-steps instruction as an assistant prefill.
When an opencode agent reaches its configured
stepslimit, opencode appends a final assistant-role message beginning with:CRITICAL - MAXIMUM STEPS REACHEDAnthropic rejects that shape for some Claude models with:
This model does not support assistant message prefill. The conversation must end with a user message.The bridge already strips the older synthetic
Continue with your tasks.assistant prefill. This change extends that handling for opencode's max-steps prefill by converting it into a final user message instead of dropping it. That keeps the intended "tools are disabled, summarize text-only" instruction while satisfying Anthropic's requirement that the conversation ends with a user message.