Skip to content

fix(matrix): let follow-ups steer active turns - #128907

Merged
jalehman merged 6 commits into
openclaw:mainfrom
bdjben:codex/fix-matrix-active-turn-steering
Aug 25, 2026
Merged

jalehman merged 6 commits into
openclaw:mainfrom
bdjben:codex/fix-matrix-active-turn-steering

Conversation

@bdjben

@bdjben bdjben commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

AI-assisted: yes.

Related: #110568, #119287

What Problem This Solves

Matrix users can send a follow-up while an agent turn is active, but two different admission paths prevented the existing steering machinery from behaving end to end:

  1. An ordinary Matrix follow-up could remain behind the active turn before configured queue policy had a chance to adopt it.
  2. An explicit /steer command could reach and change the active agent run while bypassing the normal prepared-turn persistence path. The command therefore did not create the durable user transcript row that session history and the Control UI project.

The second failure was observable on a real Matrix session: the explicit /steer changed the active Codex run, but the command itself was absent from the durable OpenClaw transcript and from the Control UI session view.

Why This Change Was Made

The Matrix handler already claims inbound events through the shared replay guard, but it did not carry that ownership into the shared turn-adoption lifecycle. Shared reply admission could therefore hold a second visible Matrix turn until the first operation settled, before active-run queue policy evaluated it.

The first commit adapts that exact replay claim to the existing exclusive turn-adoption lifecycle:

  • a deferred turn transfers claim settlement to the reply lane;
  • durable adoption commits the claim; and
  • abandonment releases it for Matrix replay.

The explicit command path had a separate problem. It directly injected text into the active run and returned an immediate acknowledgement, skipping the established prepared reply path that supplies transcript recording, stable queue identity, media, abort propagation, and adoption lifecycle handling. The second commit makes authorized /steer strip only its command prefix, preserve its body, and continue through the normal prepared-turn path with a turn-local steer queue override. Legacy authorized text-slash direct/DM alias resolution is preserved before that continuation.

The result uses the same queue-policy, run-adoption, transcript, and race-fallback contracts as an ordinary prepared follow-up. It does not add Matrix-specific steering semantics, change default queue policy, add configuration, or alter the durable replay-key format.

User Impact

  • Ordinary Matrix follow-ups can reach the existing active-run queue-policy path while the prior turn is still running.
  • Authorized /steer <message> reaches that same path with <message> intact and is persisted as a normal user turn when adopted.
  • Session history and the Control UI can project the explicit steer because it now has one durable user transcript row linked to the active run by steerTargetRunId.
  • If the active run disappears during the admission race, the message follows the established fallback path instead of being lost.

Idle Matrix messages, access and mention gates, room-history ordering, duplicate suppression, and non-Matrix channel behavior remain on their existing paths.

Evidence

Frozen review base: dca05ea39ac4a69a595dd2aa6a94f9a3ba0e2d44

Exact submitted head: df949a9c792d725c2119f40ea4751759079bad8d

Second production proof after co-installation with Matrix turn-taking

The unchanged four-commit PR head df949a9c792d725c2119f40ea4751759079bad8d was also applied in the production composition ending at c2c1b914710736dbf5f7a68e525a59d57a211bd3; all four submitted and installed commits have pairwise-identical stable patch IDs. This composition also contained the current Matrix multi-agent turn-taking candidate, providing a compatibility exercise rather than an isolated handler test.

