Skip to content

A produced image opens a raw Command failed: open … dialog: the path is this Mac's chats folder, where the file was never written #761

Closed

Description

@olibaron

What happens

In conversation c/06b3b0de-5252-4c75-872c-3d5c769a866d (cropping a Rainbow High product photo into white-bordered 5x7s), clicking the cropped image's produced-file entry in the Mac desktop app raises:

Couldn't open file

path open failed: path open failed: Command failed: open
/Users/elizabethtrejo/.aeven/chats/Rainbow_High_Set…
The file
/Users/elizabethtrejo/.aeven/chats/Rainbow_High_Set…
does not exist.

Cancel and Retry only. Retry repeats the same failure. The crops themselves render in the transcript right above, so a readable copy exists; only the file entry cannot reach one.

Cause

Three defects stack, and the second is the one the reader hits.

  1. The prefix is applied twice. The Host wraps the failure — packages/api/session-controller/src/index.ts:490, path open failed: ${message} — and the client wraps the result again at packages/client/ui-chat/src/client/apply.ts:178. openFailureMessage (packages/client/ui-chat/src/client/chat/ChatView.tsx:189) prints the chain verbatim; the double prefix was already recorded as an accepted wart in .agents/notes/implemented/bug-fix/2026-08-18-tool-row-file-open-failure.md. On macOS the inner text is Node's execFile wrapper plus the open(1) stderr copy (packages/util/native-command/src/path-opener.ts:136), so the reader is shown an internal command line.

  2. Nothing checks that the file is here before handing the path to the OS. openProducedFile (packages/client/ui-deliverables/src/client/file-links.ts:94) asks the Files sidebar to preview, then calls openFile(file.path) through the desktop opener. When the path is absent on this Host, open fails and this dialog is the whole of the feedback. A produced entry that does record a stored copy (attachmentId) is not preferred on that branch — only the no-desktop branch at :103 downloads the copy, though the transcript proves the copy is readable.

  3. The path is this device's binding of a conversation that ran on another one. It resolves to ~/.aeven/chats/<name>, this Mac's chats folder. A synced conversation acts in the receiving device's own workspace binding (2026-10-29), and files stay on the device that made them (2026-11-10). If the crops were written by the device that ran the turn — hosted Aeven Cloud — the Mac has the transcript and the produced rows but not the bytes, and the row still offers a local path.

One more path that lands in the same dialog: a prose link naming only the basename of a file produced in a subfolder. producedFileLinks finds the real produced path (file-links.ts:149) and then discards it, opening target.path when the match has no stored copy (:160) — so the file exists and the open still names <cwd>/<basename>.

Expected

  • A reader-facing sentence that names the file and the folder and offers what can actually be done: download the stored copy where one exists, open the conversation folder, Retry only when a retry can succeed.
  • No internal command line in the dialog: strip a repeated prefix and unwrap the Command failed: layer (or stop prefixing in the client and let the Host's text through once).
  • Where a produced entry records a stored copy, prefer the copy whenever the local path is missing, on every branch — the same rule the transcript's images already follow.
  • A link that names only the basename of exactly one produced path opens that produced path.

Acceptance

  • Clicking a produced file whose path is missing on this Host shows a readable message; path open failed: path open failed: Command failed: open … never reaches the dialog.
  • With a stored copy recorded, the click opens or downloads the copy instead of failing.
  • A basename link to a file produced in a subfolder opens the produced file, not <cwd>/<basename>.
  • Coverage: specs in packages/client/ui-deliverables/tests/file-links.client.spec.ts for the missing-path and basename cases, and a seeded-history snapshot of the missing-file dialog.

What I could not verify

Filed from the screenshot and the code; I have neither the transcript nor the Host's disk. Which of the two path shapes produced this exact ~/.aeven/chats/<name> — a file written on another device, or a basename link to a file in a subfolder — is unsettled. Both end in this dialog, and both fixes above cover it.

Activity

  1. added
    bug
    on Nov 23, 2026
  2. olibaron commented on Nov 23, 2026

    @olibaron
    ContributorAuthor

    Reopened: not fixed in Elizabeth's session (c/06b3b0de…) on chat.aeven.io. Produced-image tiles and the stored-copy fallback load from /api/attachment-file, which answers 404 ATTACHMENT_NOT_REFERENCED for a produced image, because the tool result cites that copy as an image, not a file. The tiles then fall back to plain file rows ("Created N files"), and downloading the copy fails the same way. Fix in progress.

  3. added 2 commits that reference this issue on Nov 23, 2026
  4. olibaron commented on Nov 23, 2026

    @olibaron
    ContributorAuthor

    Fixed on chat.aeven.io by #771 and #772, checked live in c/06b3b0de…:

    • All 5 produced-image sections are drawn as images (4 through the generated-image renderer, 1 from its stored copy); none falls back to a file row.
    • All 19 images in the conversation load.
    • Every file link opens the image in the Files sidebar, including the old links naming /Users/elizabethtrejo/.aeven/chats/… and the …_preview.jpg her desktop recorded only in its produced files.

    Why #762 did not fix it: /api/attachment-file refused image-cited copies (404), so every tile fell back to a row; the turn tail never received the image renderer (TurnTailNodeView builds its own owner); and #762 was never checked in this conversation before it shipped.

    Leaving this open until the desktop app ships the same client and route fixes in a release.

  5. added 3 commits that reference this issue on Nov 23, 2026
  6. olibaron commented on Nov 23, 2026

    @olibaron
    ContributorAuthor

    Fixed and verified live in c/06b3b0de… on chat.aeven.io and in the desktop app (dev build, fresh reload): every produced image is drawn like a generated image, all images load, no "Image not shown", and every file link (including the old /Users/elizabethtrejo/.aeven/chats/… ones and the …_preview.jpg) opens the image in the Files sidebar. Ships to desktops in v0.3.66-alpha (building now; it publishes when all six targets upload).

    PR Fix
    #762 Readable missing-file dialog (file + folder, Open folder, no internal command line); stored-copy fallback; basename links open the produced path
    #771 /api/attachment-file serves copies cited as images or only in produced files; produced images drawn through the conversation's renderer
    #772 The turn tail actually receives that renderer (TurnTailNodeView builds its own owner)
    #775 Reply images resolve to their stored copy before the Session binding exists (desktop); a produced-only copy is fetched from the account first
    #776 The unavailable-image note takes the image frame's 30px radius
    #778 Specs for the dialog, the stored-copy fallback, and basename links

    Why it took several rounds: #762 was checked with typecheck, build, and gates only; the image copies 404'd on the web and the tail never got the renderer. After the web was verified, the desktop still differed: it renders a synced conversation before its Session binding exists, so reply images fell back to paths this device lacks. Fixes are now verified on both the web and the desktop before a fix is called done.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions