bug: steering silently falls back to interrupt + replace for wrapped providers
What's broken
With Default send: Steer, sending a message to a working agent cancels its
turn and starts a new one instead of steering it. The tool call that was in
flight comes back as denied (The user doesn't want to proceed with this tool use) and the agent restarts from the new message.
It does not happen for every agent, which is what made it hard to pin down: two agents on the same daemon, same model, one steers and one replaces. The difference is the provider entry the agent was created under.
wrapSessionProvider (packages/server/src/server/agent/provider-registry.ts:441)
forwards a fixed list of the optional AgentSession methods, and
steerActiveTurn is not on that list, so a wrapped session does not have the
method at all. steerOrReplaceActiveTurn then takes its
{ status: "unavailable" } branch (agent-manager.ts:2448) and replaces the
turn (agent-manager.ts:2472).
Which sessions get wrapped is decided in createResolvedProviderClient
(provider-registry.ts:682-701):
- every custom provider, always, because its provider id differs from the base client's;
- the built-in
claudeprovider as soon as it hasprofileModelsoradditionalModelsin the config.
steerActiveTurn is implemented by the claude, codex and opencode providers
(providers/claude/agent.ts:2280, providers/codex-app-server-agent.ts:4193,
providers/opencode-agent.ts:3478), so all three lose steering once their
session is wrapped. I reproduced it on Claude Code; the wrapper is
provider-agnostic, so the other two go through the same path.
Steps to reproduce
In the app, on a self-hosted daemon:
- Add one entry under
additionalModelsfor theclaudeprovider in~/.paseo/config.json, then restart the daemon. - Create an agent and ask for something that runs for ~30 seconds.
- With Default send: Steer, send a second message while it is still working.
The turn is canceled and replaced. Remove the additionalModels entry, restart,
and repeat the same three steps: it steers.
In the repo, deterministically — provider-registry-wrap.test.ts already walks
the optional methods, so adding steerActiveTurn to it is the whole repro:
const OPTIONAL_AGENT_SESSION_METHOD_NAMES = [
+ "steerActiveTurn",
"listCommands",+ async steerActiveTurn(): Promise<SteerResult> {
+ this.recordedCalls.push("steerActiveTurn");
+ return { status: "accepted" };
+ }
+
async listCommands() {+ await wrapped.steerActiveTurn?.("keep going", { expectedTurnId: "turn-1" });
await wrapped.listCommands?.();npx vitest run src/server/agent/provider-registry-wrap.test.ts on main
(63923fd):
AssertionError: expected [ 'listCommands', 'setModel', …(7) ] to deeply equal [ 'steerActiveTurn', …(9) ]
- Expected
+ Received
@@ -1,7 +1,6 @@
[
- "steerActiveTurn",
"listCommands",
"setModel",
"setThinkingOption",
"setFeature",
"revertConversation",
❯ src/server/agent/provider-registry-wrap.test.ts:193:35
Test Files 1 failed (1)
Tests 1 failed (1)Adding steerActiveTurn: inner.steerActiveTurn?.bind(inner), to the wrapper
makes it pass. I confirmed the same one-line change against the installed 0.5.1
build on this machine: the same two agents that used to be interrupted now
steer.
The existing guard is right, but nothing runs it
That test file also carries a compile-time exhaustiveness check
(OPTIONAL_AGENT_SESSION_METHOD_NAMES /
_allOptionalAgentSessionMethodsAreCovered), and it does catch this. It just
never runs: tsconfig.server.json excludes src/**/*.test.ts, so
npm run typecheck does not see the file, and vitest transpiles without
typechecking. Pointing tsgo at the file with the test exclusion removed:
src/server/agent/provider-registry-wrap.test.ts(36,7): error TS2322: Type 'true' is not assignable to type 'never'.Bringing test files into npm run typecheck is more than a one-line change —
the same probe reports unrelated errors in that file's FakeSession — so it
seemed worth reporting separately rather than folding in.
Where did this happen
Daemon (CLI). Not tested on macOS desktop, iOS or Android.
Paseo version
0.5.1, and reproduced from source at 63923fd.
OS version
Ubuntu 24.04.4 LTS
Agent provider
Reproduced on Claude Code v2.1.241. The codex and opencode providers implement
steerActiveTurn too and are wrapped by the same code path, so they should be
affected the same way; I did not test them.
Source: getpaseo/paseo