OpenCode bug: mid-session system notice wedges Responses-API sessions with permanent 400 errors
thystips · ghdev · 2026-10-14
The Bug
OpenCode V2 (v2.0.28/2.0.29) injects a system notice into session history when instructions or tool sources change mid-session. When it lands right after an assistant message ending with a tool output, OpenAI-compatible Responses endpoints reject the request with a 400:
> "A tool output cannot be combined with new developer or system context."
Impact
- The notice persists in history, so every later turn replays the invalid sequence — the session becomes permanently unusable; retry, resume, /compact, and model switching all fail identically.
- Reproduces with no user action (server restart or auto-update triggers it).
Reproduction
- Confirmed on OpenRouter's /api/v1/responses (deepseek models) and an internal Responses gateway (Kimi models)
- Comes from core modules (core/instructions, core/mcp-guidance, etc.), not plugins — disabling local plugins has no effect
More from coding & agent
- OpenJet claims Qwen3.8-27B coding runs 1.9x faster than llama.cpp on one RTX 3090 — JeremyCMorgan · 2026-10-23
- Building an autonomous SEO agent in Hermes with three skills: programmatic pages, Keywords Everywhere, DataForSEO — EXM7777 · 2026-10-23
- Building a sports betting AI agent with onchain execution and human approval by default: architecture and lessons — Dry-Comfortable-2678 · 2026-10-23
- Capy 0.5.0 lets Claude Pro/Max subscribers reuse their plan quota, adds OIDC cloud access — garrytan · 2026-10-23
- You.com CEO Richard Socher: legacy code is human slop, let AI clean it up — RichardSocher · 2026-10-23
- Let agents design a single-line glance component so you can track them from the sidebar — blixt · 2026-10-23