Replies: 2 comments
|
Thanks for the very carefully isolated report — the variant table (subscription present/absent, sync/deferred/polling, detached control) is what made this answerable from source. I read the driver, the tool scheduler, and the session append path on Q3 — no, this is almost certainly not the
|
|
核实结论:崩溃是「steer 注入裸对象(无 source)」触发,不是 scheduler/Symbol 分裂;Q3 答案为否.
|
Uh oh!
There was an error while loading. Please reload this page.
Summary
Calling
agent.steer(...)from a plugin on an agent reference obtained from theagent/createdevent makes the tool layer fail for the rest of the run:The steered message is delivered and consumed (a second
turn/endappearsin the session log), but tool calls in that turn break. Plugin-driven steering
therefore looks like it works and then poisons the run.
A second, distinct error appears when steering synchronously from inside a
session/eventhandler:Environment
0.1.5-rc.1(latestdist-tag)dsh-base+dsh-headless) + a few third-party pluginshttps://api.deepseek.com/v1)What works (verified, in case it narrows things down)
agent/createdfires under a headless run and its payload carries a usable agent:payloadKeys: ["agent"], andsteer/followup/inject/whenIdleare all functions.ctx.on("session/event", (session, event) => …)subscribes fine andturn/endis observable.turn/start/turn/endare session events (session.append(...)), so subscribing via barectx.on("turn/start")never fires. (Not a bug — just easy to get wrong; may deserve a doc note.)Reproduction
Attach this plugin to a headless profile, then run any task that uses a tool:
Result for all three variants:
Isolation
session/eventsession append cannot reenter while another append is being publishedsetImmediate(out of publish frame)turn/end), tools then breakSo the crash tracks the
steer()call itself, not the subscription and not thedeferral mechanism.
--dump-configand boot are clean in every case, i.e. thisis not a plugin-loading problem.
Hypothesis
steer()re-enters the agent step loop while the tool scheduler's state ismid-publish, so the scheduler resolves a tool record that is
undefined(
reading 'kind'is the signature of a failed scheduler-record lookup). Thisresembles the earlier tool-layer failures where a second copy of
@deepseek-ai/dsh-toolssplits the module-localSymbolused as the schedulerkey (the #1337 / #4640 / #4667 family) — as if the injected step resolves the
scheduler against a different instance than the one the running turn publishes to.
Impact
Any plugin-driven steering is unusable, which is the natural way to correct a
long-running headless task without running a resident Host. Users are left with
only cancellation/timeout, losing the ability to redirect a task mid-flight.
Requests
steer()safe to call from a plugin callback, or document the requiredcall context (which frame/lifecycle it must run in).
session/event, raise a clearerror at the
steer()call site instead of corrupting the tool layer forthe remainder of the run.
Symbol-split family, does theSymbol.forfix cover thesteer path?
Deterministic locally (5/5 runs). Minimal repro plugins and the JSONL logs showing
the steered message being consumed immediately before the tool failure are
available if useful.
All reactions