Skip to content

feat: add current-session steer command#76934

Merged
steipete merged 1 commit intomainfrom
codex/current-session-steer-command
May 3, 2026
Merged

feat: add current-session steer command#76934
steipete merged 1 commit intomainfrom
codex/current-session-steer-command

Conversation

@steipete
Copy link
Copy Markdown
Contributor

@steipete steipete commented May 3, 2026

Summary

  • Add top-level /steer <message> and /tell <message> handling for the current session active run.
  • Keep child-run steering under /subagents steer <id|#> <message>.
  • Update the slash command registry, docs, changelog, and focused command tests.

Verification

  • pnpm test src/auto-reply/reply/commands-steer.test.ts src/auto-reply/reply/commands-subagents-routing.test.ts src/auto-reply/reply/commands-subagents-steer.test.ts src/auto-reply/commands-registry.test.ts
  • pnpm exec oxfmt --check --threads=1 src/auto-reply/reply/commands-steer.ts src/auto-reply/reply/commands-steer.runtime.ts src/auto-reply/reply/commands-steer.test.ts src/auto-reply/reply/commands-handlers.runtime.ts src/auto-reply/reply/commands-subagents/shared.ts src/auto-reply/reply/commands-subagents-dispatch.ts src/auto-reply/reply/commands-subagents-routing.test.ts src/auto-reply/reply/commands-subagents-steer.test.ts src/auto-reply/commands-registry.shared.ts
  • git diff --check
  • pnpm check:docs
  • Testbox tbx_01kqqw2v7dnhcycta1f2yhwexe: pnpm check:changed passed (syncDelegated=true, exit 0, 1m41s total)

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M maintainer Maintainer-authored PR labels May 3, 2026
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 3, 2026

Codex review: needs maintainer review before merge.

Summary
The PR adds top-level /steer <message> and /tell <message> handling for the current session active run while keeping child-run steering under /subagents steer <id|#> <message>.

Reproducibility: not applicable. This is a new command feature rather than a reported bug; the review path is static diff inspection plus the focused command tests listed in the PR body.

Next step before merge
No ClawSweeper repair job is needed because the review found no narrow defect to fix; the next step is ordinary maintainer review and merge gating.

Security
Cleared: The diff only touches command routing, tests, docs, and changelog, with no dependency, workflow, package, script, permission, or secret-handling changes.

Review details

Best possible solution:

Land this after normal maintainer approval and required checks if the product decision to repurpose top-level /steer for current-session runs is accepted.

Do we have a high-confidence way to reproduce the issue?

Not applicable. This is a new command feature rather than a reported bug; the review path is static diff inspection plus the focused command tests listed in the PR body.

Is this the best way to solve the issue?

Yes. The proposed implementation is narrow: it reuses the existing active-run registry and queueing APIs, leaves child-run steering under subagent dispatch, and updates the registry/docs/tests for the changed command contract.

What I checked:

  • Top-level handler registration: The PR imports handleSteerCommand and places it before handleSubagentsCommand, so /steer is claimed by the current-session command path before subagent routing. (src/auto-reply/reply/commands-handlers.runtime.ts:57, a76acf95acfd)
  • Current-session steering implementation: The added handler parses /steer and /tell, checks command authorization, resolves the current target session key, refuses idle sessions, and queues guidance with steeringMode: "all" and debounceMs: 0. (src/auto-reply/reply/commands-steer.ts:67, a76acf95acfd)
  • Existing active-run API supports the approach: Current main already exposes active embedded run resolution and queueing; queueEmbeddedPiMessage returns false when there is no accepting active run, matching the PR's idle/rejection handling. (src/agents/pi-embedded-runner/runs.ts:66, 5355ef0f080b)
  • Subagent routing split is explicit: Current main routes /steer and /tell through subagent dispatch; the PR removes those top-level aliases from subagent dispatch and leaves steer as a /subagents action. (src/auto-reply/reply/commands-subagents/shared.ts:169, 5355ef0f080b)
  • Registry and docs are updated: The command registry changes steer from target-plus-message to message-only while preserving /tell as a text alias; the PR also updates slash-command docs, subagent docs, changelog, and focused tests. (src/auto-reply/commands-registry.shared.ts:512, a76acf95acfd)
  • Validation context: The PR body reports focused command tests, targeted formatting, git diff --check, and Testbox pnpm check:changed passing for the head SHA. (a76acf95acfd)

Likely related people:

  • steipete: Recent main history shows substantial command-registry, subagent helper, and active steering work in the same surfaces affected by this PR. (role: recent maintainer and adjacent feature owner; confidence: high; commits: 2805bbd3d7a9, 30a2b3049ae0, bf67976ea58e; files: src/auto-reply/commands-registry.shared.ts, src/auto-reply/reply/commands-subagents/shared.ts, src/agents/pi-embedded-runner/runs.ts)
  • vincentkoc: Recent commits touched embedded runner import/lifecycle behavior that the new current-session steering command depends on. (role: adjacent embedded-run maintainer; confidence: medium; commits: 4a30ae182b6a, ec1f72b6c58f; files: src/agents/pi-embedded-runner/runs.ts)
  • drobison00: Recent merged work changed subagent focus scope in the same subagent command helper area. (role: adjacent subagent routing maintainer; confidence: medium; commits: c1a42dce86cb; files: src/auto-reply/reply/commands-subagents/shared.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 5355ef0f080b.

@steipete steipete marked this pull request as ready for review May 3, 2026 20:59
@steipete steipete force-pushed the codex/current-session-steer-command branch from a76acf9 to 27c3633 Compare May 3, 2026 21:31
@steipete steipete merged commit 3e80805 into main May 3, 2026
114 checks passed
@steipete steipete deleted the codex/current-session-steer-command branch May 3, 2026 21:37
@steipete
Copy link
Copy Markdown
Contributor Author

steipete commented May 3, 2026

Landed via rebase onto main.

  • Local gate: pnpm test src/auto-reply/reply/commands-steer.test.ts src/auto-reply/reply/commands-subagents-routing.test.ts src/auto-reply/reply/commands-subagents-steer.test.ts src/auto-reply/commands-registry.test.ts; targeted oxfmt --check; git diff --check; pnpm check:docs
  • Testbox gate: tbx_01kqqw2v7dnhcycta1f2yhwexe ran pnpm check:changed and passed
  • Source PR head: 27c3633
  • Landed commit: 3e80805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant