claude-code - 💡(How to fix) Fix Agent View (`claude agents`) does not enumerate FleetView-dispatched / daemon-fleet sessions [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#60437Fetched 2026-05-20 03:58:36
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1cross-referenced ×1

claude agents (Agent View TUI) does not enumerate FleetView-dispatched / daemon-managed sessions. The Agent View only surfaces CLI-spawned background sessions (foreground sent to /bg, or claude --bg "<task>" from a terminal). Sessions dispatched from the mobile app via Remote Control / FleetView land in the daemon's fleet pool (backend: "daemon", template: "bg" in ~/.claude/jobs/<short>/state.json) and never appear in the TUI list.

As a result, from a local terminal you cannot:

  • See that mobile-spawned agents are running.
  • Attach to / resume one with claude agents → row select.
  • Get a unified local view of all live Claude Code work — the mobile app is currently the only UI that lists FleetView sessions.

Adjacent but distinct from #59415 (/resume picker hides sessionKind: "bg" after /compact fork — about /resume, not Agent View enumeration) and #59848 (interactive sessions mis-classified as bg — inverse direction).

Root Cause

claude agents (Agent View TUI) does not enumerate FleetView-dispatched / daemon-managed sessions. The Agent View only surfaces CLI-spawned background sessions (foreground sent to /bg, or claude --bg "<task>" from a terminal). Sessions dispatched from the mobile app via Remote Control / FleetView land in the daemon's fleet pool (backend: "daemon", template: "bg" in ~/.claude/jobs/<short>/state.json) and never appear in the TUI list.

As a result, from a local terminal you cannot:

  • See that mobile-spawned agents are running.
  • Attach to / resume one with claude agents → row select.
  • Get a unified local view of all live Claude Code work — the mobile app is currently the only UI that lists FleetView sessions.

Adjacent but distinct from #59415 (/resume picker hides sessionKind: "bg" after /compact fork — about /resume, not Agent View enumeration) and #59848 (interactive sessions mis-classified as bg — inverse direction).

Fix Action

Workaround

Walk the daemon's job state directly:

ls -t ~/.claude/jobs/*/state.json \
  | xargs -I{} jq -r '[.state, .daemonShort, .cwd, .name] | @tsv' {} \
  | column -t -s $'\t'

This gives the same data the mobile app shows (state, short id, cwd, auto-title) and confirms the sessions exist locally — they just aren't routed into the Agent View list.

Code Example

{
     "template": "bg",
     "backend": "daemon",
     "sessionId": "<uuid>",
     "cwd": "<cwd-the-daemon-picked-for-this-dispatch>",
     ...
   }

---

claude agents
   # or
   claude agents --cwd <cwd-from-state.json>

---

ls -t ~/.claude/jobs/*/state.json \
  | xargs -I{} jq -r '[.state, .daemonShort, .cwd, .name] | @tsv' {} \
  | column -t -s $'\t'
RAW_BUFFERClick to expand / collapse

Summary

claude agents (Agent View TUI) does not enumerate FleetView-dispatched / daemon-managed sessions. The Agent View only surfaces CLI-spawned background sessions (foreground sent to /bg, or claude --bg "<task>" from a terminal). Sessions dispatched from the mobile app via Remote Control / FleetView land in the daemon's fleet pool (backend: "daemon", template: "bg" in ~/.claude/jobs/<short>/state.json) and never appear in the TUI list.

As a result, from a local terminal you cannot:

  • See that mobile-spawned agents are running.
  • Attach to / resume one with claude agents → row select.
  • Get a unified local view of all live Claude Code work — the mobile app is currently the only UI that lists FleetView sessions.

Adjacent but distinct from #59415 (/resume picker hides sessionKind: "bg" after /compact fork — about /resume, not Agent View enumeration) and #59848 (interactive sessions mis-classified as bg — inverse direction).

Environment

  • Claude Code: 2.1.143
  • Platform: Linux (Ubuntu 24.04, x86_64)
  • Daemon: origin=transient, started via remoteControlAtStartup: true

Reproduction

  1. Start remote-control somewhere the iOS app can reach (e.g., cd ~ && claude remote-control --name "host-rc").

  2. From the Claude mobile app, dispatch one or more new agents to that environment.

  3. The agents start, run, and write session jsonl files to ~/.claude/projects/<encoded-cwd>/<session-uuid>.jsonl, and daemon state to ~/.claude/jobs/<short>/state.json with:

    {
      "template": "bg",
      "backend": "daemon",
      "sessionId": "<uuid>",
      "cwd": "<cwd-the-daemon-picked-for-this-dispatch>",
      ...
    }
  4. From a terminal in the same cwd (or with --cwd <that-path>):

    claude agents
    # or
    claude agents --cwd <cwd-from-state.json>
  5. The TUI list does not include any of the FleetView-dispatched sessions, even though their cwd matches the scope.

Expected behavior

claude agents should enumerate all local-daemon-managed sessions whose cwd matches the current scope, regardless of whether they originated from:

  • a foreground CLI session sent to /bg,
  • claude --bg "<task>", or
  • a FleetView dispatch from the mobile app / browser (daemon-fleet pool).

These are all "running Claude Code sessions on this machine" — the user-facing distinction between "how they were started" should not gate visibility.

Actual behavior

Only the first two surface. FleetView-dispatched sessions are present on disk and reachable by the mobile app, but the TUI ignores them. There is no local UI that gives a unified view.

Workaround

Walk the daemon's job state directly:

ls -t ~/.claude/jobs/*/state.json \
  | xargs -I{} jq -r '[.state, .daemonShort, .cwd, .name] | @tsv' {} \
  | column -t -s $'\t'

This gives the same data the mobile app shows (state, short id, cwd, auto-title) and confirms the sessions exist locally — they just aren't routed into the Agent View list.

Suggested fix

In whatever data source claude agents uses to populate the list, additionally enumerate ~/.claude/jobs/*/state.json entries with backend: "daemon" (or merge the daemon's fleet registry into the same source). Apply the existing --cwd filter as a post-step so the user-facing scoping semantics are unchanged.

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…

FAQ

Expected behavior

claude agents should enumerate all local-daemon-managed sessions whose cwd matches the current scope, regardless of whether they originated from:

  • a foreground CLI session sent to /bg,
  • claude --bg "<task>", or
  • a FleetView dispatch from the mobile app / browser (daemon-fleet pool).

These are all "running Claude Code sessions on this machine" — the user-facing distinction between "how they were started" should not gate visibility.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING