Skip to content

fix(eve): degrade missing attachment bytes on resume instead of failing the turn#325

Open
serhiizghama wants to merge 2 commits into
vercel:mainfrom
serhiizghama:fix/attachment-resume-missing-bytes
Open

fix(eve): degrade missing attachment bytes on resume instead of failing the turn#325
serhiizghama wants to merge 2 commits into
vercel:mainfrom
serhiizghama:fix/attachment-resume-missing-bytes

Conversation

@serhiizghama

Copy link
Copy Markdown

Fixes #276. Resuming a durable session whose history contains an inbound file attachment fatally fails when the staging sandbox has been torn down between turns — an ephemeral backend means the bytes behind a historical eve-sandbox: ref are gone, and hydrateMessageContent threw on the missing read, so the turn ended in session.failed and the bot never replied.

Hydration now degrades a missing ref to a text part ("Attached file <path> (<type>) is no longer available in this session.") and logs a warning, instead of throwing. The run continues, and the model is told the attachment is unreachable rather than chasing a path that no longer resolves. I gave it a distinct message from the normal non-inlinable text reference on purpose — on resume the path really is gone, so pointing the model at it would just invite a failed read.

This only affects the resume case where the bytes are already missing; a freshly staged attachment in the current turn still hydrates as before.

Tests: rewrote the existing "missing file" case to assert the degrade (the leading text survives, the file ref becomes the unavailability notice, no file part reaches the model) and added a regression that stages an image into one sandbox and hydrates the resulting ref against a fresh one — the same shape as a resume after teardown — and asserts the turn survives. Reverting the fix fails both. Full attachment-staging integration + unit suites green, typecheck/oxlint/oxfmt/guard:invariants clean, changeset (patch).

…ng the turn

Signed-off-by: serhiizghama <zmrser@gmail.com>
…esume

Signed-off-by: serhiizghama <zmrser@gmail.com>
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@serhiizghama is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resuming a session with a prior file attachment fatally fails (Sandbox-ref FilePart references missing file)

1 participant