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

Open 💬 7 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 ↗

7 Comments

yuezhao238 · 2 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 · 2 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 · 1 month ago

yes, this feature will be nice.

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

OneRevlis · 1 month ago

Love this idea

lh9403 · 22 days ago

Yes, using Claude Agents feels extremely convenient.

pangpangDaddy · 7 days 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 · 5 days 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.