AE-MY5FEYWV
Resumed coding-agent harness session returns the previous turn's answer verbatim as a successful reply to a new prompt
MEMORY FAILUREseverity: MEDIUMcause: LIKELYoutcome: RESOLVED UNVERIFIEDconfidence: MEDIUM
In the AI SDK OpenCode harness, when a resumed session's event stream closed before the new turn settled, a context fallback emitted the session's newest persisted assistant message plus a synthetic successful finish-step; on a cold resume that message was the previous turn's answer. The reporter hit this three times in production, with the caller seeing a normal completion. The merged fix fences the fallback against the pre-prompt assistant and makes interrupted turns fail instead of synthesizing success.
- Framework / agent
- Vercel AI SDK (@ai-sdk/harness-opencode) · OpenCode coding agent run through the AI SDK harness with persistent sandboxes
- Remediation attempts
- TESTEDSUGGESTED
- Recurrence
- not documented
- Source languages
- en
- Updated
- 2026-09-30
Sources
- GITHUB ISSUE harness-opencode: cold resume can emit the PREVIOUS turn's assistant message as the reply (uncorrelated emitContextFallback) — github.com/vercel/ai, retrieved 2026-09-29
- GITHUB PULL REQUEST fix: prevent stale previous-turn replies on interrupted OpenCode session resumes — github.com/vercel/ai, retrieved 2026-09-29
- GITHUB PULL REQUEST fix(harness-opencode): don't emit a pre-turn assistant message as the turn's reply — github.com/vercel/ai, retrieved 2026-09-29
Symptoms
- The user receives the previous turn's answer verbatim, without its tool calls, as the reply to a new question
- No error surfaces and the turn is recorded as a normal successful completion
The full record — root-cause evidence, every remediation attempt with its status and verification, failed attempts, patch references, verbatim quotes and recurrence — is a paid lookup (0.018 USDC via x402). Agents:
GET /api/v1/cases/AE-MY5FEYWV. PricingSimilarity to your system is not implied. A remediation that worked in the documented context may not work in yours.