SendUserFile renders relative path chip in terminal sessions — file not locatable, no content shown

Status Open
Maintainer reply None cached
Activity 1 comment · opened Jul 27, 2026

Problem

In a pure terminal/TUI session (this happened in a background job session), SendUserFile renders as a compact chip in the transcript:

[file] .agent-runs/<run-id>/BEFORE_AFTER.md (81.2KB)

Two things make this unusable in a terminal context:

  1. The path shown is whatever string was passed to the tool, not the resolved path. The agent called SendUserFile with a path relative to the session cwd. The chip displays that relative string verbatim. The user's shell was at ~, so cat .agent-runs/<run-id>/BEFORE_AFTER.md returned No such file or directory and there was no way to tell from the transcript where the file actually is. The harness knows the session cwd and could resolve it.
  1. The chip has no affordance to open or preview the content, and nothing is visibly "sent" anywhere. In the desktop/IDE surfaces the chip is at least a UI element; in a terminal session it is inert text. The net effect is that the feature reads as broken — the agent reports success, the user sees a filename they cannot locate and cannot read.

Repro

  1. Start a Claude Code CLI session in a terminal (reproduced in a background job session on Linux/WSL2).
  2. Have the agent call SendUserFile with a relative path, e.g. .agent-runs/<run-id>/BEFORE_AFTER.md.
  3. Transcript shows [file] .agent-runs/<run-id>/BEFORE_AFTER.md (81.2KB).
  4. From a different cwd (e.g. ~), cat .agent-runs/<run-id>/BEFORE_AFTER.mdNo such file or directory.
  5. No preview, no inline content, no way to open the file from the chip.

Expected

  • The chip should always display the resolved absolute path, regardless of what was passed to the tool. Path resolution is unambiguous server-side (the harness owns the cwd), so a relative-path argument should never surface to the user as a relative path.
  • In terminal sessions, delivered files should be viewable: either inline the content (at least for text files, possibly truncated with the absolute path for the rest), or emit a clearly labelled, copy-pasteable absolute path so cat/$EDITOR works in one step.
  • Ideally, if a terminal session genuinely cannot deliver a file anywhere the user can consume it, the tool result should say so rather than reporting plain success.

Related (not duplicates)

  • #58318 — VS Code extension chip should show full path (closed/stale, different surface).
  • #78649 — desktop/macOS open + copy-path affordances for delivered files (desktop UI, image-review focused).

This report is specifically about the terminal/TUI surface and about the displayed path being the unresolved argument rather than the absolute path.

Environment

  • Claude Code CLI on Linux (WSL2)
  • Terminal session, running as a background job (no desktop/IDE surface attached)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