Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Failed Read of a missing image shows "Image unavailable" card instead of the error #38206

Closedtarasyarema(GitHub profile, opens in a new tab) opened this issue 1 comment

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. In a Claude thread, have the agent call Read on an image path that does not exist, for example Read /tmp/does-not-exist.png.
  2. Look at the tool row in the transcript.

Expected behavior

The row shows the failed tool result, for example the text Error: File does not exist., the same way any other failed Read does.

Actual behavior

The row renders as an image card that says "Image unavailable · does-not-exist.png". The error text is not visible. The user cannot tell that the tool call failed, and the card looks like a rendering or permission problem in T3.

What I found in statev2.sqlite for the item:

type:            dynamic_tool
toolName:        Read
status:          failed
viewedImagePath: /tmp/pbw-after-303b.png
output:          "Error: File does not exist. Note: your current working directory is ..."

So the projection already knows the item is failed and holds the error string. The web client still picks the image-card branch because viewedImagePath is set, and the asset lookup fails because there is no file.

This is adjacent to #27946 and #13138. Both are about Read rows that succeeded but look up viewedImagePath instead of the tool result. This one is simpler: the status is failed, so the image card should not be chosen at all. A guard like status !== "failed" on the image-card branch, falling back to the normal error output, would cover it.

Impact

Minor and cosmetic. It is common in screenshot loops: an agent runs a capture command that fails silently, then reads the expected path. In my run the agent noticed and retried. The user only sees a broken image placeholder with no explanation.

Version or commit

0.1.11-nightly.20261117.4825

Environment

macOS 26 (Darwin 25.6.0), T3 Code desktop app, Claude Code harness, claude-fable-5-1. Image path is outside the project workspace (/tmp).

  1. tanstack-source added labelsbug

  2. Confirming this also reproduces on the Antigravity harness (not Claude-only) in T3 Code 0.1.11 (macOS arm64).

    Reproduction

    1. An image-generator subagent generated an image in the parent session directory (.../brain/<parent-id>/11xuan5_logo_clean_1795324621154.jpg), but returned a misconstructed path using its own subagent ID (.../brain/<subagent-id>/11xuan5_logo_clean_1795324621154.jpg).
    2. The parent agent called Read on that nonexistent path (type: dynamic_tool, toolName: Read, status: failed), then located the real file and called Read again (status: completed).
    3. In the thread UI, the viewed-images strip rendered two cards side by side:
      • Left card: broken Image unavailable · 11xuan5_logo_clean_1795324621154.jpg (from the failed Read)
      • Right card: the valid image (from the second Read)

    So skipping status === "failed" in workEntryViewedImagePath (the minimal guard scope noted on #38219) would fix this across both Claude and Antigravity harnesses.

  3. juliusmarminge closed this

Sign in to join this conversation.