Repository navigation
Description
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:
- Cross-project, cross-session state leak #16799 Cross-project, cross-session state leak
- Stale Codex subagents #23700 Stale Codex subagents
- Codex app subagent cards can remain stuck/visible after close while close/readback reports no live agent #23930 Codex app subagent cards can remain stuck/visible after close while close/readback reports no live agent
- Desktop UX for persistent attached agents: attach a top-level session as a subagent to an orchestrator thread #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:
- Start or resume multiple Codex CLI sessions.
- In one session, use sub-agents normally, or have other sessions open/loaded in the same Codex environment.
- Open
/agentin one active main session. - Observe entries named simply
Agentthat do not correspond to sub-agents spawned by that session. - 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.
Activity
metabrixkt commentedon Jul 22, 2026
A bit more context that will hopefully get this fixed sooner:
Still an issue as of v0.145.0
ardasevinc commentedon Aug 2, 2026
still present on codex cli v0.146.0.
etraut-openai commentedon Nov 21, 2026
(response from codex)
Thanks for narrowing this down to the shared app-server. I reproduced it on CLI 0.146.0 with two TUIs connected to the same server. The generic
Agentrow in the first TUI’s/agentpicker had the exact thread ID of the second TUI’s main session.#39088 fixed this in CLI 0.149.0 by filtering out notifications from unrelated sessions. That release also removed the
/agentalias. Use/subagentsto open the picker.I verified the same setup on CLI 0.171.0, where each picker showed only its own main thread. Closing as fixed.