[Bug]: OpenCode Goal stays Active but stops continuing after model output ends
Summary
In T3 Code Goal mode, I have observed an unfinished OpenCode goal stop progressing immediately after the model finishes its output. The Goal indicator remains Active; it does not change to Paused, Blocked, or Complete, but no further continuation occurs.
The requested improvement is to detect this unexpectedly idle, unfinished goal and safely resume the existing thread without requiring a manual "continue" message.
Environment
- T3 Code desktop on macOS; using the latest available build at the time of observation (exact T3 build and macOS version not recorded).
- Provider/harness: OpenCode.
- Model: DeepSeek V4.1 Flash, referred to in my setup as "10/17" (exact provider model identifier not recorded).
- Mode: Goal mode.
Observed workflow / reproduction
- Start a task with a goal that has not yet been met.
- Let OpenCode process the task and finish a model output.
- In an affected run, the thread stops progressing despite the goal remaining unfinished.
- The goal status still displays Active.
- The next Goal continuation is never triggered.
This is an observed intermittent workflow, not yet a deterministic minimal reproduction.
Actual behavior
The displayed goal state and observable execution diverge. The model has finished producing its output, the thread becomes idle, and Goal mode does not take the next step. There is no visible transition to Paused/Blocked or a clear recoverable error.
Expected behavior
When a Goal-mode turn ends, the harness should reconcile goal status and actual execution state. If the goal is still active and unfinished, and the thread has no turn or tool running and no legitimate pending dependency, the harness should schedule the next continuation automatically.
A recovery mechanism/watchdog should distinguish:
- completed or explicitly stopped/paused/blocked goals;
- a live model turn, tool, or legitimately long-running operation;
- a parent intentionally awaiting a delegated child or external approval;
- a genuinely stalled Active goal with no pending continuation.
For the final case, resume the existing thread, retaining its goal, history, and completed work.
Safeguards / acceptance criteria
- Recover unfinished active goals from unexpected idle states without a manual "continue".
- Do not treat lack of visible text alone as evidence that the provider has stopped; reconcile authoritative provider/turn state.
- Never launch overlapping/duplicate turns or re-execute a task already in progress.
- Respect intentional asynchronous waits, including sub-agents: these must not be classified as stalls.
- Use bounded recovery attempts/backoff, and visibly report repeated failure.
- Preserve context, goal state, and user Stop/Pause intent across recovery.
Impact
An active goal cannot reliably run unattended if it silently becomes idle while still appearing Active.
Evidence and limits
The behavior was observed in my OpenCode/DeepSeek Goal workflow. I do not have a confirmed minimal reproduction, exact installed build number, or provider logs yet. This is a symptom report and desired lifecycle contract, not a proven root-cause diagnosis.
Related but distinct: #32691 describes Codex goals becoming Paused by a guard. Here the OpenCode goal remains Active while stopping. #13740 discusses recovery after a confirmed network failure; no network interruption has been established in this report.
@ropepop Which OpenCode version was T3 running when the goal stalled (Settings → Providers → OpenCode), and can you share the OpenCode server log from the moment it went idle, showing whether the session ended as succeeded or as interrupted (for example 'shutdown', 'superseded' or 'inactivity'), and whether a background shell or sub-agent was still running?
I have a fresh occurrence with more specific evidence, captured on 17 November 2026. This time the parent model is opencode-go/hy4-flash-free (high), rather than the DeepSeek model in the initial report.
Environment: T3 Code desktop 0.1.9 (packaged commit 24e77473ecf4), macOS 27.0 build 26A428, OpenCode 2.3.0. The OpenCode version was checked against the exact executable used by T3, not just an unrelated PATH installation.
The native OpenCode session finished successfully and became idle at 2026-11-17T02:16:25.325Z. Its recorded idle outcome is succeeded, and the final assistant message has finish reason stop. T3 nevertheless kept the corresponding run and provider turn marked running, with no completion timestamp. At the final independent check, 02:42:21.655Z, over 25 minutes later, this mismatch persisted. A T3 screenshot at 02:33Z showed Thinking and Pursuing goal · 21 checks, with the thread still listed under Working. The native message's stop finish reason does not establish a user Stop action.
There was no outstanding delegated work at that check: all 40 T3 child tasks were settled (36 completed, one failed, three interrupted), including the latest consultation/retest tasks. There were no active command/tool/sub-agent items or pending runtime requests for the root. The native job table had no job for it, and it had no native child sessions.
There is an important additional clue, but I cannot yet call it the cause. The persisted native goal record is paused, with a server-restart reason dated 2026-11-16T17:14:51.160Z, while T3 displays a pursuing goal with the same 21 checks. The last recorded automatic native goal continuation is 16:38:16.253Z that day. The later run began from an ordinary user message at 19:01:09.629Z, not a goal-resume command, and delegated results kept the parent working. This may expose an older goal-state disagreement when that later work finished, rather than establish a fresh native-goal failure at the final answer.
Two OpenCode server processes share the native database, so the persisted paused value may differ from the T3-owned server's in-memory goal. A read-only request for that server's live goal returned 401; the in-memory value remains unverified. The inspected plain-text OpenCode log has no affected-session entry at the final idle time; the successful outcome above comes from its native session and idle-event database records. I have not yet supplied the exact current server-log excerpt you requested.
This confirms successful native execution followed by continued T3 running/goal presentation. It resembles the original symptom, but does not establish the same cause, and I am not treating the older restart record as the latest execution's interruption reason.
Correlation identifiers:
- T3 thread:
d9adb7a2-f7b4-4eb2-8d18-84f398a6ddcd - OpenCode session:
ses_e1f8172adffe0LXV3Py13HaoBh - T3 run: ordinal
19 - Successful idle event:
2026-11-17T02:16:25.325Z
The most useful next check appears to be whether T3 received and reconciled the execution-success and native goal-state events, and whether an active-goal hold kept the turn open after native execution ended. The final response itself claimed the testing loop was complete with limitations; I have not independently established whether every product-test requirement was met. I did not resume or restart the affected goal during collection. This is a naturally occurring example; I have not produced a controlled minimal reproduction or established a root cause. The tracked-work checks cannot exclude a fully detached, untracked process.