codex - 💡(How to fix) Fix /agent can show unrelated main sessions as generic "Agent" sub-agents

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

This is concerning because it looks like cross-session UI/control-plane contamination. Even if transcript contents are not exposed, showing unrelated sessions as sub-agents can cause the user or model to interact with the wrong thread/session.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.132.0

What subscription do you have?

ProLite

Which model were you using?

No response

What platform is your computer?

Linux 6.12.65-gentoo x86_64 AMD Ryzen 9 5950X 16-Core Processor

What terminal emulator and version are you using (if applicable)?

tmux on alacritty

Codex doctor report

What issue are you seeing?

In a Codex CLI session, opening /agent sometimes shows entries named simply Agent that are not sub-agents of the current session.

These entries appear to be other top-level/main sessions rather than sub-agents spawned by the current session. They have no meaningful sub-agent nickname/role and are displayed as generic Agent entries in the current session's agent picker.

I am not yet sure whether sub-agents from other sessions can also leak into the current session's /agent view, but I have observed what looks like unrelated main sessions appearing there.

This looks like a session isolation / agent-list routing issue: /agent should only show the current session's main thread and its spawned sub-agent tree, not unrelated loaded threads from other sessions.

Potentially related but not exact duplicates:

  • #16799 Cross-project, cross-session state leak
  • #23700 Stale Codex subagents
  • #23930 Codex app subagent cards can remain stuck/visible after close while close/readback reports no live agent
  • #23713 Desktop UX for persistent attached agents: attach a top-level session as a subagent to an orchestrator thread

Those issues seem adjacent, but I did not find one specifically tracking unrelated main sessions appearing inside a different session's /agent picker.

What steps can reproduce the bug?

I do not have a deterministic minimal reproduction yet, but the observed pattern is:

  1. Start or resume multiple Codex CLI sessions.
  2. In one session, use sub-agents normally, or have other sessions open/loaded in the same Codex environment.
  3. Open /agent in one active main session.
  4. Observe entries named simply Agent that do not correspond to sub-agents spawned by that session.
  5. Those entries appear to be other top-level/main sessions rather than children of the current session.

If useful, I can upload feedback/logs from an affected session.

What is the expected behavior?

/agent should only show agents that belong to the current session:

  • the current main session/thread, if shown by design
  • direct or descendant sub-agents spawned by that session
  • no unrelated top-level/main sessions
  • no agents from unrelated sessions unless explicitly attached by a supported cross-thread orchestration feature

Generic Agent entries from unrelated sessions should not appear in the current session's /agent picker.

Additional information

This is concerning because it looks like cross-session UI/control-plane contamination. Even if transcript contents are not exposed, showing unrelated sessions as sub-agents can cause the user or model to interact with the wrong thread/session.

The symptom is intermittent, so the issue may depend on loaded thread state, app-server event routing, session resume/backfill, or stale in-memory agent navigation state.

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix /agent can show unrelated main sessions as generic "Agent" sub-agents