GeezerVison is showing github.com — AI_APICallError: messages.157: all messages must have non-empty content except for the optional final assistant message · Issue #2655 · anomalyco/opencode
AI_APICallError: messages.157: all messages must have non-empty content except for the optional final assistant message #2655DescriptionThis is with anthropic claude opus 4.1, opencode 0.9.11, nushell on macos. Activitygithub-actions commented on Sep 17, 2025 This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case. rekram1-node commented on Sep 17, 2025 I just fixed this: #2651
Assuming you had a message you aborted in the session?
U may be able to get around this by doing a /undo and then continuing
Either way: in next release this should be fixed! esafak commented on Sep 17, 2025 ContributorAuthor More actions Aborting often results in such errors, yes. Does undo delete the last entry? rekram1-node commented on Sep 17, 2025 Yeah it will rewind to your last message so the most recent loop + last message you sent are all "deleted" (you can hit /redo too) and the prompt box will be populated with the last msg you sent rekram1-node commented on Sep 18, 2025 closing since commit to fix has been merged, will be in next release arshbot commented on Dec 27, 2025 Running into this issue again, /undo doesn't seem to get past it. Occurred after linking anthropic mid chat. chat window froze and window had to be closed. andymac4182 commented on Jan 4, 2026 I am still getting this. It appears to have happened again. rekram1-node commented on Jan 4, 2026 arshbot commented on Jan 4, 2026 Can reproduce by starting a session with glm, and later switching to any anthropic model. rekram1-node commented on Jan 4, 2026 madeleineostoja commented on Feb 4, 2026 Also still seeing this error, exclusively when interrupting an agent while thinking kiennq commented on Feb 7, 2026 I got this issue with Copilot Claude model, we should expand the check for trimming to all anthropic models, regardless of ai-sdk.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|