At 16:24:08 IDT, a normal Matrix event (redacted ID $nZn6...) selected Forge for a multi-tool operational assessment. After Forge's original run had started and emitted progress plus its first tool call, a second ordinary Matrix event (redacted ID $EOm...) changed the required final sentence. The configured queue mode was steer; the source event did not use a command prefix.

  • Forge's durable transcript stored the initial request once, then stored the follow-up once with steerTargetRunId equal to the already-active run c4b9a660-72ae-49df-85bf-b72e808585bf.
  • The native Codex app-server log recorded turn/steer request 13, mode Steer, client identity ending in steer:1, and the expected active Codex turn. The update was injected into that turn after the first assistant progress message and first tool call, rather than becoming a second run.
  • The original run completed successfully after 14 tool calls and 14 matching results. Its six-point final ended with the replacement sentence: Recommendation: review the current settings.
  • The Matrix wire exposed one Forge response lineage (5599f793...) tied to the original trigger, progressing from revision 0 through revision 17 final; no second response root or duplicate final was emitted.
  • The five non-selected agents had no durable source-prompt row or marker-triggered full-run trajectory for either event.

This independently reconfirms ordinary configured steering, same-run durable persistence, Codex turn/steer delivery, successful terminal completion, and compatibility with the enhanced multi-agent Matrix handler on the submitted PR head.

The submitted range contains four focused commits:

  1. 8946c1183c305c366ab9f496e1d6fe5bd415c1a8 — Matrix replay-claim/adoption lifecycle.
  2. 7e042db452e6c5a58b9bc188f0b31b8da27faf6a — durable explicit-steer prepared-turn routing.
  3. b35b5e48887c3a5ccb89babc89ecf5e265c2ab0a — deterministic wait hardening for the active-turn regression.
  4. df949a9c792d725c2119f40ea4751759079bad8d — test-only type and lint narrowing for the new active-steering coverage.

Ordinary Matrix follow-up

  • Fail-before: in a disposable checkout at 9b36c8bc56ab990266ba3aca245cdb552b5ba09e, the focused regression failed both parameterized cases: after the second Matrix event resolved, the shared reply resolver had still been called only once (expected 2, received 1). This reproduced the block before queue-policy evaluation for both configured steer mode and explicit /steer ingress.
  • Pass-after: extensions/matrix/src/matrix/monitor/handler.active-turn-steering.test.ts passes 4/4 after hardening its timing-sensitive initial admission wait with a bounded CI-load-aware window. The second event reaches real shared reply admission before the first settles; CommandBody is preserved; the exact top-level lifecycle arrives with exclusive admission; late adoption commits the replay claim once; and late abandonment releases it once without handler double-settlement.

Explicit /steer persistence and Control UI projection

Real fail-before observation: during a real Matrix turn backed by the native Codex app-server, an explicit /steer instruction was accepted by the active run and changed its announced work/order. Read-only inspection afterward found no corresponding durable OpenClaw user transcript row, so the Control UI session view also had no command to display. A later ordinary follow-up in the same run did produce a durable row with steerTargetRunId, isolating the defect to the explicit command's direct-injection path rather than Matrix delivery or Control UI filtering.

Automated pass-after coverage on the submitted head: the focused command and end-to-end regressions establish that an authorized explicit steer:

  • enters the prepared turn once with a turn-local steer override;
  • records exactly one durable user row;
  • attaches the active run through steerTargetRunId;
  • transfers and settles the adoption lifecycle once;
  • preserves the command body and legacy authorized direct/DM target mapping; and
  • falls back through normal reply admission if the active run settles during the race.

Real Matrix after-fix proof for both steering paths

The submitted changes were installed in a production candidate at 73657a73c372dee6596dfff7cd7b204875e042ca and exercised end to end through the real self-hosted Matrix → OpenClaw → Codex app-server stack. The test used the existing System Maintenance room, Sentinel's production Matrix account, OpenClaw session cf4ef821-6010-4f97-bf82-1f0753471dfd, and active OpenClaw run 091127a5-3d06-475d-9794-a87101c2aa89.

The initial Matrix request deliberately started a multi-tool task: list all 50 U.S. states alphabetically, create a DOCX, and convert it to PDF. While that original run remained active, the user sent two follow-ups through Matrix:

  1. An ordinary follow-up, relying on the configured default steer queue mode:

    Actually, reverse alphabetical order.
    
  2. An explicit command:

    /steer actually alphabetical order
    

