Repository navigation
Replies: 3 comments
|
Both source claims check out on 1. Two calls sit outside the guarded block, not one. In So a throw from either 2. 3. 4. On request 3, the honest answer is that I did not find the agent-scoped difference in the credential path — One thing that is worth having either way: the cause is reachable on the live error instance, so a plugin can surface it without waiting for core — wrap the response side of |
|
Thanks — this is a better reading of the code than the one in my report, and it made me re-verify everything against the released 0.2.1-rc.2 build rather than the tree at Confirmed on the released build
One correction to point 1, which turns out to matter The reproduction in my report sends So for this reproduction On the fixes
If it helps, I can run your |
|
Follow-up after instrumenting the boot path instead of only reading it. I built a temporary host plugin that reproduces the original conditions as closely as 0.2.1-rc.2 allows, ran it, then removed it and restored the profile byte-for-byte. What the probe did: inject only Results on the released 0.2.1-rc.2 build:
So the original failure does not reproduce on 0.2.1-rc.2 even when the agent is created at the earliest possible moment. That is a correction to my earlier reply, and probably to my own report's claim that the bug was still present on this build. One second candidate mechanism is now demonstrated rather than inferred: On your open questions:
Fix-wise this makes the diagnostics changes more valuable than picking a behaviour side: (1) append If it helps, I can attach the probe source and the full report, or run the same probe against 0.2.0-rc.2 if a build is available, to find where the behaviour diverges. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
An agent created programmatically through
ctx.agents.create({ sessionId, agentOptions, setup })publishes successfully, dispatches itsturn, assembles a complete and apparently correct request, and then every model attempt fails
with:
All 5 retries fail identically.
assistant/messageandusageare never emitted; the turn endswith
turn/end reason = { kind: 'error', error: { code: 'TRANSPORT' } }.An agent created by the built-in
subagenttool in the same process, on the same provider andmodel, works normally. So does the operator's own agent, at the same moment.
I believe I have traced the mechanism, and it has two parts: a diagnosability problem
(a non-
LlmErroris silently rewritten asTRANSPORT) and a behavioural problem (thecredential record is not resolved the same way for a dynamically created agent).
Environment
0.2.0-rc.2@deepseek-ai/dsh-agent-loop:0.2.0-rc.2@deepseek-ai/dsh-llm-deepseek:0.2.0-rc.2@deepseek-ai/dsh-deepseek-account-platform:0.2.0-rc.2v24.21.0deepseek-account/deepseek-flashThe mechanism
PlatformAuthErroris declared as:It extends
Error, notLlmError. The account provider'sresolveAuththerefore lets itpropagate untouched, and
dsh-llm-deepseek's request wrapper rewrites it:So a
PlatformAuthError("storage")becomes a bareTRANSPORTwhosecauseis never logged.resolveTokenhas exactly three outcomes, and only one of them producesTRANSPORT:undefined→ACCOUNT_SIGN_IN_REQUIRED(a clear, actionable error)TRANSPORTWe observe
TRANSPORT, notACCOUNT_SIGN_IN_REQUIRED, so the credential record is being reador parsed as the wrong kind for this agent:
(A)record.kind !== "grant", or(B)grant.safeParse(record.payload)fails.That also explains the timing:
step/start→ first failure is ~105 ms, far too fast for anetwork round trip. Nothing is ever sent.
Why this looks agent-scoped rather than global
The same credentials work for other agents at the same moment:
subagenttool childPONGon the same routesetuponly)ctx.agents.createrestrict+guard)ctx.agents.createA global credential-store failure would break all four rows. It breaks only the last two.
Reproduction
A host plugin that creates an agent in the agent scope. No tools are registered and no tool
restriction is applied — deliberately minimal.
Result: the session log contains
turn/start,step/start,system/message,user/message,request/header,request/context, then 6 ×assistant/attemptwith aTRANSPORTfinish,5 ×
llm/retry, andturn/end reason=error. Noassistant/message.A one-step experiment that would settle it
On one machine, at one moment:
If (1) succeeds and (2) fails, then the same credential resolves for one agent and not for the
other inside a single process, and the problem is unambiguously in agent-scoped credential
resolution.
Raw log evidence
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-account","model":"deepseek-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"maxTokens":true},"tools":[{"name":"load_workspace_dependencies","...":"..."}]},"reason":"initial"}} {"type":"request/context","data":{"provider":"deepseek-account","model":"deepseek-flash","contextWindow":1000000,"systemPromptUpdate":"in-history"}} {"type":"assistant/attempt","data":{"turn":1,"step":1,"stream":[{"type":"chunk","time":1792164009576,"chunk":{"type":"finish","reason":{"kind":"error","failure":{"message":"DeepSeek Messages transport failed","code":"TRANSPORT"}}}}]}} {"type":"turn/end","data":{"turn":1,"reason":{"kind":"error","error":{"message":"DeepSeek Messages transport failed","code":"TRANSPORT"}}}}What I already ruled out (each with a run experiment)
subagenttool on the same routectx.agents-created agents broken in general{{model}}prompt-variable error disappearedreasoningEffort/maxTokensinagentOptionsprovider+modelmaxTokens: 256000comes fromadapterDefaults, notagentOptions, so this experiment could not have altered anything — reported for completenesscwdvaluecwdwritten into the session headerpreset: full(no restriction at all)Requests
PlatformAuthErrorfromresolveTokenthe expectedsource of a
TRANSPORTfor a dynamically created agent? If so, why wouldcredentials.readRecord(KEY)return a non-grantrecord — or a payload that failsgrant.safeParse— for that agent but not for the operator's own agent in the same process?TRANSPORT'scausein the session log. It is currently discarded, soerror.codeis the only clue available and this entire class of failure is undiagnosable fromoutside. Logging the cause's
nameandmessagewould be enough.ctx.agents.create({ setup })lacks that asubagentchild has — an attachment resolver, a launch-environment snapshot, or a credentialscope acquired at creation rather than at request time?
Notes
look host-specific.
experiment.
``
Update: still present in 0.2.1-rc.2
Re-checked after upgrading to �.2.1-rc.2. All three parts of the mechanism are unchanged:
— dsh-deepseek-account-platform/lib/index.js:16.
esolveAuth is still awaited outside the ry that guards the request
— dsh-llm-deepseek/lib/index.js:2175, with the ry opening at 2176.
ew LlmError("DeepSeek Messages transport failed", "TRANSPORT", { cause: error })
— dsh-llm-deepseek/lib/index.js:2158-2159.
One related observation that may be the simplest fix: this build already ships an
errorChain()helper in @deepseek-ai/dsh-llm whose documented purpose is exactly to"surface the underlying failure instead of masking it". It is used at the request-extension
seam (dsh-llm-deepseek/lib/index.js:1369) but not at the Messages transport seam above,
so an auth failure reached through
esolveAuth still arrives as a bare TRANSPORT.
``
All reactions