Repository navigation
Downstream plugins cannot safely persist their own Session events #802
Replies: 4 comments
|
A concrete rc.6 consumer has now hit this exact failure in normal Web usage: Observed chain on
Plugin-side reports: This is a useful compatibility distinction for the proposed API: |
|
Confirming this is still live as of 2026-08-25 — a week after the comment above — with the latest release of the plugin ( Another real-world datapoint from normal Web usage:
One correction on the "blocked by a missing core API" framing, so the discussion stays accurate: the plugin-side fix is NOT blocked by the core. The envelope is constructed in the plugin's own code (
So there are two independent asks, and both matter:
The distinction you drew ("branch metadata, not a required surface operation") is exactly right for |
|
Adding a full specification to this thread rather than opening a new one, because #802 is exactly the problem we hit. We ran into it while building Skill-Compiler, an out-of-tree plugin that manages instruction packages. Its commands return structured outcomes — What we could verify in What is missing is a supported way to put the plugin's own validated facts into the durable log. The existing So we wrote down what a public contract would have to say, and put the full specification in a gist: Full technical specification: https://gist.github.com/designerbyron/04b51dd048213eecf575b3aba3b7e500 Beyond the append itself, the parts we found needed pinning down were:
Evidence boundaries. The restart reconstruction above was verified through log replay; checkpoint-based reconstruction was not verified independently of it. The test bundle was installed as a local profile dependency ( Questions for the maintainers
Happy to narrow any of this to whatever is actually useful here. The intent is a capability any out-of-tree plugin can use, not one shaped around ours. — Byron (Skill-Compiler, LifeCode) |
|
Follow-up after re-checking this against
So the gap is unchanged in rc.2, and the first comment's reproduction still applies as written. The specification in the gist has been updated to quote the current namespace rule, and records the rc.2 re-check as its own row in the evidence table. Nothing else in the design changed. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
DeepSeek Harness explicitly encourages out-of-tree plugins, and
SessionEventMapis declaration-merge extensible. A downstream plugin can therefore compile a call such assession.append('budget/exceeded', data). The resulting Session cannot be loaded again through the standard persistence coordinator, however, because the event type is absent from the repository-generatedKNOWN_SESSION_EVENT_TYPESandSession.append()exposes no way to set the envelope'signorable: truemarker.This leaves external plugins with two choices: avoid durable domain events, or write a Session that the next Harness process refuses to open.
Audited at commit
47f943859bef60e4160492346772ded9b24f765aand npm release0.1.0-rc.6.Concrete consumer
dsh-turn-budgetis an out-of-tree policy plugin using the publicagent/pre-stepandtools/pre-executeextension points. Step and token ceilings need a durable, log-only receipt naming the applied limit, observed usage, and enforcement point. That receipt is informational: a Harness build without the plugin may skip it safely becauseturn/endandtool/resultalready preserve the canonical execution outcome.The plugin currently omits that receipt because appending it would make the persisted Session unloadable.
Reproduction
The refusal is internally consistent:
packages/core/session/src/known-event-types.tsstates that downstream events are outside the generated set and that a registration surface is deferred until a consumer exists.packages/session/session-persistence/src/coordinator.tsrejects every unknown type withoutignorable: true.SessionEventpublicly declaresignorable?: true.Session.append()accepts surface metadata only for surface events and no options for log-only events, so a downstream producer cannot set the marker through the supported write API.Expected behavior
An out-of-tree plugin should have a supported way to write a log-only event with explicit forward-compatibility semantics:
ignorable: true, allowing Harness to load the Session when the plugin is absent.Minimal API direction
The smallest useful first step is an append option restricted to downstream log-only event types:
A complete required-event path can add an effect-scoped registry later:
The persistence coordinator would accept the generated repository vocabulary plus currently registered downstream types. Removing the plugin would restore fail-closed loading for its required events. Registration must activate before Session restoration and unwind with the plugin fiber.
Why this matters
Durable domain state is a core extension path in the architecture, while the contribution guide directs external code into independent plugins. Closing this gap enables ecosystem plugins for budgets, memory, workflow audit, evaluation, and governance without weakening the existing unknown-event refusal rule.
All reactions