anthropics / anthropics/claude-code
[BUG] Cowork/Dispatch agent cannot see or reach local sessions on its own machine, and list_sessions returns empty instead of an access error
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
### Environment
- Claude desktop app 1.52386.6 on macOS 26.6.2 (Mac17,9), Claude Code CLI 2.1.266
- Local agent mode (Cowork/Dispatch) session running on the Mac, driven entirely from the Claude iOS app
- Several ordinary Code sessions running on the same Mac at the same time
### What happens
The Dispatch agent runs **on** the laptop, and is the only surface the phone can talk to, yet it has the narrowest visibility of anything on that machine. Asked to continue a task from an existing local session, it cannot see that session, cannot enumerate any local session, and cannot reach one by id.
`mcp__session_info__list_sessions` returns `No other sessions` while four local sessions are running on the same machine. `mcp__session_info__read_transcript` with a known-good session id returns `session not found`. Meanwhile an ordinary Code session on the same Mac lists the whole local registry without trouble, including the Dispatch session itself — so the visibility is not merely restricted, it is **inverted**: every other session can see Dispatch, and Dispatch can see none of them.
### Why the empty result is the worst part
`list_sessions` returning an empty list is indistinguishable from "there genuinely are no sessions". The agent has no way to tell that it is looking through a keyhole, so it reports "there are no sessions on your laptop" with full confidence, and then spends the rest of the conversation inventing explanations for why the user's session is missing — filters, device offline, session ended. An explicit "not permitted for this agent scope" would have ended the conversation in one line. This cost several hours on 2026-09-14.
### Adjacent inconsistency
Two overlapping tools disagree about what exists on the same machine, in the same minute:
- `mcp__dispatch__list_projects` → `No spaces configured`
- `mcp__dispatch__list_code_workspaces` → 15 repositories
### Adjacent gap: the channel is one-way
The Dispatch agent has `SendUserMessage` but no way to answer a cross-session message. When another session sent it a request, it received it, composed the answer, and had to deliver it to the **user's phone** instead of back to the sender, explicitly noting it had no channel to the requesting session. So session-to-session messaging reaches Dispatch but cannot come back.
### Steps to reproduce
1. Have two or more ordinary Code sessions running in the desktop app.
2. From the mobile app, ask the Cowork/Dispatch agent on that machine to list or continue one of them.
3. Observe `No other sessions`, and `session not found` even when the exact session id is supplied.
4. From one of the ordinary sessions, list local sessions — the Dispatch session is right there in the list.
### Expected
Either of these would be a coherent design; the current state is neither:
- The Dispatch agent can enumerate and resume sessions on the machine it is running on, which is what "continue my work from my phone" requires; or
- It cannot, and every affected tool says so explicitly — a permission/scope error rather than an empty list — so the agent can tell the user the truth instead of guessing.
### Related
- #76968 — Cowork sessions lost access to local scheduled tasks (scheduled-tasks MCP not exposed).
- #40179 — Dispatch responses generated but never delivered to clients.
- #94396 — mobile Code tab silently omits forked sessions; same evening, same "the session exists but nothing can reach it" class of problem.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue through mcp__session_info__list_sessions and mcp__session_info__read_transcript from a Cowork/Dispatch session while ordinary Code sessions are running. Compare those results with the ordinary session's local-session listing and the mcp__dispatch__list_projects and mcp__dispatch__list_code_workspaces responses. Done means session visibility and access are either supported consistently or unavailable tools return an explicit scope error, with the reported messaging direction addressed if it is in scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios
- Domain
- backend-api-design, cli
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100