Read-only correlation across the Matrix server, Sentinel's durable OpenClaw transcript, and the Codex app-server log establishes the exact path for each source event.

Ordinary configured-steer follow-up

  • Raw Matrix event $5rGt… was stored by Synapse at 2026-08-25 06:39:49.985 IDT with body Actually, reverse alphabetical order. and no command prefix.
  • OpenClaw persisted exactly one user row at transcript sequence 357, message 81e0177e…, with the same Matrix transport event ID and the same visible content.
  • That row recorded __openclaw.steerTargetRunId = 091127a5-3d06-475d-9794-a87101c2aa89.
  • At 06:39:50 IDT, the Codex app server recorded turn/steer request 13, client identity openclaw:<turn>:steer:1, mode: Steer, and the expected active Codex turn 01a03700-832b-7a90-8e3d-0f6b1a36269a, carrying the exact follow-up payload.
  • The running agent acknowledged the correction and changed the working artifact order from alphabetical to reverse alphabetical without starting a replacement run.

Explicit /steer follow-up

  • Raw Matrix event $D27d… was stored by Synapse at 2026-08-25 06:40:40.332 IDT with body /steer actually alphabetical order.
  • OpenClaw stripped only the authorized command prefix and persisted exactly one normal user row at transcript sequence 373, message 9e0c4924…, with visible content actually alphabetical order and the same source Matrix transport event ID.
  • That row recorded the exact same __openclaw.steerTargetRunId = 091127a5-3d06-475d-9794-a87101c2aa89.
  • At 06:40:41 IDT, the Codex app server recorded turn/steer request 14, client identity openclaw:<turn>:steer:2, mode: Steer, and the same expected active Codex turn, carrying the stripped payload.
  • The original run acknowledged the second correction, rebuilt the artifacts in Alabama-through-Wyoming order, and did not create a second run.

The Control UI screenshot shows both follow-ups as distinct durable user rows in that same live session. In particular, the second row displays the explicit command's stripped payload, proving that the command no longer disappears after direct injection:

Control UI showing durable ordinary and explicit steering follow-ups

The screenshot's source PNG is stored outside the PR diff on the fork-only evidence branch codex/pr-evidence-128907-20260825; its local and GitHub-hosted SHA-256 hashes both equal bc83725e0e63fdaaab3d8f91d505e30b9730d95d5e8d84bc959b7a349339a918.

The same active run then completed the requested task end to end. Its durable transcript recorded the second correction, regenerated artifacts, validation, progress 5/5, Matrix attachment delivery receipts, and a terminal row at sequence 425 with runTerminal = true for the same run ID.

This production trace exercises the complete regression boundary:

Matrix source event
  → configured queue-mode selection or explicit-command parsing
  → normal prepared-message/transcript persistence
  → active-run association
  → Codex app-server turn/steer request
  → behavior change inside the original running turn
  → durable Control UI replay
  → successful terminal completion and Matrix delivery

Neither source message disappeared, neither was duplicated, both targeted the same active OpenClaw run and Codex turn, and the final artifacts reflected the latest steering instruction.

Focused verification on the exact head

  • Active-steering end-to-end suite: 26 passed, 132 skipped, 0 failed.
  • Matrix active-turn steering: 4/4.
  • Explicit steer command routing: 8/8.
  • Structured command-turn context: 11/11.
  • Turn-local queue override: 1/1.
  • Prepared-turn/end-to-end adoption and persistence: 2/2.
  • Exact messaging test-type shard passes.
  • Focused oxlint, repository formatting check, and git diff --check pass.
  • A saturated parallel sweep passed 106/107 tests; its sole timeout was an unrelated native-compact timing case, which passed 1/1 on immediate isolated rerun.
  • Core production TypeScript check passes.

Real Matrix after-fix proof for ordinary configured steering

