Skip to content

Amp (ACP) screenshots show "Image unavailable" because Amp rewrites local image paths to auth-only ampcode.com URLs #39631

Open

Description

@GurrehmatO

What happened

In an Amp thread (ACP registry provider), the agent embedded local screenshots it had just taken with Markdown image syntax. Every image in the transcript shows "Image unavailable · ", even though the files exist on disk in the thread's worktree.

Diagnosis

Amp rewrites local image references in assistant text before T3 Code gets them. It uploads the file and replaces the link with an Amp attachment URL, and keeps the original path in a fragment:

https://ampcode.com/user-content/attachments/<hash>-1-ping-empty.png#amp-media-source=file%3A%2F%2F%2Fc%3A%2F...%2F.amp%2Fin%2Fartifacts%2F1-ping-empty.png

ampcode.com/user-content/attachments/... needs an Amp session. Fetched anonymously, it returns 401 application/json. The local file named in amp-media-source still exists.

In apps/web/src/components/ChatMarkdown.tsx (main @ 019e55b), classifyMarkdownImageSource classes this URL as Direct, and the Direct branch (around line 1674) renders it as a plain <img src>. The renderer has no Amp credential, so the load fails and the "Image unavailable" card appears. Nothing reads the amp-media-source fragment, so the local file is never used. A local path goes through the media-file resource (around lines 1620 and 1736) and would render fine.

Suggested fix: when an image URL has an amp-media-source=<file URL> fragment that points to a readable local file, render it through the existing media-file resource. Another option is to fall back to it when the remote load fails. This is related to #25922, where auth-gated remote images in chat also fail, but there the credential is a source control one the server already holds.

Steps to reproduce

  1. Start a thread with the Amp provider (ACP registry).
  2. Ask the agent to take a screenshot, save it in the workspace, and show it inline. It replies with ![shot](file:///C:/.../shot.png).
  3. Look at the rendered assistant message.

Expected: the screenshot renders.
Actual: "Image unavailable · shot". The stored message text holds https://ampcode.com/user-content/attachments/...#amp-media-source=file%3A..., and curl on that URL returns 401.

Version

T3 Code desktop Nightly 0.1.11-nightly.20261118.4877

Environment

Windows 11 (10.0.26300) x64, desktop app against its local server. Provider: Amp via acpRegistry (acpRegistry_amp), model anthropic/claude-sonnet-5-5.

Evidence

- Five screenshots in one assistant message all show "Image unavailable · <alt>". I'll attach a screenshot after filing.
- `curl -w "%{http_code} %{content_type}"` on one of the attachment URLs printed `401 application/json`.
- The file at the `amp-media-source` path exists (`Test-Path` printed True).
- The installed bundle (`server.asar`) has no handling for `amp-media-source`.

Related issues

#25922 (private GitHub images in chat show "Image unavailable")

Fix applied or workaround

Open the files from the worktree path in the files viewer or an editor.

Filed by

Drafted by Amp running in T3 Code (acpRegistry), using the T3 Code triage playbook.

Activity

  1. added
    via-triage
    on Nov 20, 2026
  2. GurrehmatO commented on Nov 20, 2026

    @GurrehmatO
    Author
    t3-image-unavailable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions