You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See this error a fair amount (once a day?) since the last few versions. I use Codex GPT-5.4 either medium or xhigh. I feel it happens more on medium, but could be mistaken.
I’m seeing what looks like a more specific variant of this bug on 1.3.17, and it may be related to #19405.
In my case the failure is not just a generic: Error message: JSON Parse error: Unterminated string
The leaked payload includes a raw Responses API event frame like:
{"type":"response.created","response":{"id":"resp_...","instructions":"..."}}
and the instructions field contains the full assembled OpenCode prompt, including:- system/developer instructions- AGENTS / repo guidance- skill listings- project-specific contextIt also appears to get contaminated by synthetic internal text, for example:- <system-reminder> ... Plan Mode ...- [MEMORY TRIGGER DETECTED]That makes this look like a boundary-corruption issue where:1. a streaming/event payload is being treated as final JSON,2. synthetic reminder/middleware text is getting merged into the same parse stream,3. the parser then dies with Unterminated string.So this may overlap with both:- this issue (#20786) for the unterminated JSON parsing failure- #19405 for synthetic reminder leakage into model-visible contentThe notable extra symptom here is that response.created.instructions is dumped raw, so the failure can expose a huge amount of prompt/context text instead of only failing quietly.This might be worth handling as:- do not parse response.created as final structured output- keep synthetic reminder/memory-trigger text out of the provider transport stream- redact/suppress instructions in error logging
Activity
github-actions commentedon Apr 3, 2026
This issue might be a duplicate of existing issues. Please check:
Error message: JSON Parse error: Unterminated stringerrors #10755: SameJSON Parse error: Unterminated stringerror with Codex models, same workaround (saying "continue" works)If your issue is different, please add more details to distinguish it from these existing reports.
zeug-zz commentedon Apr 7, 2026
I’m seeing what looks like a more specific variant of this bug on
1.3.17, and it may be related to#19405.In my case the failure is not just a generic:
Error message: JSON Parse error: Unterminated stringThe leaked payload includes a raw Responses API event frame like:
{"type":"response.created","response":{"id":"resp_...","instructions":"..."}} and the instructions field contains the full assembled OpenCode prompt, including: - system/developer instructions - AGENTS / repo guidance - skill listings - project-specific context It also appears to get contaminated by synthetic internal text, for example: - <system-reminder> ... Plan Mode ... - [MEMORY TRIGGER DETECTED] That makes this look like a boundary-corruption issue where: 1. a streaming/event payload is being treated as final JSON, 2. synthetic reminder/middleware text is getting merged into the same parse stream, 3. the parser then dies with Unterminated string. So this may overlap with both: - this issue (#20786) for the unterminated JSON parsing failure - #19405 for synthetic reminder leakage into model-visible content The notable extra symptom here is that response.created.instructions is dumped raw, so the failure can expose a huge amount of prompt/context text instead of only failing quietly. This might be worth handling as: - do not parse response.created as final structured output - keep synthetic reminder/memory-trigger text out of the provider transport stream - redact/suppress instructions in error loggingfix(session): use jsonrepair lib for truncated tool call JSON
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.