On 2026-08-25, the lifecycle patch was cleanly cherry-picked into a production OpenClaw installation connected to a real self-hosted Matrix deployment and exercised with production Matrix accounts. The production commit was fb4184a99ccb89a20bcdcc570fa7e264bf638938; its stable patch-id was 7e011d63b334405665e880c60ec0e519837e8d4f, exactly matching the then-submitted lifecycle head 4afb4e40b5438a06e2fe9fe802243508c544c35e. The checkout was clean and the configured global queue mode was steer.

The user began a normal Matrix turn requesting an alphabetically ordered result. After the active turn had already progressed far enough to show forward-order interim output, the user sent an ordinary Matrix follow-up changing the requirement to reverse alphabetical order. This was a real Matrix ingress event, not a Control UI injection. The final Matrix response honored the follow-up and returned the reverse ordering.

The redacted durable trace establishes that this was adoption into the original active run, not a queued second run:

{
  "trace": "real-matrix-production-after-fix",
  "queueMode": "steer",
  "activeRunStartedAt": "2026-08-25T01:28:06.704Z",
  "followupTranscriptCreatedAt": "2026-08-25T01:29:13.472Z",
  "activeRunEndedAt": "2026-08-25T01:29:32.789Z",
  "followupWasMatrixTransport": true,
  "followupSteerTargetMatchedActiveRun": true,
  "targetStartedBeforeFollowup": true,
  "targetEndedAfterFollowup": true,
  "distinctRunStartsInWindow": 1,
  "onlyTargetRunStarted": true,
  "assistantRowsAfterFollowup": 1,
  "supersededForwardAssistantRowsAfterFollowup": 0,
  "reverseOrderAssistantRowsAfterFollowup": 1,
  "transcriptIdentityRowsForFollowup": 1,
  "identitySequenceMatchedTranscript": true,
  "matrixReplayRowsForExactTransportTuple": 1,
  "replayKeyMatchedExactTransportTuple": true,
  "replayClaimWasRecordedDuringActiveRun": true,
  "replayClaimWasUnexpiredAtVerification": true
}

Room, homeserver endpoint, account identity, credentials, and raw event/session/run identifiers are intentionally omitted. The trace was derived from the Matrix client observation plus read-only inspection of the production agent transcript/event-identity store, run lifecycle records, and Matrix inbound replay store after the turn completed.

Downstream protocol audit

OpenAI Codex at c941572917b9295c7318b28aab27709202a645c7 defines turn/steer with a required active-turn precondition in TurnSteerParams; the app server validates and dispatches it in turn_processor.rs, and core validates the active regular turn and queues pending input in turn_input.rs.

Scope

The exact frozen range is 15 files, +682/-177. It introduces no schema migration, dependency, or changelog change.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added the channel: matrix Channel integration: matrix label Aug 24, 2026
@bdjben
bdjben marked this pull request as ready for review August 24, 2026 23:53
@clawsweeper clawsweeper Bot added merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 25, 2026, 11:03 AM ET / 15:03 UTC.

ClawSweeper review

What this changes

Routes Matrix follow-ups and authorized text /steer commands through prepared reply admission so active-turn steering is durably recorded in session history.

Merge readiness

⚠️ Needs maintainer review before merge - 5 items remain

Keep open: the previous P1 remains. An authorized text /steer on a :slash: source lane cannot retarget to an active direct/DM embedded owner once its reply operation has cleared, so it can fall through as a normal separate turn instead of steering the active run.

Priority: P1
Reviewed head: beb9802c4ac531a5bab77131b07fc55aa14709de

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong real Matrix/UI evidence supports the intended behavior, but the active-owner routing gap remains a P1 correctness blocker.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR body provides a detailed after-fix Matrix trace, and the inspected Control UI screenshot visibly shows the ordinary and stripped explicit follow-ups persisted in one session.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body provides a detailed after-fix Matrix trace, and the inspected Control UI screenshot visibly shows the ordinary and stripped explicit follow-ups persisted in one session.
Evidence reviewed 7 items Current main supports an operation-free embedded owner: Current main intentionally lets a Gateway turn reach queue policy when the reply operation is absent but an embedded run for the same persisted session remains active.
Active embedded lookup covers both owners: The canonical embedded-run lookup falls back from reply-run state to the active embedded-handle map, which is the state the PR does not query.
PR routing excludes that supported state: The new slash-lane resolver returns a candidate only when both a reply operation and an injectable reply-operation target exist; it therefore rejects the handle-only interval current main supports.
Findings 1 actionable finding [P1] Resolve the operation-free embedded owner before routing /steer
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs src/auto-reply/reply/commands-steer.test.ts

