anthropics / anthropics/claude-code
[BUG] Claude Desktop: finished sub-agent tasks show "No output captured." although the transcript exists on disk
- Vorherrschende Sprache
- Python
- Sterne
- 145k
- Forks
- 23.1k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
### Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
### What's Wrong?
When I run a sub-agent inside Claude Desktop and open its entry in the task panel after it finishes, the app just says "No output captured." It says the same thing when I come back to the session later from history. So I can never see what the sub-agent actually did.
But the output was captured. Claude Code writes the whole sub-agent conversation, every command and every result, to a file on disk: the task's `.output` file in the temp folder, and an identical copy at `~/.claude/projects///subagents/agent-.jsonl`. In my sessions these files are hundreds of KB.
The Desktop app simply never looks at that file for sub-agent tasks. It only reads output files for plain shell tasks and MCP monitors. For everything else it falls back to "No output captured." as soon as the task stops running. This is the code in the Desktop bundle that does it (`Claude.app/Contents/Resources/ion-dist/assets/v1/c360a9e1c-BhqEnXIC.js`):
```js
Hxe = new Set(["local_bash","monitor_mcp"])
function Qxe({task:e, ..., canReadOutputFile:s}) {
const r = Hxe.has(e.taskType ?? ""), // false for local_agent / local_workflow / remote_agent / in_process_teammate
o = r && !e.result && !!e.outputFile && s; // -> output-file query never enabled for agents
...
const l = "running" !== e.status;
return ... l ? "No output captured." /* i18n id DueauMIubu */ : null
```
Meanwhile the CLI sets `outputFile` for every task type (`kw()` -> `outputFile: l_(id)`, `l_` = `/claude-///tasks/.output`). The string "No output captured" does not occur in the CLI binary at all; this is Desktop-only.
Related, not duplicates: #77510 (resumed agent keeps Completed badge / raw resume JSON), #76669 (FR: live tail of subagent output), #81930 (iOS shows raw Task metadata), #5974 (closed not-planned, TUI). The richer "show the activity log" ask is filed separately as #88622.
### What Should Happen?
When a transcript / output file exists, do not say "No output captured." Show the transcript (or a tail of it, as is already done for `local_bash` tasks), or at least say "Transcript not shown here" with a link / open action for the `.output` or `subagents/agent-.jsonl` file. Same when the session is reopened from history.
### Error Messages/Logs
```text
No error. UI text: "No output captured."
$ wc -c ~/.claude/projects///subagents/agent-a6f0e60fbc811dc79.jsonl
271493
$ cmp ~/.claude/projects///subagents/agent-a6f0e60fbc811dc79.jsonl \
/private/tmp/claude-502///tasks/a6f0e60fbc811dc79.output && echo IDENTICAL
IDENTICAL
```
### Steps to Reproduce
1. Claude Desktop -> Claude Code session; ask for something that spawns a sub-agent ("use a sub-agent to audit X").
2. Let the sub-agent finish.
3. Expand the sub-agent's task entry in the task panel. Observe "No output captured."
4. Close and reopen the session from history; expand again. Same text.
5. Confirm the transcript exists: `ls -la ~/.claude/projects///subagents/`.
### Claude Model
Not sure / Multiple models
### Is this a regression?
I don't know
### Last Working Version
_No response_
### Claude Code Version
2.1.237 (Desktop-managed, `~/Library/Application Support/Claude/claude-code/2.1.237`); Claude Desktop 1.34493.1 (current per RELEASES.json, 2026-08-21). Latest CLI 2.1.239 changelog has no agent-view / desktop-output changes; the defect is in the Desktop bundle.
### Platform
Anthropic API (claude.ai login via Claude Desktop)
### Operating System
macOS (Darwin 25.4.0, arm64)
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start with the Desktop bundle at Claude.app/Contents/Resources/ion-dist/assets/v1/c360a9e1c-BhqEnXIC.js and inspect Qxe and the Hxe task-type set. Reproduce with a completed sub-agent, then verify how local_bash output is loaded versus agent output. Done means an existing agent transcript is displayed, or the UI provides the stated transcript fallback or open action, including after reopening history.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- desktop
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100