Skip to content

CLI: /agent lists active subagents but provides no thread selector #30813

Closed

Description

@htregidgo

What version of Codex CLI is running?

codex-cli 0.142.5

What subscription do you have?

Plus

Which model were you using?

gpt-5.5 medium

What platform is your computer?

Darwin 23.6.0 arm64 arm

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

PyCharm integrated terminal on macOS, no tmux/screen/zellij

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1782895337s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.142.5",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/Users/<username>/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/Users/<username>/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/Users/<username>/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/Users/<username>/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/Users/<username>/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "/Users/<username>/.codex/auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "/Users/<username>/.codex",
        "config.toml": "/Users/<username>/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/Users/<username>/Projects/<repository>",
        "enabled feature flags": "shell_tool, unified_exec, shell_snapshot, terminal_resize_reflow, sqlite, memories, hooks, enable_request_compression, multi_agent, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, plugin_sharing, image_generation, resize_all_images, skill_mcp_dependency_install, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, personality, fast_mode, tui_app_server, prevent_idle_sleep, auto_compaction, remote_compaction_v2, workspace_dependencies",
        "feature flag overrides": "memories=true, prevent_idle_sleep=true",
        "feature flags enabled": "35",
        "log dir": "/Users/<username>/.codex/log",
        "mcp servers": "2",
        "model": "gpt-5.5",
        "model provider": "openai",
        "sqlite home": "/Users/<username>/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.39.3 (Apple Git-146)",
      "details": {
        ".git entry": "directory",
        "PATH git #1": "/usr/bin/git",
        "PATH git entries": "1",
        "git branch": "<branch>",
        "git build options": "git version 2.39.3 (Apple Git-146); cpu: arm64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; feature: fsmonitor--daemon",
        "git exec path": "/Library/Developer/CommandLineTools/usr/libexec/git-core",
        "git version": "git version 2.39.3 (Apple Git-146)",
        "repo detected": "true",
        "repo root": "/Users/<username>/Projects/<repository>",
        "selected git": "/usr/bin/git"
      },
      "remediation": null,
      "durationMs": 10
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/opt/homebrew/bin/codex",
        "current executable": "/opt/homebrew/bin/codex",
        "install context": "brew",
        "managed by bun": "false",
        "managed by npm": "false",
        "managed package root": "not set"
      },
      "remediation": null,
      "durationMs": 6
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "2",
        "disabled servers": "0",
        "stdio servers": "1",
        "streamable_http servers": "1"
      },
      "remediation": null,
      "durationMs": 426
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 167
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 2 IPv6, first IPv6",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 659
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running brew on macos-aarch64",
      "details": {
        "commit": "unknown",
        "current executable": "/opt/homebrew/bin/codex",
        "install method": "brew",
        "platform": "macos-aarch64",
        "version": "0.142.5"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (system)",
      "details": {
        "search command": "rg",
        "search command readiness": "ripgrep 14.1.1",
        "search provider": "system"
      },
      "remediation": null,
      "durationMs": 2
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "/Users/<username>/.codex/tmp/arg0/<temporary-wrapper>/codex-execve-wrapper",
        "filesystem sandbox": "restricted",
        "network sandbox": "restricted"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "/Users/<username>/.codex (dir)",
        "active rollout files": "<redacted>",
        "archived rollout files": "<redacted>",
        "goals DB": "/Users/<username>/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/Users/<username>/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/Users/<username>/.codex/log (dir)",
        "memories DB": "/Users/<username>/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "/Users/<username>/.codex (dir)",
        "state DB": "/Users/<username>/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 480
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "<redacted>",
        "rollout DB active rows": "<redacted>",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "<redacted>",
        "rollout DB archived rows": "<redacted>",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "<redacted>",
        "rollout DB rows": "<redacted>",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "<redacted>",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 2730
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-GB",
      "details": {
        "EDITOR": "not set",
        "LC_CTYPE": "UTF-8",
        "VISUAL": "not set",
        "os": "Mac OS 14.6.1 [64-bit]",
        "os language": "en-GB",
        "os type": "Mac OS",
        "os version": "14.6.1"
      },
      "remediation": null,
      "durationMs": 2
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "color output": "disabled (stdout is not a terminal)",
        "effective locale": "UTF-8",
        "stderr is terminal": "false",
        "stdin is terminal": "false",
        "stdout is terminal": "false",
        "terminal": "Apple Terminal",
        "terminal size": "80x24"
      },
      "remediation": null,
      "durationMs": 5
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "git repo root",
        "terminal title project value": "<repository>",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.142.4",
        "check for update on startup": "true",
        "last checked at": "2026-06-30T12:35:01.022020Z",
        "latest version": "0.142.5",
        "latest version status": "current version is not older",
        "update action": "brew upgrade --cask codex",
        "version cache": "/Users/<username>/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 45
    }
  }
}

What issue are you seeing?

The /agent slash command does not provide a way to select or switch to an active subagent thread.

When a subagent is running, /agent displays text such as:

Sub-agents running
• /root/standby
No recent activity yet.

However, no interactive selector, menu, or other mechanism appears for opening that agent’s thread.

In some tests, Codex reports that it has spawned a subagent, for example:

Started /root/waiting_agent
Spawned ... waiting for instructions.

but running /agent immediately afterwards reports:

Sub-agents running
• No sub-agents running.

The issue was first noticed while configuring documented custom subagents with per-agent model settings. However, it also reproduces using a generic spawned subagent with project-local custom-agent configuration removed, so custom agents do not appear to be required to trigger it.

