Skip to content

[codex] Add mid-run /steer note injection#365

Draft
furukama wants to merge 1 commit intomainfrom
codex/steer-note-injection
Draft

[codex] Add mid-run /steer note injection#365
furukama wants to merge 1 commit intomainfrom
codex/steer-note-injection

Conversation

@furukama
Copy link
Copy Markdown
Contributor

What changed

This adds mid-run /steer delivery so a user can nudge an active run without interrupting the turn.

The command is now exposed through the gateway and TUI surfaces, queued against the active execution session, and consumed inside the container runtime.

Behavior

  • /steer queues a note for the currently running execution session.
  • During tool execution, queued steer notes are attached to the most recently completed tool result so the model sees them on the next iteration without starting a fresh user turn.
  • If the run reaches a no-tool checkpoint before another tool result exists, the note is delivered as a same-turn fallback user checkpoint instead of being dropped.
  • For interrupted partial tool batches, completed assistant tool calls are trimmed so the resumed model call remains protocol-valid.

Why

This is the main coworker-feel upgrade for active runs: direction can change mid-turn without forcing a restart.

I also aligned the primary runtime behavior with the Hermes reference in ~/examples/hermes-agent, which injects steering into the next completed tool result rather than using a synthetic user turn on the normal path.

Impact

  • Users can steer long-running work after a tool boundary.
  • Gateway sessions target the active execution session rather than only the user-facing session id.
  • TUI help and slash command surfaces now advertise /steer.

Validation

  • npm run lint
  • npm --prefix container run lint
  • npm run build
  • npx vitest run --configLoader runner --config vitest.unit.config.ts tests/gateway-request-runtime.test.ts tests/command-registry.test.ts tests/tui-slash-command.test.ts tests/tui-banner.test.ts tests/tui-slash-menu.test.ts tests/container.steering.test.ts

Notes

I did not run the full npm run test:unit suite locally. This machine is on Node v25.9.0, while the checked-in better-sqlite3 native binary in node_modules was built against an older ABI, so broader runtime-config and DB startup paths are unreliable here.

@furukama furukama force-pushed the codex/steer-note-injection branch from 9e4af2d to 2814c33 Compare April 20, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant