Skip to content

fix: restore steering across queued and active turns - #158699

Merged
steipete merged 5 commits into
mainfrom
codex/steering-fixes
Sep 26, 2026
Merged

steipete merged 5 commits into
mainfrom
codex/steering-fixes

Conversation

@steipete

@steipete steipete commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #148731
Closes #155451

What Problem This Solves

Fixes corrections getting stuck behind queued messages during an active conversation, and consumed messages reappearing above the composer after reconnecting.

User Impact

Each eligible new correction can steer the active turn even when an older message needs a followup. Promoted followups retain their original input identity, so historical completed replies no longer incorrectly block new steering. Automatic account rotation, model fallback, and automatic compaction preserve compatible steering. Steering during compaction requires the guarded V2 injection contract; legacy V1 backends continue to reject it.

Actual followups remain ordered. Explicit model/account changes, changed permissions, unsupported input, and completed or replaced owners still require a followup. Direct background turns with optional replies leave new human input for a turn that can answer it. Uncertain accepted input is never replayed automatically. No configuration or storage migration is required.

Why This Change Was Made

One rejected steering attempt previously disabled later attempts behind that queue. Separately, followup execution omitted the source identity used by the final-reply guard. Each admission now makes its own decision while preserving ordering among unresolved admissions and applying the configured queue cap after those decisions settle.

Command-owned runs expose their existing admitted execution owner to the same steering and transcript-commit path. Captured Gateway principals also retain their original operator comparison identity: the same authenticated browser must not look like a different source merely because its request was adapted. Live authority and revocation checks remain mandatory; copied client labels cannot establish that identity.

Compaction admission now requires a V2 backend that can revalidate authority at final dispatch. An available V1 sink is insufficient: the Copilot V1 adapter can await after send entry without that assertion. Built-in and native Codex V2 steering during automatic compaction remain supported.

The UI reconciles queued chips with authoritative pages and exact receipt lookups. Cancellation logs identify the cause, incoming input, and active run separately, and dispatch timing identifies the admission wait that caused a delay.

Evidence

Current candidate: b8cce568519cb40bf86b6b3190424a09a6eb174d. Exact-head CI passed, including openclaw/ci-gate and every previously failing type-check and Node test group. GitHub required checks remain enforced.

  • The original focused campaign passed all 33 files (1,182 cases), including the real Gateway direct-command boundary, three ordered steers into one promoted followup without Stop, backlog/cancellation/overflow ordering, fallback identity, receipts, and diagnostics. Those historical measurements are retained below.
  • After rebasing and tightening V1 compaction admission, the six affected backend suites passed all 168 cases: registry, abort, fallback steering, and followup steering (107); embedded steering (44); native Codex steering (17). The V1 regression failed before the fix because it returned queued: true, and passes afterward with reason: "compacting" and no backend dispatch. Native Codex automatic-compaction steering still passes. The focused V1 regression took 34.15s including its wrapper; the refreshed embedded and native Codex suites took 40.78s and 53.58s in Vitest, respectively.
  • The unchanged chat-thread file passed all 243 cases on Node (3.21s Vitest / 4.07s wrapper). The CI runtime planner selects this file for Node and keeps pending-input pagination on Bun. This confirms the inherited routing repair described below without weakening the GC assertion.
  • Browser reconnect regression reproduced before the fix and passes afterward; 91 focused UI cases also passed. The screenshots show the consumed message disappearing while the genuine pending attachment remains.
  • Fresh production and agent-test typechecks, scoped lint/format checks, and git diff --check passed for the V1 repair. Independent Codex review found no accepted actionable issue in that repair. The complete scoped changed-check command also passed on the preceding published candidate a705410d776c: all 25 core test type-check groups, production types, formatting, lint, dead-export scans, and the import, storage, dependency, and other selected owner guards. Earlier runtime bundles and SDK boundary declarations passed. The complete scoped changed-check command also passed for the subsequent native-completion fixture repair, including Gateway test types, formatting, lint, static guards, and all three dead-export scans.

After incorporating the Cron fixture repair below, the five PR commits are patch-identical by git range-diff; there is no overlap between the PR’s 93 files and the incorporated main changes. The refreshed native-completion, direct-command steering, and pending-input pagination suites pass all 27 cases (53.96s wrapper).

CI failures were investigated at their owners:

  • Initial CI failed an unchanged session-group worktree-option icon lookup, then cancelled unfinished jobs. The original 80-file shard passed locally with all 383 cases (282.41s), and the affected file passed independently (10 cases, 26.69s); these replays do not establish a fix. The diagnostic follow-up captures allowlisted menu, role, visibility, and popup state before browser teardown. A controlled failure verified capture and preservation of the original error (35.52s), then the full bundled browser file passed 10/10 cases (23.394s test time / 122.98s wall). Assertions and timeouts are unchanged. The next CI run passed all nine UI E2E jobs; the original icon-lookup failure remains unexplained, and future failures retain the missing evidence.

  • That run exposed a reproducible Gateway fixture failure: a delegated-handoff case cast a client without required connection metadata. The fixture now uses the existing synthetic-client constructor. The original two-file project reproduced one failure among 373 cases (308.16s); all 373 passed after repair with the CI worker setting (392.47s). Authorization assertions and production behavior are unchanged. Gateway test types, lint/format checks, and independent review passed.

  • CI on the fixture repair then failed one of 8,549 UI cases: the closed-pane GC test retained a weak reference under Bun. Its merge base lacked the already-merged runtime routing fix in feat: curate plugin categories and add Computer use discovery #158686 (7f41da0c7e42), which routes this GC-sensitive file to Node. The branch now inherits that owner fix. The original test and its assertions remain unchanged; no skip, timeout increase, or new runtime exception is added by this PR.

  • The local max-lines guard exposed an unrelated OpenRouter suppression whose baseline entry had been removed. The branch incorporates the merged owner fix in fix: restore OpenRouter test line-limit checks #159039 (274668662570), which moves the Fusion cases to a sibling test file and removes the suppression. No baseline expansion or suppression is added here.

  • CI on a705410d776c failed only Node group compact-small-12: its 57-file subgroup passed 751 cases and timed out in three native-completion compaction cases at 120 seconds. Local replay reproduced the first identical timeout. The fixture awaited an announce-retry delay that guarded V2 steering no longer enters. The test now exercises real post-turn automatic compaction and holds recorder preparation through the production deferTerminalLifecycle owner. All nine cases and their authority, no-write, transcript, queue, and deduplication assertions remain. The repaired file passes 9/9 (18.89s Vitest / 23.09s wall), and fresh independent review found no actionable P2-or-higher issue. The original 57-file subgroup replay passed 753/754 cases in 282.00s, including all repaired compaction cases. Its sole failure was an unchanged desktop Unix-socket fixture: the nested local temporary path was 107 bytes, exceeding the macOS socket-path limit. That exact case passed with a shorter private temporary directory (9.76s Vitest / 12.89s wall); it had passed in the Linux CI run. No assertion, timeout, skip, or socket fixture was changed. Scoped checks passed.

  • CI on 76efe9052f18 exposed a separate main integration break: newly landed Cron history and startup fixtures omitted the scheduler required by refactor(cron): move due timers into the Gateway scheduler #159099. The two type-check groups and seven history tests failed. This was reproduced on clean main; the local repair passed all 13 affected cases, both type graphs, changed checks, and independent review. The branch now incorporates the completed upstream repair c0e6951d6f02 (including its deterministic scheduler clock and real scheduling-failure injection), which records 3,400 passing cases and all 25 test type-check groups. No Cron production fallback or new exception is added to this PR.

Before After
Consumed message incorrectly remains queued Consumed message removed while pending attachment remains

A Codex acknowledgement or transcript commit does not prove that a later model request observed the input. This patch preserves that distinction and does not add ACP mid-turn input support. Gateway and browser proof uses isolated local state, synthetic fixtures, and controlled model execution.

Measured test costs and review resolution

Historical per-file wall time from the supported runner with --maxWorkers=1; these values include compilation/setup. Counts below describe that campaign, before upstream test consolidation; the refreshed counts above describe the current affected suites. The reply-agent E2E file includes a one-time fresh runtime build (851.2 seconds). The inspected CI runs are linked above. Completed jobs include preflight 93s, security-fast 43s, and control-ui-performance 108s. UI E2E shard 8/9 took 371.62s: 382 cases passed and one failed at session-management.group-defaults.e2e.test.ts:201. The failure was a missing visible menuitemradio icon lookup, outside this PR's UI changes. The original job uploaded no failure diagnostics; the follow-up adds capture before teardown without changing product behavior, assertions, or timeouts. The original shard was replayed with the same include list, shard index, and worker count; all 383 cases passed locally. Remaining test-shard timings are incomplete because fail-fast cancelled them.

Test file Passed Wall seconds
extensions/codex/src/app-server/run-attempt.steering.test.ts 17 74.75
src/agents/agent-command-execution-identity.test.ts 15 41.46
src/agents/command/attempt-execution.cli.test.ts 170 268.90
src/agents/embedded-agent-runner/runs.steering.test.ts 45 94.67
src/agents/embedded-agent-runner/runs.test.ts 23 55.07
src/agents/harness/tool-authority.runtime.test.ts 40 148.96
src/agents/model-fallback.live-switch.test.ts 8 35.96
src/agents/model-fallback.probe.test.ts 28 31.16
src/agents/model-fallback.test.ts 153 130.24
src/agents/outcome-fallback-runtime-contract.test.ts 10 37.49
src/auto-reply/reply/agent-runner-execution-probes.test.ts 18 69.44
src/auto-reply/reply/agent-runner-fallback-steering.test.ts 10 49.68
src/auto-reply/reply/agent-runner-source-identity.test.ts 2 56.93
src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts 222 1096.93
src/auto-reply/reply/followup-turn-execution.steering.test.ts 5 24.88
src/auto-reply/reply/get-reply-run-admission.session-file.test.ts 5 25.98
src/auto-reply/reply/queue-policy.test.ts 7 2.05
src/auto-reply/reply/queue/enqueue.steering.test.ts 6 18.29
src/auto-reply/reply/reply-run-registry.abort.test.ts 13 2.45
src/auto-reply/reply/reply-run-registry.test.ts 92 22.52
src/auto-reply/reply/reply-timing-tracker.test.ts 10 3.54
src/auto-reply/reply/reply-tool-authority.test.ts 38 23.58
src/config/sessions/restart-recovery-receipt.test.ts 19 30.18
src/config/sessions/session-accessor.pending-inputs-consumed.test.ts 53 34.91
src/config/sessions/session-accessor.pending-inputs.test.ts 37 78.47
src/gateway/chat-queued-turns.test.ts 21 5.28
src/gateway/operator-run-authority.worker.test.ts 18 47.74
src/gateway/operator-run-cancellation.test.ts 15 50.15
src/gateway/server-methods/chat-send-message-injection.isolated-gateway.test.ts 4 55.43
src/gateway/server-methods/chat-send-message-injection.test.ts 21 41.08
src/gateway/server-methods/chat-send-pending-inputs.test.ts 39 74.20
src/gateway/server.chat-steer-direct-command.test.ts 2 68.55
ui/src/pages/chat/chat-pending-inputs.pagination.test.ts 16 8.71
ui/src/e2e/session-management.group-defaults.e2e.test.ts 10 122.98

The browser scenario took 15.62 seconds (113.92 seconds including its wrapper); the four-file UI group took 83.74 seconds. The strengthened pagination cases passed independently and again in the combined run.

Independent Codex review completed. An earlier finding proposed stripping an OpenRouter model prefix; it was rejected because normalizeBuiltInProviderModelId explicitly adds this prefix for bare OpenRouter IDs, and all eight live-switch cases passed. The later V1-compaction finding was accepted, reproduced, repaired, and independently reviewed as described above. No accepted actionable findings remain in the reviewed changes. Initial fixture/model-registry and authority-projection failures were diagnosed and repaired, rather than hidden with retries or longer timeouts. The attempted remote validation setup did not complete; all manually run passing evidence cited here is local. GitHub CI outcomes are identified separately above. No live Gateway deployment is claimed.

Thanks to @NianJiuZst, @sxh313, and @anyech for the related account-rotation, lifecycle-probe, and model-fallback investigations in #138516, #154868, and #151627.

Follow-up audit: terminal tool outcome repair and before/after browser proof.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: codex size: XL labels Sep 26, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. 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. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 26, 2026, 4:18 PM ET / 20:18 UTC (Revision 8).

ClawSweeper review

What this changes

The branch lets eligible corrections reach an active turn despite older queued followups, preserves input identity and authority through fallback and queued execution, and removes consumed messages from the Control UI queue.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open. Current main and the latest release still have the queue condition that blocks later steering. The earlier V1 compaction finding is addressed on this head, and this review found no definite introduced defect.