Result: FAIL (partial) — step 2 expect_output handleSteerCommand: expected terminal output was not visible within 30 seconds: "handleSteerCommand"

node scripts/run-vitest.mjs src/auto-reply/reply/commands-steer.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128907-lKy9ma/target$ node scripts/run-vitest.mjs src/auto-reply/reply/commands-steer.test.ts
node scripts/run-vitest.mjs src/auto-reply/reply/commands-steer.test.ts
[test] starting test/vitest/vitest.auto-reply.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128907-lKy9ma/target

 ✓  auto-reply  src/auto-reply/reply/commands-steer.test.ts (8 tests) 40ms

 Test Files  1 passed (1)
      Tests  8 passed (8)
   Start at  15:04:02
   Duration  8.42s (transform 6.63s, setup 746ms, import 7.37s, tests 40ms, environment 0ms)

[test] passed 1 Vitest shard in 12.83s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128907-lKy9ma/target$ node scripts/run-vitest.mjs src/auto-reply/reply/commands-steer.test.ts
[test] starting test/vitest/vitest.auto-reply.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128907-lKy9ma/target

 ✓  auto-reply  src/auto-reply/reply/commands-steer.test.ts (8 tests) 33ms

 Test Files  1 passed (1)
      Tests  8 passed (8)
   Start at  15:04:15
   Duration  3.99s (transform 2.30s, setup 349ms, import 3.43s, tests 33ms, environment 0ms)

[test] passed 1 Vitest shard in 8.40s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128907-lKy9ma/target$






















Assertions:

  • FAIL expect_output: handleSteerCommand

How this fits together

Matrix messages enter the Matrix plugin and then shared reply admission, which resolves the session, persists the user turn, and applies active-run queue policy. Explicit steering must select the active conversation before that pipeline can associate it with the correct embedded agent run.

flowchart LR
  A[Matrix follow-up] --> B[Matrix monitor]
  B --> C[Prepared reply admission]
  C --> D[Active session routing]
  D --> E[Transcript persistence]
  D --> F[Embedded agent steering]
Loading

Before merge

  • Resolve the operation-free embedded owner before routing `/steer` (P1) - Current main deliberately admits Gateway turns when an embedded run remains active after its reply operation clears. This resolver requires replyRunRegistry.get() first, so a :slash: command cannot retarget to its active direct/DM owner in that interval and instead continues as a normal source-lane prompt. Query the canonical active embedded owner too, and add that regression case.
  • Resolve merge risk (P1) - An authorized /steer can be routed to its source :slash: session during the operation-free active-run interval, creating or queuing a normal turn instead of steering the active direct/DM run.
  • Resolve merge risk (P1) - The patch is net production +63 lines; its added routing should absorb the canonical active embedded-owner lookup rather than retain an operation-only parallel rule.
  • Resolve merge risk (P1) - The supplied real trace depends on Codex app-server behavior, but the required sibling Codex source was unavailable for a direct protocol audit.
  • Complete next step (P2) - The missing case has a narrow owner boundary and a source-proven repair path in shared explicit-steer routing.

Findings

  • [P1] Resolve the operation-free embedded owner before routing /steer — src/auto-reply/reply/explicit-steer-routing.ts:86-87
Agent review details

Security

None.

PR surface

Source +65, Tests +451. Total +516 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 10 195 130 +65
Tests 5 499 48 +451
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 694 178 +516

