Add an Agent View for managing multiple Codex agents from the TUI

Open 💬 14 comments Opened May 12, 2026 by yuezhao238

What variant of Codex are you using?

CLI

What feature would you like to see?

I would like Codex CLI/TUI to provide an Agent View for managing multiple active and historical agent sessions from one place.

When working with multiple agents in parallel, users currently need to keep track of several sessions manually. This becomes hard when agents are running in different worktrees, waiting for user input, or finishing at different times.

The proposed Agent View would let users:

  • Open a unified agent/session list from the TUI, for example with /agents or an empty-prompt left-arrow shortcut.
  • See each agent's status, such as running, needs input, idle, done, or error.
  • See the last response preview and recent activity time for each agent.
  • Jump directly into an agent session from the list.
  • Include agent sessions discovered from the current app-server and persisted subagent history, not only sessions spawned during the current TUI lifetime.

This would make parallel Codex workflows much easier to operate, especially when a user is delegating multiple independent implementation or investigation tasks.

Additional information

I have a local prototype branch implementing an initial version of this for the Rust TUI.

One limitation of the current prototype is that cross-process real-time status still depends on what the current app-server knows. A complete version may need a global session/agent registry so the Agent View can show all running Codex agents across projects and processes with live status.

View original on GitHub ↗

14 Comments

yuezhao238 · 3 months ago

I have a prototype branch here:

https://github.com/yuezhao238/codex/tree/feat/agent-view

It implements an initial TUI Agent View:

  • /agent opens an Agents view.
  • /agents is supported as an alias.
  • Pressing left arrow on an empty prompt reopens the Agent View.
  • The view includes currently loaded threads plus persisted SubAgent sessions from thread/list.
  • Rows show status, relative updated time, and the latest assistant/agent message preview.
  • Enter selects the target agent thread.
  • Persisted agent threads can be replayed when they cannot be resumed live.

Local validation:

  • cargo test -p codex-tui agent_view -- --nocapture
  • cargo test -p codex-tui agents_alias_opens_agent_command -- --nocapture
  • cargo test -p codex-tui should_attach_live_thread_for_selection_includes_closed_metadata_only_threads -- --nocapture
  • `cargo test -p codex-tui refresh_agent_picker_thread_liveness_preserves_closed_metadata_only_threads --

--nocapture`

  • just fix -p codex-tui
  • git diff --check
cyenxchen · 3 months ago

I have experienced the Agent View feature in Claude Code and found it to be truly excellent. I hope Codex might consider adding this functionality.

tonylee2016 · 2 months ago

yes, this feature will be nice.

consider a different hotkey than just plain left, such as cmd+left

OneRevlis · 2 months ago

Love this idea

lh9403 · 2 months ago

Yes, using Claude Agents feels extremely convenient.

pangpangDaddy · 1 month ago

I explored a narrower native implementation of this proposal that builds on the current app-server thread APIs and existing TUI thread-switch path:

https://github.com/pangpangDaddy/codex/tree/agent/native-agents-dashboard

Commit: 0ebff2a63b

Preview

!Native Codex /agents dashboard snapshot

The prototype:

  • adds a separate /agents dashboard while leaving the existing /agent picker unchanged;
  • derives Needs input, Working, Completed, and Failed directly from app-server ThreadStatus and active flags;
  • keeps first-seen ordering stable within each group, so live activity does not move rows under the user's selection;
  • discovers persisted sub-agent descendants with thread/list after resume, with a loaded-thread fallback for older app servers;
  • reuses the existing native SelectAgentThread flow, so it does not scan rollout files or depend on tmux;
  • includes focused status-mapping tests and a terminal snapshot of the grouped dashboard.

The current scope is intentionally the primary thread's known descendant tree, not a global cross-project/process registry. That keeps the first change within existing protocol and navigation boundaries while leaving room for the broader dashboard described here.

How to try it

git clone --branch agent/native-agents-dashboard --single-branch \
  https://github.com/pangpangDaddy/codex.git codex-native-agents
cd codex-native-agents/codex-rs
cargo run --bin codex --

In the TUI:

  1. Ask Codex to delegate one or more independent subtasks, or resume a session that already has sub-agents.
  2. Enter /agents in the composer.
  3. Use the arrow keys to select a row and Enter to open that agent's transcript; use Esc to return. When the dashboard has more than eight agents, typing filters the list.

