Repository navigation
Description
bb version: 0.38.0 (macOS, Darwin 25.4.0)
Provider: codex · model gpt-5.6-sol · reasoning max · permission mode auto
Thread: thr_c3thbxs7sp (task-plugin thread, personal workspace env_evew84hhic, local machine)
Date observed: 2026-08-14, ~22:11–22:19 PDT (epoch ms receipts below)
Summary
A long-running Codex thread emitted turn/completed, and bb flipped the thread to idle — but the Codex session immediately continued working (reasoning, commandExecution, fileChange, agent messages). bb never registered a new turn/started for the continuation, so for ~4.4 minutes the thread executed dozens of commands while bb thread list --json reported status: idle, runtime.displayStatus: idle, and every activity counter at 0. The app sidebar faithfully rendered that state: no spinner, no unread dot. The user watched commands executing live in a thread the UI said was idle.
It happened twice within 10 minutes in the same thread:
- 22:11:19 → 22:13:59 —
turn/completed, work resumes 12 s later (including acontextCompactionitem),turn/startedfinally arrives 2.5 min late, mid-work. - 22:14:36 → 22:19:02 —
turn/completed, work resumes 12 s later, noturn/startedever arrives. The closingturn/completedat 22:19:02 has no matchingturn/started(invariant violation).
Impact
- The sidebar spinner and unread dot are the user's only signal of which agents are working. During these windows both are absent, so a running thread is indistinguishable from a finished one. (The unread dot from the phantom 22:14:36 turn-end was cleared when the user opened the thread at 22:15:51; the continuing work raised no new attention until 22:19:02.)
- Worse than cosmetic:
bb thread wait <id>defaults to--status idle, so any orchestration waiting on this thread would have returned ~4.4 minutes early, while the agent was still mutating the workspace. - The window is not small in practice: this thread's user prompt at 22:01:39 ("continue") legitimately spanned multiple provider turns; long Codex tasks with auto-compaction seem to hit this boundary routinely.
Timeline (from bb thread log thr_c3thbxs7sp --json)
One user message in this whole period — client/turn/requested at 22:01:39 (seq 361650). Everything after is provider-side continuation of that one request.
22:01:39 seq 361650 client/turn/requested ("continue" — last user input)
22:01:42 seq 361654 turn/started
22:08:12 seq 363087 turn/started (provider-initiated; no client request — mapping works here)
22:11:19 seq 364598 turn/completed ‚Üí thread idle
22:11:31–22:13:59 32 item/started while idle: reasoning, agentMessage,
fileChange, contextCompaction (22:11:51, seq 364689),
commandExecution `pwd && bb status && git status …` (22:12:58)
22:13:59 seq 365342 turn/started (arrives 2.5 min into the already-running work)
22:14:36 seq 366019 turn/completed {"status":"completed"} ‚Üí thread idle
22:14:48–22:19:02 1,781 events while idle, including 78 item/started:
reasoning, agentMessage, fileChange, imageView, and
commandExecutions — sqlite3, shasum, `npm test`,
`rtk npm run typecheck`, `node --check …`, bb CLI calls
22:19:02 seq 368025 turn/completed {"status":"completed"} ‚Üê NO matching turn/started
Epoch receipts: turn/completed seq 366019 at 1786770876511; final turn/completed seq 368025 at ~1786771142900; user lastReadAt 1786770951974 (22:15:51).
Independent confirmation the daemon believed idle mid-work
At ~22:17:30 PDT — squarely inside the second gap, while the event log shows commands executing — a live probe returned:
$ bb thread list --json # thr_c3thbxs7sp
status: idle
runtime.displayStatus: idle
hasPendingInteraction: false
activity: { activeBackgroundAgentCount: 0, activeBackgroundCommandCount: 0, ... }
latestAttentionAt: 22:14:36 lastReadAt: 22:15:51
So this is daemon-side state, not a rendering issue — the app drew exactly what the daemon reported. Two other Codex threads (thr_uagitutd23, thr_uxwqqjpgug) were active with spinners at the same moment, so ordinary turn tracking works; the bug is specific to these provider-initiated continuation boundaries.
Possibly relevant
- The idle-gap event stream contains 709
hook/started+ 709hook/completedcodex notifications surfacing asprovider/unhandled(this codex config runs many hooks). The lateturn/startedat 22:13:59 (seq 365342) arrived interleaved amonghook/started/hook/completedevents in the same millisecond — if the adapter derives turn boundaries near hook traffic, that interleaving may be involved. - The first gap contains a
contextCompactionitem (seq 364689) — the continuations look like Codex's auto-compaction/auto-continue behavior inside one logical user turn.
Repro sketch
- Spawn a Codex thread (reasoning high/max) on a long task so context auto-compaction occurs mid-task; let it run unattended.
- Poll
bb thread list --json(or watch the sidebar) around the compaction window. - Observe
status: idlewhilebb thread log <id>showsitem/startedcommandExecutionevents continuing after the lastturn/completed; observe a laterturn/completedwith no matchingturn/started.
Suggested fix directions
- Treat provider item activity (
item/started, deltas) on anidlethread as evidence of an active turn: synthesizeturn/started(or flipdisplayStatus) when items stream with no open turn. - Map whatever Codex notification accompanies post-compaction auto-continuation to
turn/started(the adapter clearly can register provider-initiated starts — 22:08:12 and 22:13:59 did). - Add an invariant check/telemetry:
turn/completedwith no open turn = adapter bug; would have caught both instances here. - Consider making
bb thread wait --status idleresistant to this (e.g., require N seconds of event-stream quiescence, not just status).
Re-derive everything on this machine
bb thread log thr_c3thbxs7sp --json --limit 1000000 # full event stream (≈277k events)
# turn lifecycle only:
... | python3 -c "…filter types turn/*, client/turn/requested…"
(Reported by David Beyer; investigation transcript available on request.)
Activity
SawyerHood commentedon Aug 18, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1646.html
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at
16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).Reactivate threads when a provider resumes root work on a settled turn
Reactivate threads when a provider resumes root work on a settled turn