Repository navigation
Replies: 1 comment
Reproduced on 0.2.1-rc.2 through a second adapter, and the trigger was an ordinary cleanup tool call
The failure class depends on the adapterMost reports here have the
Observed in the session log — later text-only turns fail identically, and there is no {"type":"assistant/attempt","seq":3568,"data":{"turn":37,"step":1,"stream":[{"type":"chunk","chunk":{"type":"finish","reason":{"kind":"error","failure":{"message":"Attachment object is missing.","code":"UNKNOWN"}}}}]}}
{"type":"turn/end","seq":3570,"data":{"turn":37,"reason":{"kind":"error","error":{"message":"Attachment object is missing.","code":"UNKNOWN"}}}}Same local condition, two different wrong classifications: The trigger was a normal cleanup tool callThe session history contained a user-uploaded photo ( The next step of that turn failed, then every subsequent turn failed the same way, including text-only ones. The UI shows Recovery worked only out-of-band — and it proves the store contractA byte-identical copy of the upload was still on disk; its SHA-256 matched the attachment id exactly. Copying it back to Updates for the existing threads
What I would ask for
Question: given the note's ownership clause, would the team consider an external implementation of |
Uh oh!
There was an error while loading. Please reload this page.
Environment
@deepseek-ai/dsh0.2.0-rc.2deepseek-official/deepseek-flashSummary
If an attachment object is removed from the local attachment store
(
$DSH_HOME/attachments/v1/objects/<xx>/<sha256>) while a session stillreferences it, that session becomes permanently unusable: every subsequent
message fails with
Attachment object is missing.and no recovery is possiblewithout manually editing the session log.
Steps to reproduce
{"type":"image","attachment":{"attachmentId":"sha256:<hash>","mediaType":"image/jpeg",...}}rm "$DSH_HOME/attachments/v1/objects/<xx>/<hash>"Actual behavior
Every turn fails:
The session cannot be recovered. Turn N failed, and turns N+1, N+2 ... all fail
the same way, because every request replays the full history including the
dangling reference.
Expected behavior
A missing attachment should degrade gracefully: skip that image (or substitute a
text placeholder) and deliver the rest of the conversation. Losing one cached
image should not make a session unusable.
Root cause
@deepseek-ai/dsh-attachment-local/lib/index.js:610(and:746for fileattachments) throws unconditionally on
ENOENT:There is no degradation anywhere up the stack. Additionally
ATTACHMENT_NOT_FOUNDis not in the default
retryableCodes(
EMPTY_RESPONSE/RATE_LIMIT/SERVER/TIMEOUT/TRANSPORT), so thefailure is immediate and never retried — while the UI surfaces it as
DeepSeek Messages transport failed, which is misleading (it looks like anetwork problem).
Suggested fix
Catch
ATTACHMENT_NOT_FOUNDat request-projection time and drop the unreadableimage block for that request only. Verified locally on both providers:
dsh-llm-deepseek—prepareImages(~L1417)dsh-llm-pi-ai—prepareRequestImages/userContent/ budget lookupThe same idea, three sites:
prepareRequestImages: replace thePromise.all(...)with per-reftry/catch, keeping only successfully read versions in the map;userContent(case "image"): whenrequestImages.get(id)isundefined, push a text placeholder instead of touchingversion.data;requiredImageOffloadcallback:requestImages.get(id)?.bytes ?? 0.Notes
node --checkand a realimport()of both modules.is actively referencing no longer breaks the conversation.
projection so history replay does not attempt the read again at all.
All reactions