[BUG] Background task's output file not accessible
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 Claude starts a new background task, you can view the task's output, but Claude doesn't reveal the file name where the output is visible until there is enough that not all of it can be shown in the background task viewer.
This is frustrating if I want to follow the output in another terminal to see what's going on. I have to wait for enough output to be generated and then view the task to copy/paste the file name (and then manually fix it up because Claude "helpfully" formats it across multiple lines) or run ls -lart /private/tmp/claude-502/-Users-me-long-project-directory-name/tasks/ and pick up the last one (assuming there is only one; more trial and error if not).
What Should Happen?
Display the file path (or maybe just the task ID) by default in the "Shell details" when you view the background task.
Error Messages/Logs
(N/A)
Steps to Reproduce
- Persuade Claude Code to run a background task
- Press the down arrow to the task and hit "Enter to view tasks"
- If you are lucky, you see "Showing last 10 lines of 1234567 total. Full output: (newline) /private/tmp/claude-502/-Users-me-long-path-to-pro (newline) ject-directory/tasks/abcd0123.output
- Attempting to copy/paste the long path is actively discouraged by the TUI which jumps around and squirms in anguish if you try to select some of its text. If you are lucky again, you can copy the path with the newlines and some annoying line-drawing characters interspersed which you then have to clean up manually.
At step 3, if you are not so lucky, there is no indication that the output file has been created or where.
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.29 (Claude Code)
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
If the output path was well documented, perhaps it would be enough if the UI just displayed the ID of the background task (abcd0123 in my example) and you could take it from there.
This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