Needs input means the app-server reports an active thread waiting on approval or user input. Other active threads appear under Working; idle or unloaded persisted threads appear under Completed; app-server system errors appear under Failed.

Local validation:

  • cargo check -p codex-tui --lib
  • RUST_MIN_STACK=16777216 cargo test -p codex-tui agents_dashboard --no-fail-fast
  • RUST_MIN_STACK=16777216 cargo test -q -p codex-tui --no-fail-fast (3033 passed, 0 failed, 1 ignored)
  • RUST_MIN_STACK=16777216 cargo clippy --fix --tests --allow-dirty -p codex-tui
  • cargo fmt --all

If this narrower direction aligns with the maintainers' intended solution, would a maintainer be willing to invite a focused PR? I can submit the branch as a draft and adapt the UX or protocol approach before review.

pandysp · 1 month ago

👍 from my side aswell. Can't go back to regular interactive sessions. Claude Code's agent view and background agents is the superior user experience in the terminal.

AtunBetun · 1 month ago

+1 for this, I love GPT models but can't be as productive without the agents view

sjh19950115 · 1 month ago

+1 for this.
The new agent should respect the existing concurrency limit, sandbox, permissions, and project instructions. This would make user-directed parallel workflows more deterministic and would complement the status and session-management capabilities proposed in this issue.

etzel-mes · 27 days ago

+1

PaulRBerg · 26 days ago

One additional use case for a global Agent View is agent self-inspection before touching a shared working tree.

I run several independent Codex sessions in parallel on the same repo and branch. My global AGENTS.md tells each agent to:

  1. Inspect git status for dirty paths.
  2. Query live top-level agent sessions in that repo.
  3. If another live session may overlap the same files, modules, or shared codegen outputs, remain read-only and wait for that work to be committed.

This prevents conflicting edits, formatter/codegen races, index contention, and accidental commits or reverts of another agent's in-flight work.

For this workflow, a TUI view alone isn't enough. It needs a machine-readable, machine-wide interface—something like codex agents --json—covering independent Codex processes, not only descendants known to the current app-server. A privacy-minimal result with session ID, cwd/worktree, and state such as working or waiting for input/approval would be sufficient. Idle persisted threads should be excluded; transcript recency isn't reliable evidence that a turn is still active.

I currently maintain a small hook-backed registry solely to provide this liveness signal. An official interface would let agents perform this conflict check portably and remove that custom lifecycle tracking.

starSumi · 26 days ago

I tested a narrower implementation that extends the existing /agent picker rather than adding a second dashboard or command:

The main evidence delta is hierarchical fidelity. The picker derives nesting from the authoritative ThreadSpawn.parent_thread_id graph, with the canonical V2 agent_path retained as a display/fallback signal. This lets the same UI distinguish siblings from nested subagents in V1 and V2 sessions. It also preserves the existing SelectAgentThread flow and Alt-left/right switching, while adding working/idle/closed state, bounded recent activity, and the selected thread UUID.

Human validation

Sibling agents created directly by Main render at the same depth:

!Main with sibling subagents Lagrange and Ampere

A subagent created by another subagent renders one level deeper:

!Main with nested subagents Mill and Nash

These screenshots are from real V1 thread-spawn sessions. The nested case used an isolated test configuration with agents.max_depth = 2; the product default was not changed.

Validation

  • Focused parent-tree, loaded-thread, activity-preview, and picker tests: 5/5 passed.
  • Full codex-tui run: 3333 passed; three pre-existing Windows permissions tests timed out with the same behavior as the baseline.
  • just fix -p codex-tui, just fmt, cargo build --bin codex, and git diff --check passed.

Does extending the existing /agent picker in this direction align with the intended TUI UX, and if so, would a maintainer be willing to invite a focused PR?

maobubu · 7 days ago

Hope we have this feature soon!

henricook · 7 days ago

It looks like this dropped in today's release. This is a great leveler with Claude Code as claude agents is where I spend my entire day. And in fact, I can already see areas where it's better than claude agents which has lagged in improvements, such as a decent search or trying to give up on this foolish notion that people will just have five 'agents' named Alice, Bob, Charlie, Dave and Erica and are instead using it as a session manager - a way it's actually useful. Awesome stuff, temptation to switch to Codex has been increased!

One thing's missing from my first inspection: The ability to run codex agents in one project directory. An agent view that lists all my projects and all my sessions from all my projects gets too crowded to be usable very quickly. With Claude Code I can pass in a --cwd and start one copy of agents per active project (i.e. per terminal tab)