Review metrics

Metric Value Why it matters
Production versus test delta production +63, tests/test support +453 The bug fix removes direct injection but adds shared routing and lifecycle behavior; the remaining operation-only lookup must be corrected before accepting that growth.

Merge-risk options

Maintainer options:

  1. Cover the operation-free active owner (recommended)
    Resolve authorized slash-lane steering through the active embedded handle when the reply operation has already cleared, and prove it still uses the prepared steer path.

Technical review

Best possible solution:

Use one canonical active embedded-owner query for slash-to-direct routing that recognizes both reply-operation and active-handle ownership, then add a regression for the handle-only interval.

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

Yes, from source: current main explicitly supports an active embedded run without a reply operation, while the new slash-target resolver requires that operation. The needed regression is a handle-only direct/DM run plus an authorized :slash: /steer request.

Is this the best way to solve the issue?

No. The PR’s prepared-turn design is the right direction, but the active-owner lookup must use the same embedded-run state that current main uses for operation-free admission.

Full review comments:

  • [P1] Resolve the operation-free embedded owner before routing /steer — src/auto-reply/reply/explicit-steer-routing.ts:86-87
    Current main deliberately admits Gateway turns when an embedded run remains active after its reply operation clears. This resolver requires replyRunRegistry.get() first, so a :slash: command cannot retarget to its active direct/DM owner in that interval and instead continues as a normal source-lane prompt. Query the canonical active embedded owner too, and add that regression case.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b0c27e2d8f57.

Labels