Priority: P1
Reviewed head: b8cce568519cb40bf86b6b3190424a09a6eb174d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Direct UI proof and substantial boundary validation support a sound repair, while the broad cross-owner patch warrants normal exact-head review.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): At the pinned head, inspected browser before/after screenshots show a consumed queue chip removed while a pending attachment remains. An isolated Gateway WebSocket scenario exercises direct-command steering, while production-boundary cases check live, revoked, and replaced authority before injection or transcript write. The changed receipt code does not alter a stored-data contract.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): At the pinned head, inspected browser before/after screenshots show a consumed queue chip removed while a pending attachment remains. An isolated Gateway WebSocket scenario exercises direct-command steering, while production-boundary cases check live, revoked, and replaced authority before injection or transcript write. The changed receipt code does not alter a stored-data contract.
Evidence reviewed 11 items Current main still blocks later steering: A non-steering queued item makes admission ready, and ready suppresses shouldSteer. The fetched main and pinned base have no changes to these central files.
PR removes the queue-wide steering latch: Steering eligibility no longer depends on queued followups; followups remain tracked for queue action and drain ordering.
Ordered admission and source identity: A successor waits for earlier steer attempts, while promoted followups bind their original source identity before execution.
Findings None None.
Security None None.

How this fits together

Incoming chat and agent RPC messages enter Gateway admission, which either steers the active agent run or queues a followup. Session receipts then inform the Control UI's pending-message view.

flowchart LR
 A[Incoming chat or agent request] --> B[Gateway admission]
 B --> C{Steering eligible?}
 C -->|Yes| D[Active run injection]
 C -->|No| E[Ordered followup queue]
 D --> F[Session receipt]
 E --> F
 F --> G[Control UI pending view]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production and test growth production net +631, tests and test support net +1724 The sizeable production growth spans queue, authority, and receipt owners; the PR supplies focused boundary coverage for those changes.
Upgrade surface 0 new config options, 0 stored-schema changes The earlier compatibility prompt does not identify a changed setting or persisted format in the pinned diff.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep steering with the live run owner, preserve original input identity through queued execution, and derive pending UI state from authoritative receipts.

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

Yes. Current-main source deterministically makes an older followup suppress later steering; the linked Control UI report also records the resulting queue behavior. I did not execute a current-main reproduction.

Is this the best way to solve the issue?

Yes. The branch changes the admission and receipt owners directly, retains ordered fallback, and keeps legacy injection blocked during compaction.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. At the pinned head, inspected browser before/after screenshots show a consumed queue chip removed while a pending attachment remains. An isolated Gateway WebSocket scenario exercises direct-command steering, while production-boundary cases check live, revoked, and replaced authority before injection or transcript write. The changed receipt code does not alter a stored-data contract.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): At the pinned head, inspected browser before/after screenshots show a consumed queue chip removed while a pending attachment remains. An isolated Gateway WebSocket scenario exercises direct-command steering, while production-boundary cases check live, revoked, and replaced authority before injection or transcript write. The changed receipt code does not alter a stored-data contract.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review merge-risk labels are merge-risk: 🚨 message-delivery, merge-risk: 🚨 session-state.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: The reported defect prevents timely corrections to active agent turns and affects a real Control UI workflow.
  • merge-risk: 🚨 message-delivery: Changing steer admission and followup overflow could alter whether a correction reaches the active run or its ordered fallback.
  • merge-risk: 🚨 session-state: Promoted source identities and receipt reconciliation affect which pending inputs are attributed to a run and shown after reconnect.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): At the pinned head, inspected browser before/after screenshots show a consumed queue chip removed while a pending attachment remains. An isolated Gateway WebSocket scenario exercises direct-command steering, while production-boundary cases check live, revoked, and replaced authority before injection or transcript write. The changed receipt code does not alter a stored-data contract.
  • proof: sufficient: Contributor real behavior proof is sufficient. At the pinned head, inspected browser before/after screenshots show a consumed queue chip removed while a pending attachment remains. An isolated Gateway WebSocket scenario exercises direct-command steering, while production-boundary cases check live, revoked, and replaced authority before injection or transcript write. The changed receipt code does not alter a stored-data contract.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. At the pinned head, inspected browser before/after screenshots show a consumed queue chip removed while a pending attachment remains. An isolated Gateway WebSocket scenario exercises direct-command steering, while production-boundary cases check live, revoked, and replaced authority before injection or transcript write. The changed receipt code does not alter a stored-data contract.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • sxh313: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • shakkernerd: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (7 earlier review cycles)
  • reviewed 2026-09-26T06:23:45.438Z sha 3d944e6c1ae4a8f2049ce3ee889d1d30c67d6c7d :: blocked before merge. :: none
  • reviewed 2026-09-26T06:50:44.430Z sha 892372d :: blocked before merge. :: none
  • reviewed 2026-09-26T07:08:09.673Z sha 892372d :: blocked before merge. :: none
  • reviewed 2026-09-26T08:41:04.273Z sha db1f649 :: blocked before merge. :: none
  • reviewed 2026-09-26T09:16:54.329Z sha f0d0cf1 :: blocked before merge. :: [P1] Keep legacy injection blocked during compaction
  • reviewed 2026-09-26T18:46:22.693Z sha a705410 :: blocked before merge. :: none
  • reviewed 2026-09-26T19:31:45.643Z sha 76efe90 :: blocked before merge. :: none

@steipete
steipete force-pushed the codex/steering-fixes branch from 3d944e6 to 892372d Compare September 26, 2026 06:32
@steipete
steipete marked this pull request as ready for review September 26, 2026 06:34
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: b8cce568519cb40bf86b6b3190424a09a6eb174d
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/harness/tool-authority.runtime.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/gateway/operator-run-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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 Sep 26, 2026
@steipete
steipete force-pushed the codex/steering-fixes branch from f0d0cf1 to a705410 Compare September 26, 2026 18:35
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The V1 compaction finding is resolved in a705410: only guarded V2 injection can steer during compaction. The available-V1 regression fails before the fix and passes afterward without backend dispatch; built-in and native Codex automatic-compaction steering remains covered. All 168 refreshed backend cases and the unchanged 243-case UI file passed. The branch also incorporates the existing main fixes for the Bun GC runtime routing and OpenRouter line-limit guard. There are no configuration, schema, or storage-format changes. Current proof and CI are in the updated PR body.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete enabled auto-merge (squash) September 26, 2026 18:44
@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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 26, 2026
@steipete
steipete merged commit 13747e0 into main Sep 26, 2026
254 checks passed
@steipete
steipete deleted the codex/steering-fixes branch September 26, 2026 20:29
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
* fix: restore steering across queued and active turns

Keep eligible corrections steerable despite older followups. Retain source
identity across promoted turns and Gateway principals, preserve authority
through automatic routing changes, and reconcile consumed queue entries.
Explain steering rejection, cancellation, and admission wait outcomes.

Co-authored-by: NianJiuZst <[email protected]>
Co-authored-by: sxh313 <[email protected]>
Co-authored-by: anyech <[email protected]>

* test(ui): capture group defaults menu failures

Capture bounded menu and popup state before the browser context closes when the group-defaults flow fails. Preserve the original assertion, timeout, and error so a future CI failure supplies the evidence missing from the initial run.

* test(gateway): use valid client for delegated handoffs

Build the trusted handoff fixture through the production synthetic-client constructor instead of casting a partial client without required connection metadata. Preserve all handoff and model-selection assertions.

* fix: require guarded injection for compaction steering

* test(gateway): exercise completion during automatic compaction

Replace the obsolete compaction-retry rendezvous with real post-turn automatic compaction and held transcript preparation. Match the production deferred lifecycle owner, and preserve live, revoked, and replaced-source final-effect assertions without increasing timeouts.

---------

Co-authored-by: NianJiuZst <[email protected]>
Co-authored-by: sxh313 <[email protected]>
Co-authored-by: anyech <[email protected]>
@steipete

steipete commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Follow-up from the continued steering audit: a terminal item-only tool activity could still show Running while its parent turn continued. The correction preserves Outcome unknown when an end event has no outcome receipt; explicit failed, blocked, completed, and running statuses keep their existing behavior.

The original browser regression reproduced before the fix (15.31s). The repaired live/history scenario and running-to-failed sibling pass (2 cases, 15.78s), as do all 66 card tests (7.61s), selected changed checks (380.72s), and independent review through P2. Existing contradictory fixtures now distinguish start/update activity from terminal activity. No new test cases, timeout increases, or fabricated result receipts.

These inspected captures use the actual Control UI with a synthetic Gateway in Chromium 153.0.8010.12. The parent turn is active in both. This is local browser proof, not a deployment to an operator Gateway. The local candidate was not pushed: a canonical owner repair landed on main during final qualification.

Update: main now contains canonical fix 7b3972c677e, which records actual live item completion separately from result receipt and preserves active history placeholders. Current main ca267fa035f8efae6986a4bbc1ba89e2cf6bc867 passed all 102 card/stream cases (14.87s) and the same two browser regression/sibling cases (16.00s). The duplicate local fallback patch will not land. The screenshots below retain their original attribution: they show the earlier local diagnostic candidate, not execution of the upstream commit.

Before After
Ended tool incorrectly shows Running Ended tool shows Outcome unknown

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

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation extensions: codex gateway Gateway runtime 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

1 participant