feat: steer mid-turn prompts by default#77023
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: not applicable. this is a feature/config-surface PR, not a bug report. Source comparison shows current main still has the old steering-mode surface while the PR head implements the new default behavior. Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Land the central queue/runtime/schema migration only after the stale Codex harness docs are corrected, maintainers accept the default-steering behavior, and redacted real Telegram or gateway proof plus appropriate broad validation is attached. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature/config-surface PR, not a bug report. Source comparison shows current main still has the old steering-mode surface while the PR head implements the new default behavior. Is this the best way to solve the issue? Mostly yes, but not merge-ready: the PR changes the central queue resolver, runtime steering path, schema, doctor migration, and tests rather than a channel-specific workaround. It still needs the stale Codex harness docs fixed, real behavior proof, broad validation, and maintainer product approval. Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 40e8782400f6. |
ef463c6 to
1495bfb
Compare
|
Retracting this finding. Thanks for clarifying in #77023 (comment). I treated active subagent announcements like normal inbound user prompts, but I understand now that these are internal handoffs back into the active requester turn and are intentionally kept on the steering path regardless of Given that invariant, my previous P1 is not a blocker. The separate steering acceptance/rejection concern is covered by |
|
Thanks for rechecking. We are intentionally keeping active subagent announcements on the steering path regardless of Those queue modes are user-prompt semantics. A subagent announcement is an internal handoff back into the active requester turn, so skipping steering would reintroduce the alternate delivery/queue behavior this PR is meant to remove. I added an inline note at The acceptance/rejection issue from the later review is handled separately in 9ed10de: announce steering now awaits the async steering outcome, so runtime rejection is no longer reported as delivered. |
6eb49b8 to
e66c962
Compare
|
Maintainer verification for rebased head
GitHub checks on the rebased head:
Re-review progress:
|
Summary: - Default active-run queueing to steer while preserving explicit followup/collect modes. - Keep `/steer` fallback behavior and migrate retired queue steering config. - Await Codex app-server steering acceptance so rejected/aborted steering can fall back safely. - Route active subagent announcements through intentional acceptance-aware steering, with legacy queue helpers deprecated for delivery decisions. Verification: - git diff --check - rg -n "^(<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|)" CHANGELOG.md docs src extensions || true - pnpm test src/agents/subagent-announce-dispatch.test.ts src/agents/subagent-announce-delivery.test.ts src/agents/pi-embedded-runner/runs.test.ts src/agents/subagent-announce.format.e2e.test.ts src/agents/subagent-announce.test.ts - pnpm test src/auto-reply/reply/commands-steer.test.ts src/auto-reply/reply/queue/settings.test.ts src/auto-reply/reply/queue-policy.test.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts extensions/codex/src/app-server/run-attempt.test.ts -- -t "queued steering|explicit all-mode steering|flushes pending default queued steering|rejects queued steering|resolveActiveRunQueueAction|resolveQueueSettings|handleSteerCommand" Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Summary: - Default active-run queueing to steer while preserving explicit followup/collect modes. - Keep `/steer` fallback behavior and migrate retired queue steering config. - Await Codex app-server steering acceptance so rejected/aborted steering can fall back safely. - Route active subagent announcements through intentional acceptance-aware steering, with legacy queue helpers deprecated for delivery decisions. Verification: - git diff --check - rg -n "^(<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|)" CHANGELOG.md docs src extensions || true - pnpm test src/agents/subagent-announce-dispatch.test.ts src/agents/subagent-announce-delivery.test.ts src/agents/pi-embedded-runner/runs.test.ts src/agents/subagent-announce.format.e2e.test.ts src/agents/subagent-announce.test.ts - pnpm test src/auto-reply/reply/commands-steer.test.ts src/auto-reply/reply/queue/settings.test.ts src/auto-reply/reply/queue-policy.test.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts extensions/codex/src/app-server/run-attempt.test.ts -- -t "queued steering|explicit all-mode steering|flushes pending default queued steering|rejects queued steering|resolveActiveRunQueueAction|resolveQueueSettings|handleSteerCommand" Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Summary: - Default active-run queueing to steer while preserving explicit followup/collect modes. - Keep `/steer` fallback behavior and migrate retired queue steering config. - Await Codex app-server steering acceptance so rejected/aborted steering can fall back safely. - Route active subagent announcements through intentional acceptance-aware steering, with legacy queue helpers deprecated for delivery decisions. Verification: - git diff --check - rg -n "^(<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|)" CHANGELOG.md docs src extensions || true - pnpm test src/agents/subagent-announce-dispatch.test.ts src/agents/subagent-announce-delivery.test.ts src/agents/pi-embedded-runner/runs.test.ts src/agents/subagent-announce.format.e2e.test.ts src/agents/subagent-announce.test.ts - pnpm test src/auto-reply/reply/commands-steer.test.ts src/auto-reply/reply/queue/settings.test.ts src/auto-reply/reply/queue-policy.test.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts extensions/codex/src/app-server/run-attempt.test.ts -- -t "queued steering|explicit all-mode steering|flushes pending default queued steering|rejects queued steering|resolveActiveRunQueueAction|resolveQueueSettings|handleSteerCommand" Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Summary: - Default active-run queueing to steer while preserving explicit followup/collect modes. - Keep `/steer` fallback behavior and migrate retired queue steering config. - Await Codex app-server steering acceptance so rejected/aborted steering can fall back safely. - Route active subagent announcements through intentional acceptance-aware steering, with legacy queue helpers deprecated for delivery decisions. Verification: - git diff --check - rg -n "^(<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|)" CHANGELOG.md docs src extensions || true - pnpm test src/agents/subagent-announce-dispatch.test.ts src/agents/subagent-announce-delivery.test.ts src/agents/pi-embedded-runner/runs.test.ts src/agents/subagent-announce.format.e2e.test.ts src/agents/subagent-announce.test.ts - pnpm test src/auto-reply/reply/commands-steer.test.ts src/auto-reply/reply/queue/settings.test.ts src/auto-reply/reply/queue-policy.test.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts extensions/codex/src/app-server/run-attempt.test.ts -- -t "queued steering|explicit all-mode steering|flushes pending default queued steering|rejects queued steering|resolveActiveRunQueueAction|resolveQueueSettings|handleSteerCommand" Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Summary: - Default active-run queueing to steer while preserving explicit followup/collect modes. - Keep `/steer` fallback behavior and migrate retired queue steering config. - Await Codex app-server steering acceptance so rejected/aborted steering can fall back safely. - Route active subagent announcements through intentional acceptance-aware steering, with legacy queue helpers deprecated for delivery decisions. Verification: - git diff --check - rg -n "^(<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|)" CHANGELOG.md docs src extensions || true - pnpm test src/agents/subagent-announce-dispatch.test.ts src/agents/subagent-announce-delivery.test.ts src/agents/pi-embedded-runner/runs.test.ts src/agents/subagent-announce.format.e2e.test.ts src/agents/subagent-announce.test.ts - pnpm test src/auto-reply/reply/commands-steer.test.ts src/auto-reply/reply/queue/settings.test.ts src/auto-reply/reply/queue-policy.test.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts extensions/codex/src/app-server/run-attempt.test.ts -- -t "queued steering|explicit all-mode steering|flushes pending default queued steering|rejects queued steering|resolveActiveRunQueueAction|resolveQueueSettings|handleSteerCommand" Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
Summary
steerthe clear default active-run queue mode: normal inbound messages try to enter the active run instead of always waiting for a later turn.followupqueues each message for later,collectcoalesces compatible queued messages for one later turn, andinterruptaborts the active run for the newest message./steer <message>so user text is never swallowed: if same-turn steering is unavailable, rejected, compacting, idle, or throws, OpenClaw strips/steerand continues with<message>as a normal prompt.queue->steer,steer-backlog/steer+backlog->followup.Before
steer, legacyqueue,followup,collect,steer-backlog, andinterrupt.queuemeant serialized steering, whilesteermeant batched steering; the distinction was implementation-shaped and hard to explain.steer-backlogboth steered and preserved the same message for a later followup, which could look like duplicate handling on streaming surfaces./steer <message>depended on same-turn steering succeeding; some fallback paths could leave the command body in an unsafe/unclear state instead of reliably treating<message>as a normal prompt.followup/collectas fallback behavior, which made it unclear whether users could still queue by default.After
steer: default. Try to inject normal inbound messages into the active run; if the runtime cannot accept steering, wait for the active run to finish and run the prompt later.followup: do not steer; queue each message for a later turn after the active run ends.collect: do not steer; queue compatible messages and run one coalesced later turn after the quiet window.interrupt: abort the active run and start the newest message./queue steercontrols future normal inbound messages./steer <message>is an explicit one-off command and works independently of the stored/queuemode./steer <message>never drops the message text: when steering cannot happen,<message>continues as a normal prompt.Verification
pnpm test src/auto-reply/reply/queue/settings.test.ts src/auto-reply/reply.directive.parse.test.ts src/auto-reply/reply/directive-handling.queue-validation.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts src/auto-reply/reply/agent-runner.media-paths.test.ts src/commands/doctor/shared/legacy-config-migrate.test.ts src/config/config-misc.test.ts src/config/schema.help.quality.test.ts src/config/config.legacy-config-detection.accepts-imessage-dmpolicy.test.ts src/auto-reply/reply/commands-steer.test.ts src/auto-reply/reply/get-reply-inline-actions.skip-when-config-empty.test.ts src/auto-reply/reply/get-reply.before-agent-reply.test.tspnpm config:schema:checkpnpm config:docs:checkpnpm format:docs:checkgit diff --checkpnpm check:changed: run25785282586/tbx_01krg496nw9zq7axbjvywtcfsh, passed.