Repository navigation
fix(agent-status): keep Codex's hidden title-thread prompt off the sidebar heading - #33746
Conversation
…debar heading Codex titles a new thread in a hidden ephemeral thread. When managed config pins hooks on, that thread's SessionStart (source startup) took the pane and its prompt became the row heading. Drop its prompt as a foreign ephemeral thread and keep the row's prompt across rollout-less starts. Fixes #30049 Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ef49393c-8def-4c5c-b2e4-dde579a28826
Files selected for processing: 3-
src/main/agent-hooks/server-codex-side-thread.test.tssrc/shared/agent-hook-listener/providers/codex-ephemeral-threads.tssrc/shared/agent-hook-listener/providers/codex-events.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
…hows what it is The hidden title thread's SessionStart no longer swaps the row's state, session or tool snapshot. A held start is dropped with the title prompt, or replayed as SessionStart on a new conversation's first prompt so relayed desktops still let it take the pane. Covers a main Stop arriving first. Co-Authored-By: Claude <noreply@anthropic.com>
…e old completion stamp on takeover Co-Authored-By: Claude <noreply@anthropic.com>
…am tests D-010 (user decision 2026-11-03): a tab's manual rename and a session's manual name now rank above the Provider name, generated names and the live title on every surface (tab, Dashboard, Activity, notifications, mobile list), which is upstream's order. Quick-command labels stay in the label tier; split panes still do not inherit the parent tab's rename. Activity's confirmed-Provider shortcut yields to a manual tab name. Upstream's manual-rename projection test passes unchanged. D-011 (user decision 2026-11-03): D-009 stays, so a rollout-less Codex session still cannot replace a backed row. Upstream's three ephemeral-takeover cases (stablyai#33275, stablyai#33746) now pin that rule; the known limit is recorded under REQ-028. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ELI5
When you send Codex your first message, Codex quietly opens a hidden second chat to come up with a short title for the conversation. That hidden chat's instructions start with "Generate a concise, single-line task title…". On some machines Codex also reports that hidden chat to Orca. Orca mistook it for the real conversation, so every Codex card in the sidebar got that English instruction as its heading. Now Orca recognizes the hidden title chat and ignores it, and the card keeps showing your real task.
Root cause
codex-rs/tui/src/app/thread_routing.rs:2073,thread_title.rs:62). It is an ephemeral thread (temporary_structured_request.rs:151), so its hooks carrytranscript_path: null. Its prompt always starts withthread_title_instructions()(thread_title.rs:266), and that text has been the same since the feature was added ([Feature]: Give plugins the focused workspace's id and path in workspace.readContext and workspace.changed #40492).temporary_structured_request.rs:74,features.hooks = false). A managedrequirements.tomlor MDM config that pins hooks on overrides that, and then the thread'sSessionStart/UserPromptSubmit/Stopreach Orca. This explains why we couldn't reproduce it on a stock install.isForeignEphemeralCodexThreadlets any rollout-lessSessionStartwithsource: "startup"take the pane, because that's how a newcodex exec --ephemeralconversation has to replace a row (covered by the existing relay test). The title thread starts the same way, so it took over the row:providerSession. Thethread_name//renametitle Orca reads for that session couldn't resolve, which is why a rename only showed on the third line;Stopmarked the pane done while the real turn was still running.getAgentRowPrimaryText) only applies while the prompt is still the Orca dispatch, so the title prompt also hid--task-title.What changed
codex-ephemeral-threads.ts(nowcodexHookEventForEphemeralThread, applied inprovider-dispatch.tsnext tocodexHookEventForEndedTurn): a rollout-lessSessionStart(startup)while the row holds another Codex thread with a rollout is held. It doesn't change state, session or tool snapshot. When that session sends its firstUserPromptSubmit, one of two things happens:/sideforks), and its prompt andStopare dropped.SessionStartcarrying that prompt. The new conversation takes the pane with no stale prompt, and relayed desktops let it through as before.Stoparriving before the title thread starts.tui/src/app/thread_title.rs:266) and recap (context-fragments/src/recap_prompt.rs:10). These are the only users oftemporary_structured_request.rs.server-status-update.ts: any hook with an explicit prompt, including the replayedSessionStart, now clears the previous completion stamp, asUserPromptSubmitalready did.listener-state.ts: one per-pane map for the held start, cleared and moved with the other Codex pane caches.With the main row kept, the existing heading priority applies again: manual rename, then the session's
thread_name, then the orchestration task title, then the dispatched prompt.Verification
server-codex-side-thread.test.tscovers three hidden-thread cases:Stopthat arrived first;Each case checks the row right after the hidden
SessionStartand again at the end. Onmainthe title case fails: the row gets the title prompt, switches to the title session, and showsdonemid-turn.A new local test has a new ephemeral conversation take over a row that's still
working, showing the new prompt and not the old one.The existing
/sideand "new ephemeral conversation replaces a row" tests (desktop and relay) still pass.pnpm test src/main/agent-hooks src/shared/agent-hook-listener src/wsl-guest src/relay: 2398 passed.pnpm tc:nodeandcheck:code-quality:changedare clean.Not reproduced with a real CLI: that needs a system-wide
/etc/codex/requirements.toml(or MDM) that pins hooks, and we won't write that on a shared machine.Risk
SessionStart. Codex fires them back to back.Visual proof: N/A. This changes the agent-status state the card reads; the before/after is in the regression test.
Fixes #30049