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
{{ message }}
Repository navigation
Codex goal remains active after a turn ends but no next turn starts #6226
When using a native Codex goal in BB, a turn can finish while the goal remains marked active, but no follow-up turn starts. The goal then stays active and idle.
Expected
If the goal is still active, within budget, and the thread is idle with no queued user work or other blocker, Codex should continue working toward the goal after the turn completes.
Actual
The current turn completes, the goal remains active, and no subsequent turn starts. The objective has not been reported as complete.
Steps to reproduce
Start a Codex goal in a BB thread that requires more than one turn.
Let a turn finish before the objective is satisfied.
Observe that the goal remains active but no new turn begins.
This has been observed intermittently. The BB version, Codex version, affected thread ID, and logs were not available when this report was filed, so the exact trigger and reproducibility remain to be established.
Scope
This is about automatic continuation of an active Codex goal after a completed turn. It is separate from #1960, which tracks a provider-independent /goal command. The cause may be in Codex continuation behavior or BB's Codex integration; an event trace is needed to distinguish them.
Root cause: Unconfirmed. BB preserves active goal state and forwards a supplied native continuation; the actual native scheduler stall still needs a failure trace.
Evidence: The same investigator ran the bounded bridge diagnostic in two clean trusted-main checkouts: both cases passed in each; 96 relevant tests also passed. These scripted probes do not reproduce the real native scheduler failure.
No PR: A safe fix needs a failing regression for the reported native stall; none was established on trusted main.
A failure trace that may explain this: 6 occurrences in one thread on macOS, with a Codex goal active and native Codex subagents in use. They were recorded on 2026-11-10. The bb version at the time was not captured. The code path below is unchanged in 0.50.1.
Pattern (the same in all 6)
The goal is active, per the last provider-codex/goal state before each event.
The main turn completes: turn/completed with no parent_tool_call_id.
Native subagent turns keep running. A turn/started with parent_tool_call_id lands after the main turn completes, and no turn/completed (main or sub) follows within 5 minutes.
bb appends system/errorprovider_turn_start_deadline and system/thread/interrupted with reason provider-turn-idle. This happens 303–307 s after the main turn/completed in 5 cases, and 661 s after it in one.
No prompt goal continuation follows. A human message restarted the thread in 4 cases, after 110 s to 26,801 s. A system-initiated request restarted it in 1. In the last case, a main turn started 2,912 s later without a new request. Idle time until the next main turn totals 44,263 s (12h18m) across the 6.
One trace, with times relative to the first event:
Why the watchdog fires (reading start-server.js in 0.50.1)
awaitingTurnStartPastDeadline selects threads that meet three conditions:
status = 'active';
statusChangedAt <= deadline;
no turn/completed event after the deadline.
The turn-start.overdue handler then stops the thread when activeTurnId === null.
A thread whose main turn has ended while native subagents are still working matches all of these conditions. bb therefore reports that "the provider did not start the turn", even though work is in progress. Neither check looks at subagent activity or at an active Codex goal.
A second correlation, not proven causal: in all 6 cases, the last message before the interruption had target: {kind: "new-turn"}. It was accepted into a turn that was already running.
Expected: one of the following:
a thread with live subagent turns, or with an active goal about to continue, is not treated as a missed turn start;
if the thread is stopped, the goal continuation is re-armed;
or the goal's status changes so the stop is visible, instead of staying active with no turn.
Workaround in use: long goals with parallel work run as bb child threads (--parent-self, --parent-notifications auto) instead of native subagents. That way an interruption wakes the parent.
Activity
bb-slop-cop commentedon Oct 24, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,threads, andprovider-codex; no existing classifications were replaced.no-repro.gabrielhamu commentedon Dec 2, 2026
A failure trace that may explain this: 6 occurrences in one thread on macOS, with a Codex goal active and native Codex subagents in use. They were recorded on 2026-11-10. The bb version at the time was not captured. The code path below is unchanged in 0.50.1.
Pattern (the same in all 6)
active, per the lastprovider-codex/goalstate before each event.turn/completedwith noparent_tool_call_id.turn/startedwithparent_tool_call_idlands after the main turn completes, and noturn/completed(main or sub) follows within 5 minutes.system/errorprovider_turn_start_deadlineandsystem/thread/interruptedwith reasonprovider-turn-idle. This happens 303–307 s after the mainturn/completedin 5 cases, and 661 s after it in one.One trace, with times relative to the first event:
Why the watchdog fires (reading
start-server.jsin 0.50.1)awaitingTurnStartPastDeadlineselects threads that meet three conditions:status = 'active';statusChangedAt <= deadline;turn/completedevent after the deadline.turn-start.overduehandler then stops the thread whenactiveTurnId === null.A thread whose main turn has ended while native subagents are still working matches all of these conditions. bb therefore reports that "the provider did not start the turn", even though work is in progress. Neither check looks at subagent activity or at an active Codex goal.
A second correlation, not proven causal: in all 6 cases, the last message before the interruption had
target: {kind: "new-turn"}. It was accepted into a turn that was already running.Expected: one of the following:
activewith no turn.Workaround in use: long goals with parallel work run as bb child threads (
--parent-self,--parent-notifications auto) instead of native subagents. That way an interruption wakes the parent.