You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: plugin input delivered only at a session's next run start (synthetic without step-counter reset) #194
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
A way for a server plugin to admit input that is delivered only at the start of a session's next
run: never at a later step of a run in progress, and never as a run's own input.
Why. A plugin that keeps model-visible state (counts, limits, routing state) current has to
deliver it as durable history. A transient message that a context hook inserts on every request
makes each step an edit on transports that keep their own copy of the conversation, such as claude-agent: forks, then full checkpoint rebuilds. ctx.session.synthetic is the right
durable channel, but neither delivery mode fits:
delivery: "steer" is promoted at the next step boundary, and promoting any steer resets the
run's step counter (packages/core/src/session/runner/llm.ts:202, if (promoted > 0) step = 1;
the limit is checked at :253). Input admitted during a run therefore restarts the agent's steps allowance.
delivery: "queue" is promoted as a run's own input, so it starts a model step of its own
(packages/core/src/session/inbox.ts, promote with the "input" scope).
So a plugin can only admit while the session is idle, judged by Session.Info.time.busy against time.idle. That read and the admission are not atomic: a run that passes its entry boundary in
between receives the steer at its second step. Plugins cannot cancel an inbox item, so the plugin
has no way to close that window.
Request, any one of:
a delivery mode, or a synthetic option, that is promoted only at an entry boundary, together
with whatever input starts that run;
or: promoting plugin-admitted synthetic steers leaves the step counter alone;
or: an atomic "admit if idle" for synthetic.
Each of these keeps plugin state current as append-only history, which history-syncing transports
need, and leaves the steps limit intact.
Version: 2.2.5. The cited lines are unchanged on dev.
Triage test: this is what the bot would post. Posted by a script, not by the bot.
Thanks for the detailed write-up! You're asking for a way to admit plugin synthetic input that is delivered only at the start of a session's next run. That keeps plugin state as append-only history without restarting the agent's steps allowance, which the current steer and queue modes can't do.
I checked the code on dev and it matches what you describe. Promoting a steer resets the step counter in runner/llm.ts, and queued input starts a step of its own. Plugins also can't make the idle check and the admission atomic, or cancel an inbox item, so this can't be built as a plugin today. It needs a change to the plugin API, such as one of the three options you list.
I didn't find any existing issue asking for this. Maintainers will consider it.
Activity
neriousy commentedon Nov 10, 2026
Triage test: this is what the bot would post. Posted by a script, not by the bot.
Thanks for the detailed write-up! You're asking for a way to admit plugin
syntheticinput that is delivered only at the start of a session's next run. That keeps plugin state as append-only history without restarting the agent'sstepsallowance, which the currentsteerandqueuemodes can't do.I checked the code on
devand it matches what you describe. Promoting a steer resets the step counter inrunner/llm.ts, and queued input starts a step of its own. Plugins also can't make the idle check and the admission atomic, or cancel an inbox item, so this can't be built as a plugin today. It needs a change to the plugin API, such as one of the three options you list.I didn't find any existing issue asking for this. Maintainers will consider it.