Label justifications:

  • P1: An explicit user steering command can miss an active turn and create a separate/default-policy turn.
  • merge-risk: 🚨 session-state: The incorrect target can persist the follow-up against a different session than the active run.
  • merge-risk: 🚨 message-delivery: The command payload can be delivered to the slash-source session instead of the intended active direct/DM conversation.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body provides a detailed after-fix Matrix trace, and the inspected Control UI screenshot visibly shows the ordinary and stripped explicit follow-ups persisted in one session.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides a detailed after-fix Matrix trace, and the inspected Control UI screenshot visibly shows the ordinary and stripped explicit follow-ups persisted in one session.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body provides a detailed after-fix Matrix trace, and the inspected Control UI screenshot visibly shows the ordinary and stripped explicit follow-ups persisted in one session.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/auto-reply/reply/commands-steer.test.ts.
  • [P1] node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts.
  • [P1] node scripts/run-vitest.mjs src/auto-reply/reply/dispatch-from-config.base.test-utils.ts.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • steipete: Recent current-main work owns the operation-free embedded-run admission path that this PR must align with. (role: recent area contributor; confidence: high; commits: fff5eb05f6f6; files: src/auto-reply/reply/dispatch-from-config.lifecycle.ts)
  • fuller-stack-dev: Authored the merged active-embedded-turn steering repair whose scope overlaps this remaining slash-session routing gap. (role: introduced related steering behavior; confidence: high; commits: ed6ee79c56f6; files: src/auto-reply/reply/dispatch-from-config.lifecycle.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve the active embedded handle when the reply operation is absent, then add the authorized slash-to-direct regression covering that exact interval.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-08-24T23:58:56.981Z sha 4afb4e40b5438a06e2fe9fe802243508c544c35e :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-25T00:41:54.925Z sha 4afb4e40b5438a06e2fe9fe802243508c544c35e :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-25T01:42:46.168Z sha 4afb4e40b5438a06e2fe9fe802243508c544c35e :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T03:36:21.326Z sha b35b5e4 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-25T04:01:58.803Z sha df949a9c792d725c2119f40ea4751759079bad8d :: needs changes before merge. :: [P1] Route /steer through operation-free active embedded runs
  • reviewed 2026-08-25T13:45:09.136Z sha df949a9c792d725c2119f40ea4751759079bad8d :: needs changes before merge. :: [P1] Resolve operation-free embedded owners before routing /steer

@bdjben

bdjben commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 25, 2026
@bdjben
bdjben force-pushed the codex/fix-matrix-active-turn-steering branch from 4afb4e4 to 7e042db Compare August 25, 2026 03:20
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 25, 2026
@bdjben

bdjben commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

The original PR body is now updated with robust real-world, end-to-end proof for both steering paths: ordinary Matrix follow-up under configured steer mode and explicit /steer, correlated across the self-hosted Matrix source events, durable OpenClaw transcript and Control UI, Codex app-server turn/steer requests, behavior changes within the same active run, successful terminal completion, and Matrix artifact delivery. It includes the Control UI screenshot and exact trace identities.

The branch also now includes the minimal test-only type/lint repair at exact head df949a9c792d725c2119f40ea4751759079bad8d; focused active-steering E2E is 26 passed / 132 skipped / 0 failed, with the exact messaging test-type shard, focused lint, formatting, and diff checks passing. GitHub CI is running on that head.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. and removed P2 Normal backlog priority with limited blast radius. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 25, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 25, 2026
@bdjben

bdjben commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Note to maintainers regarding P1: The failing resolver at issue here is in shared src/auto-reply/reply/explicit-steer-routing.ts, and the :slash: alias pattern exists for Telegram, Discord, Slack, Matrix, and other shared reply-runtime callers. Matrix exposed the bug and #128907’s Matrix path is the PR context, but the operation-free active-owner blind spot is a shared /steer problem, already present on main. That strongly supports suggesting that it should be handled as a systemic follow-up rather than making this Matrix persistence PR absorb it.

Note: AI-assisted, but I did repeatedly review the PR, worked closely on it, tested it repeatedly on my real-world installation, and also reviewed the P1 (and inquired about its origin / uniqueness to Matrix), which was what led to the discovery that it is not unique to Matrix.

@jalehman jalehman self-assigned this Aug 25, 2026
@jalehman
jalehman force-pushed the codex/fix-matrix-active-turn-steering branch from b269c7a to f004390 Compare August 25, 2026 21:20
@jalehman

Copy link
Copy Markdown
Contributor

Landing verification for exact head 39de0f212090cfc47b3a8047c4b692547b404af3:

  • ClawSweeper's operation-free active-owner finding is addressed by the canonical embedded-run lookup, with the requested authorized slash-to-direct regression.
  • Exact-head hosted CI is terminal green: 214 successful checks, 40 intentional skips, no failures or pending jobs. CI run: https://github.com/openclaw/openclaw/actions/runs/32905419885
  • Focused regression: node scripts/run-vitest.mjs src/auto-reply/reply/commands-steer.test.ts — 9/9 passed; the new case failed before the maintainer repair.
  • Changed-file checks passed formatting, typecheck, lint, dead-export, boundary, database-first, cycle, and guard lanes.
  • Fresh branch autoreview ran with TruffleHog clean. Its sole replay-claim suggestion was rejected after direct owner-contract inspection: a committing claim is removed from both underlying and wrapper ownership in finally on rejection, so later replay is claimable; release() after commit starts is intentionally a no-op.
  • Direct sibling Codex inspection confirmed turn/steer requires the exact active expectedTurnId and rejects missing/mismatched active turns.
  • Native review artifacts validate READY FOR /prepare-pr with zero findings.

No known proof gaps remain.

@jalehman
jalehman merged commit d205216 into openclaw:main Aug 25, 2026
255 checks passed
@jalehman

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
* fix(matrix): let follow-ups reach active turns

* fix(auto-reply): persist explicit steer turns

* test(matrix): stabilize active steering admission

* test: fix active steering type checks

* fix(auto-reply): route steer to active embedded owner

---------

Co-authored-by: Benjamin Badejo <[email protected]>
Co-authored-by: Josh Lehman <[email protected]>
Co-authored-by: Josh Lehman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: matrix Channel integration: matrix merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants