Chet loses follow-up prompts and stays Working with OpenCode v2
Environment
- Windows, CCCC v0.4.56, OpenCode v2 runtime
- Global Chet assistant using OpenCode Go (DeepSeek)
What happens
Chet initially works, then stays in Working and no longer returns replies in the CCCC history. In the affected main instance, several replies were complete in OpenCode's own session store (finish=stop, final execution outcome succeeded) in the same session Chet was bound to. The corresponding Chet result entries were missing, and CCCC still showed a queued input. Worker messages addressed to svc:chet reached Chet's history as group_input, but downstream handling stalled. The operator reports that Save and restart in CCCC restores service.
Reproduction in an isolated CCCC instance
- Verify a normal Chet prompt completes.
- In Chet's embedded OpenCode terminal, use
/newand send a harmless unique marker. OpenCode answers in the new session, but the Chet history has no matching result. CCCC is still bound to the old session. A single subsequent Chet prompt can still complete in the old session. - With the terminal still on the new session, submit three Chet prompts in rapid succession, each asking for its own unique marker. The first completed in the bound session. The other two were answered in the new OpenCode session and produced no Chet result.
- Separately, after restarting the isolated instance, three rapid Chet prompts again failed to produce three correlated results: one input was absent from OpenCode's session store, and only one of the two persisted Chet results contained its expected marker. A new session initiated via CCCC's own reset flow did work for a single prompt.
Expected
Every accepted input should be delivered to the OpenCode session owned by Chet and yield a correlated result or an explicit delivery error. Completion should clear the busy state so queued user and worker messages can proceed.
Investigation
The busy-input path can fall back to VoiceDelegationAdmission::NativeInput and inject text in the visible terminal. That explains the wrong-session reproduction when the terminal has switched chats. The main-instance hang also occurs with completed replies in the correctly bound session, so session switching alone does not explain all observations. That case may require tracing the OpenCode v2 lifecycle stream through Chet result persistence.
Thanks for the detailed reproduction. We confirmed a CCCC routing bug: while OpenCode-backed Chet was busy, a later input could fall back to typing into the visible terminal. After /new, that terminal could be showing a different chat from Chet's bound session. An unconfirmed input could then block subsequent Group inputs.
The routing fix shipped in CCCC 0.4.57. Chet text, Group inputs and result notifications now use the existing FIFO and the bound session's HTTP prompt queue, keeping their own turn and result correlation. Later text waits for the current turn instead of being typed into the terminal. The native terminal stays available. Realtime Voice handoffs keep their native terminal path, so after /new a voice handoff can still reach the chat shown in the terminal. Other runtimes keep their existing behavior. Ordinary OpenCode Actor delivery already used its bound HTTP session.
Offline regression fixtures cover three Chet inputs across pending admission and an active turn, a terminal switched to another chat, separate persisted Chet results, and queued work after completion. They also check that unresolved HTTP admission is not replayed. These routing regressions use Linux fixtures; we have not reproduced your Windows/OpenCode Go/DeepSeek setup.
The main-instance case where the bound session already finished but Chet has no result remains unexplained. Could you share the exact OpenCode version, a short timestamp range, the affected Chet input/receipt IDs, and the matching bound session and inbox/assistant IDs? CCCC warnings about lost lifecycle events or failed Chet history writes, plus the history_write_failed status, would help locate where the chain stopped. Please redact credentials and prompt contents; a full conversation or provider database is not needed.
wow im learning this for the first time
Hi ChesterRa,
Thank you for your detailed response and for addressing the Chet routing issue in CCCC 0.4.57.
We performed an additional read-only investigation using the original Chet history and OpenCode SQLite database. Here are the verified findings.
Environment
- OS: Windows
- CCCC: 0.4.56 (affected version)
- OpenCode: 2.3.0
- Runtime: OpenCode v2
- Model:
opencode-go/deepseek-v4.1-flash
1. Confirmed wrong-session routing
On November 15, 2026, at approximately 14:49:37 UTC, three Chet inputs were submitted almost simultaneously.
- Input A reached the session bound to Chet and produced a corresponding Chet receipt and result.
- Inputs B and C were delivered to a different OpenCode session.
- Exact text comparison against the OpenCode database confirmed both messages in that other session.
- Both completed in OpenCode with
finish=stop, followed byidle_outcome=succeeded. - Neither input B nor input C has a corresponding receipt or result in Chet's history.
Relevant completion times (UTC):
- Input B: assistant completion at 14:49:39; session completed at 14:49:46.
- Input C: assistant completion at 14:49:43; session completed at 14:49:46.
This provides independent database-level evidence of the routing problem you identified.
2. Additional queued-input anomaly
At approximately 14:53:14 UTC, another group of three Chet inputs was recorded.
- Two inputs received receipts and completed results.
- One input received neither a receipt nor a result.
- No exact matching OpenCode user message was found for that missing input.
- The two successfully processed inputs were associated with the same OpenCode turn ID in their Chet receipts, despite corresponding to separate OpenCode user messages.
This may be relevant to admission, queueing, or turn correlation.
3. Unresolved issue in the main Chet instance
Additional missing Chet results were recorded on November 15, around:
- 14:15:55 UTC
- 14:17:54 UTC
- 14:21:09 UTC
For these inputs, the Chet history contains neither receipts nor results.
The OpenCode database contains temporally corresponding user messages and successfully completed assistant activity in the bound session. However, exact input-to-message correlation has not been established, so we cannot yet conclude that these particular completions correspond to the missing Chet results.
We consider this issue unresolved.
4. Logs and identifiers
We inspected the available CCCC daemon diagnostics, Chet histories, OpenCode logs, and relevant event records.
- No occurrences of
history_write_failedorlost lifecyclewere found in the inspected logs. - Historical inbox IDs could not be reliably reconstructed.
- Exact Chet input IDs, receipt IDs where present, bound and alternate session IDs, and corresponding OpenCode message/assistant IDs have been preserved locally.
We have intentionally omitted internal identifiers and machine-specific details from this public issue. We can provide the relevant identifiers privately if you have an appropriate secure channel.
5. Next steps
We have not yet independently verified the 0.4.57 fix in this Windows/OpenCode configuration.
For the remaining unresolved issue, could you recommend which diagnostic events or logging options should be captured to distinguish:
- Lost OpenCode lifecycle notifications
- Chet result-persistence failures
- Input admission or turn-correlation failures
We would like to capture the necessary evidence during the next occurrence without exposing credentials, prompt contents, or private environment details.
Is there anything else you need from us to investigate this, or a particular sanitized diagnostic format that would be most useful?
Thank you again for your work on this issue.
Thanks for the careful read-only investigation, and for keeping prompts and identifiers out of the public thread.
Inputs B and C in another session. This is the routing problem fixed in 0.4.57. On 0.4.56, while OpenCode-backed Chet was busy, a later input could be typed into Chet's visible OpenCode terminal, and after /new that terminal could be showing a different chat. Your database comparison confirms that path independently.
Two receipts with one turn ID, and one input with neither receipt nor result. These may come from the same 0.4.56 path, but we have not confirmed that. Since 0.4.57, every text input to OpenCode-backed Chet except a Realtime Voice handoff waits in CCCC's queue and is sent to the bound session's HTTP prompt queue only when no turn is running. The turn ID in its receipt is the OpenCode message ID returned for that input, so two inputs should no longer share one. If you see a shared turn ID on 0.4.57 or later, please let us know.
Missing results in the main instance. This is still unexplained. Following one missing result through each step would show where it is lost. If it happens again on 0.4.58, please collect the following for one missing result:
- The UTC time and the Chet input ID.
- The records for that input in
CCCC_HOME/state/chet/history.jsonl, with only these fields:kindandcreated_at; for a receipt,input_id,receipt.generationandreceipt.turn_id; for a result,input_ids,outcome.generation,outcome.turn_idandoutcome.status; for a not-started record,input_idandreason. Please leave out the input text andoutcome.text. - If a receipt exists: in the OpenCode database, the message whose ID equals the receipt's
turn_id, which session it belongs to (Chet's bound session or another one), and the assistant reply'sfinishvalue and completion time. If there is no receipt, only OpenCode records that you can match to this input one to one. - The
history_write_failedvalue shown when you open/api/v1/chet/statuson your CCCC Web address, in the browser you use for the Web UI. It becomes true when the running Web may be missing Chet history: a failed history write, lost lifecycle events, or an unavailable history queue. It does not say which. Skip this if the address does not open for you. - CCCC log lines from around that time containing any of these exact messages. The logs are in
CCCC_HOME/daemon/(for exampleccccd.log, andcccc-web.logwhen CCCC runs in its terminal interface). If you start the Web withcccc weborcccc --headless, please check that command's console output as well.Voice Analyst runtime projection lost eventsChet lifecycle history could not be confirmedChet lifecycle history queue is unavailableQueued input could not be admitted; no replayignored Voice Analyst event for a different managed session
How we would read it: with no receipt, we would look at admission and the recording of the receipt. With a receipt, a reply that finished in OpenCode, and no result in CCCC, we would look at how CCCC received and matched the completion events and recorded the result. The log lines narrow this down; finding none of them does not rule anything out.
Our earlier comment described these warnings in general terms ("lost lifecycle events", "failed Chet history writes"). The log messages use the wording above, so a search for those exact strings is worth repeating.
For a public reply, times, record kinds and statuses, the warning names, and IDs replaced consistently (for example input-1 and msg-1) are enough. outcome.error and log lines can contain message text or paths, so a short summary you have checked is better than the raw text. If you would rather share more detail privately, say so here and we will arrange a way.
Thank you again for the detailed report.