Codex doctor reports that multi_agent is enabled and that the rollout files and state database agree. No configuration, authentication, network, installation, or database-integrity errors are reported.

What steps can reproduce the bug?

Uploaded thread: 019f1ccc-49ce-75a3-8929-1f838f4cf66d

What is the expected behavior?

When one or more subagents are active, /agent should open an interactive thread selector that allows me to:

  • see the parent thread and active child-agent threads;
  • select an active subagent;
  • switch into that subagent’s thread to inspect or steer it; and
  • return to the parent thread.

The displayed active-agent state should also agree with the actual spawn lifecycle. If Codex reports that an agent was successfully spawned and it is still running, /agent should not immediately report that no subagents are running.

Additional information

No response

Activity

  1. added
    bug
    on Jul 1, 2026
  2. added
    CLI
    subagent
    TUI
    on Jul 1, 2026
  3. github-actions commented on Jul 1, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. htregidgo commented on Jul 1, 2026

    @htregidgo
    Author

    I reviewed #30713. It appears related but not duplicate.

    #30713 is a feature request for a new dashboard covering multiple independent Codex CLI sessions, projects, and worktrees.

    This issue concerns the existing /agent command and child subagents spawned within one session. /agent sometimes displays an active child without presenting a selector, and sometimes reports no active subagents immediately after Codex reports a successful spawn.

    I am therefore leaving this open as a bug in the existing subagent thread-navigation and lifecycle display.

  5. Alek2077 commented on Jul 3, 2026

    @Alek2077

    Reproduced on Linux with codex-cli 0.142.5. After Codex reported that it started a subagent, /agent showed “No sub-agents running” and provided no thread selector. The parent also briefly reported that no agents had completed, although the child’s completion arrived immediately afterward. multi_agent is enabled and marked stable. This matches the reported thread-selection and lifecycle-state inconsistency.

  6. runfence commented on Jul 10, 2026

    @runfence

    Same issue on Windows Terminal: PowerShell

  7. matsumo0922 commented on Jul 10, 2026

    @matsumo0922

    I'm experiencing the same issue on v0.144.1 (macOS, Homebrew).
    Does anyone have a workaround or solution? Or are there any updates on this?
    I'm currently stuck because I cannot switch to the subagent thread. There seem to be very few people discussing this, so information is really scarce...

  8. nullbio commented on Jul 10, 2026

    @nullbio

    Same issue for me on Linux on v0.144.1

    Also wondering if there's a workaround.

  9. htregidgo commented on Jul 10, 2026

    @htregidgo
    Author

    A Codex-assisted inspection suggests this behavior was introduced by PR #27007.

    That change made /agent render a bounded status summary whenever path-backed
    v2 subagents are present, while retaining the interactive picker only for the
    legacy path.

    In the current implementation, the v2 branch appends an
    AgentStatusHistoryCell and returns at session_lifecycle.rs:62, before
    reaching the later show_selection_view(...) call:

    https://github.com/openai/codex/blob/main/codex-rs/tui/src/app/session_lifecycle.rs#L35-L62

    This appears to explain the reported behavior: /agent displays the
    running-agent summary but provides no interactive selection mechanism.

    Thread switching itself still works. On macOS with Codex CLI 0.144.1, I
    confirmed that Option+Right Arrow switches into a running subagent thread and
    Option+Left Arrow returns to the parent.

    A suitable fix may be to make the v2 status entries selectable, or otherwise
    retain an interactive picker for path-backed subagents.

    A separate automated investigation reached the same source-level conclusion:

    ChronoAIProject/FKST-codex-harness#403

  10. lucameng commented on Jul 11, 2026

    @lucameng

    Same issue on Ubuntu on v0.144.1

  11. connorsicheri commented on Jul 14, 2026

    @connorsicheri

    Confirmed still present on Codex CLI 0.144.4 installed via Homebrew, using gpt-5.6-sol. This also reproduces in a regular Codex session with no Compass/plugin involvement: after spawning a /root/... child, /agent renders the status list but never opens a selector.

    One additional detail: models.json assigns Sol and Terra multi_agent_version: v2, while Luna uses v1. That aligns with the path-backed-v2 early return identified above and explains why the selector can appear model/session dependent. Current main still contains that branch.

  12. etraut-openai commented on Jul 16, 2026

    @etraut-openai
    Contributor

    Thanks for reporting. Yes, this is a regression that we introduced recently. I'll work on a fix. Apologies for any inconvenience.

  13. runfence commented on Jul 16, 2026

    @runfence

    @etraut-openai , could you also take a look at this #28058 ?
    We lost ability to audit messages that are sent between agents. It's a critical regression when I am trying to create codex skills for my workflow.

  14. Alek2077 commented on Jul 16, 2026

    @Alek2077

    Thanks for reporting. Yes, this is a regression that we introduced recently. I'll work on a fix. Apologies for any inconvenience.

    IIRC, changes to agents not being able to properly spawn subagents was introduced in version 0.136/137 (somewhere in one of those two), which was released 45 days ago. So quite a long time ago. We do appreciate the acknowledgment.

    Also, for me personally, seems like the issue is reverted for GPT 5.5 into v1 schema, so whatever fix you'll be working on, seems like the focus should be on Sol/Terra as these are now affected by this. For some reason, Luna is not.

  15. YqGe585 commented on Jul 16, 2026

    @YqGe585

    Same issue here on 0.144.5 Ubuntu, using gpt-5.6-sol.

  16. htregidgo commented on Jul 18, 2026

    @htregidgo
    Author

    Addressed in #33922

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLITUIbugsubagent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions