Skip to content

fix(claude-cli): apply thinking and keep live sessions warm - #125528

Merged
Patrick-Erichsen merged 33 commits into
openclaw:mainfrom
VACInc:fix/claude-cli-thinking-catalog
Aug 20, 2026
Merged

Patrick-Erichsen merged 33 commits into
openclaw:mainfrom
VACInc:fix/claude-cli-thinking-catalog

Conversation

@VACInc

@VACInc VACInc commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Summary

High Level TLDR

Claude CLI now advertises and applies thinking levels end to end. Captured live sessions keep the same Claude process warm for compatible turns so prompt-cache reuse survives; a changed spawn-time thinking budget cleanly replaces that process.

What Problem This Solves

This combines the two related Claude CLI fixes from #125528 and #125972.

Logical anthropic/<model> rows route to claude-cli/<model> but prepared configured catalogs intentionally omit runtime-only rows. The former projection-time bridge searched for that absent sibling, so the live Gateway advertised reasoning=false, defaulted to off, and ignored configured thinking defaults. Separately, selecting a level changed only an informational system-prompt token and not Claude Code execution.

Captured MCP-delivery turns also killed the live Claude child after every response because the capture key is spawn-time process/MCP-header state. That erased prompt-cache continuity and forced cold resume on every following turn.

Why This Change Was Made

  • Resolve the concrete route once while preparing agent facts and carry its reasoning contract plus thinking-policy provider on the prepared logical row. models.list keeps the public logical provider but uses the concrete runtime policy; Claude CLI Mythos therefore stays off-only.
  • The Anthropic plugin maps the resolved level to Claude Code launch environment: off=0, minimal=1024, low=2048, medium=8192, high/xhigh=16384, max=32768 MAX_THINKING_TOKENS. Positive fixed budgets also set CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 where needed.
  • The existing Claude live-session fingerprint remains the one canonical compatibility check for every spawn-time input, including that environment. Equal budgets reuse the child; a changed budget invalidates the fingerprint and spawns a replacement. No thinking-specific parallel reuse gate exists.
  • A capture key is process-stable but admitted by the grant only for each turn. It is deactivated before capture observers clear; a delivery drain failure still closes the child.
  • Provider thinking profiles remain authoritative over authored reasoning=false. Existing Fable off selections normalize to low mandatory-adaptive execution; ordinary optional-thinking rows remain constrained to only off.
  • thinking=<level> remains informational prompt runtime info; Claude Code execution is controlled by launch environment.
  • The change remains disjoint from fix: New Session stays on Models unavailable after a missing catalog owner #125450's prepared-model-runtime-materializations.ts and chat-metadata-runtime.ts overlay hunks.

User Impact

Claude CLI model controls now show the levels the concrete runtime can execute, honor the configured default, and make a selected level affect the next run. Unchanged captured turns retain the warm child and its prompt cache. Switching thinking level cleanly respawns the child so the new budget actually takes effect.

Evidence

Thinking-level cache lane coverage (2026-08-19)

The existing CLI_CACHE_PROBE fresh-process resume flow now configures thinking: medium, switches the same session to high, and logs/asserts normalized usage for resume2, thinking-switch, and thinking-steady. The switch floor is 30%: Anthropic's tools -> system -> messages cache hierarchy says a thinking-parameter change invalidates messages only, so a hit proves the tools and system tiers survived. The next same-level turn retains the existing 90% floor.

The same CLI_RESUME continuity flow now leaves bundled MCP enabled and requires the Claude live-session generation to survive the capture-enabled resume, proving delivery capture does not respawn the child.

Contract source, maintainer deployed-Haiku measurement: steady state 99.8%; medium -> high switch 63.5% (messages tier invalidated only); next high turn 99.8%.

Live lane: not run locally because API-key mode requires ANTHROPIC_API_KEY or ANTHROPIC_API_KEY_OLD, and neither is present. Docker and Claude CLI are available; subscription auth and the operator Gateway were deliberately not substituted.

Thinking evidence

Claude Code environment variables document MAX_THINKING_TOKENS=0 as disabling thinking and positive values as fixed budgets; adaptive models require CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1 for positive fixed budgets.

Standalone installed Claude Code 2.1.235 headless proof used the sanitized form below (no Gateway, OpenClaw state, credentials, or response content included):

env -u MAX_THINKING_TOKENS claude -p --output-format stream-json --verbose --no-session-persistence '<small prompt>'
MAX_THINKING_TOKENS=1024 claude -p --output-format stream-json --verbose --no-session-persistence '<small prompt>'
MAX_THINKING_TOKENS=16384 claude -p --output-format stream-json --verbose --no-session-persistence '<small prompt>'
MAX_THINKING_TOKENS=0 claude -p --output-format stream-json --verbose --no-session-persistence '<small prompt>'

Observed stream JSON: unset produced 0 thinking blocks; 1024 produced 1 block / 62 thinking tokens; 16384 produced 1 block / 81 thinking tokens; 0 produced 0 blocks / 0 thinking tokens.

The prepared-catalog boundary regression uses sparse logical Anthropic overrides with no reasoning, routes them through claude-cli, and configures params.thinking=medium. It proves logical rows publish runtime reasoning, full levels, and the configured default without runtime siblings in the prepared catalog.

Live-session evidence

#125972 is integrated from 565510b98bd553e18cb40a8a8455edabeed004ac. The reviewed execution chain is executePreparedCliRun → runSerializedClaudeTurn → createCliToolTracking → MCP grant admission. Same-identity captured turns retain one process and one capture key; grant deactivation fences turns; undrained delivery closes the process with mcp-capture-rotation.

The joint real execute/live-session regression proves: 2048 starts the child, another 2048 turn reuses it, and 16384 cancels that child and spawns exactly one replacement. This retains #125972's prompt-cache benefit for unchanged levels while applying a level change on the next captured turn.

Verification

  • pnpm check:test-types — passed.
  • Focused worker, command-row, thinking, Claude live-session/capture, Anthropic plugin, and preparation suites — passed.
  • pnpm check:changed — passed.
  • ./.agents/skills/autoreview/scripts/autoreview --mode uncommitted and --mode branch — clean; no accepted/actionable findings.

The CI repair also adds the new prepared runtime fact to both worker fixtures and corrects the command-list expectation: authored models.providers[].models[].input remains authoritative even though provider normalization runs, so normalization must not add image capability the operator did not configure.

Production vs test LOC

Relative to origin/main, production is +260/−39 (net +221) and tests are +682/−132 (net +550). Production growth is the prepared-capability owner boundary and Claude Code launch contract; test growth covers preparation, capture lifetime, and cross-boundary regressions.

What was not tested

The operator's live Gateway and ~/.openclaw state were not touched. No new live cache-token benchmark was run after combining the PRs; repeating one would require operator credentials/state. The owner-path tests are the closest safe proof.

Deployed live proof (2026-08-19)

oc-update --skip-codex deployed the current aggregate overlay build (base 5976e74d1cc8022c82c644f9d2fffbd07473d7a5; included #125471 and #125528) and completed successfully. The restarted Gateway reported Runtime: running, Connectivity probe: ok, and NRestarts=0.

Sanitized migration pair, from the same live config key:

before: {"provider":"anthropic","mode":"token"}
after:  {"provider":"claude-cli","mode":"oauth"}

The updater doctor stage reported: Migrated legacy external CLI auth.profiles metadata to OAuth. After restart, models.authStatus published one coherent credential-bearing provider:

{"provider":"claude-cli","status":"ok","profiles":[{"profileId":"anthropic:claude-cli","type":"oauth","status":"expiring"}]}

The prior observed contradiction, {"provider":"anthropic","status":"missing","profiles":[]} beside the Claude CLI profile, is absent. expiring is the profile rotating access-token horizon; the provider itself is ok and is not reported missing.

Post-restart models.list reports all configured Claude CLI routes as available and reasoning-capable. Fable: available:true, reasoning:true, [off,minimal,low,medium,adaptive,high,xhigh,max], default:high; Haiku: available:true, reasoning:true, [off,minimal,low,medium,high], default:medium; Opus and Sonnet: available:true, reasoning:true, [off,minimal,low,medium,adaptive,high,xhigh,max], default:medium. This is the deployed post-restart result, against the previously reported reasoning:false/[off] state.

Real Control UI proof was captured with read-only picker interaction only. Before capture, session/sidebar DOM was hidden locally and the image was cropped to the picker controls; no titles, identifiers, transcript, credential, or message content is present. I opened and visually inspected each capture: the first visibly shows the four selectable Claude CLI rows without a Sign in needed state, and the second visibly shows the unlocked Effort control.

Sanitized deployed Control UI Claude picker

Sanitized deployed Control UI effort control

Maintainer live Claude CLI cache proof (2026-08-19)

The Testbox wrapper completed the command successfully; the backing Actions job later shows cancelled because the externally managed lease was closed after proof, which is expected for this Testbox workflow.

Final repaired-head Claude CLI cache proof (2026-08-20)

  • Real isolated Gateway -> Claude CLI 2.1.237 -> Anthropic API -> MCP tool on exact head 902ed828292c951270055f48ddaf2fda24629855.
  • Cache reuse: 99.67% warmup, 99.68% steady state, expected 0% on the thinking switch, then 99.75% on the next same-level turn.
  • The final child-generation assertion passed, proving the process survived turn-local MCP grant/config rotation and was reused after the thinking transition.
  • Blacksmith Testbox: tbx_01m0f0mv3vqsfny6jb3c72w0vq.
  • Run: https://github.com/openclaw/openclaw/actions/runs/32343507535
  • Focused red/green: the regression test spawned twice before the fingerprint fix and once after it; 132 focused tests passed. A current-main merge proof passed 240 focused tests.

Exact-head hosted Claude CLI cache E2E (2026-08-20)

Compatibility coverage for the CLI-backend preparation additions is additive: contextTokenBudget? and thinkingLevel? remain optional. Existing preparation fixtures that omit them continue to pass, while src/agents/cli-runner/prepare.test.ts explicitly verifies both values when supplied. The Anthropic plugin tests cover the thinking-to-launch mapping.

Final exact-head LOC accounting:

  • Source: +882/-242 (net +640)
  • Tests: +1478/-365 (net +1113)
  • Docs: +12/-5 (net +7)
  • Total: +2372/-612 across 72 files

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Aug 18, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. 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 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 7:49 AM ET / 11:49 UTC.

ClawSweeper review

What this changes

This PR forwards selected thinking levels to Claude CLI processes and reuses compatible Claude live processes across MCP-captured turns without retaining stale turn authority.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open: the PR is not on current main, and source review plus its exact-head hosted Gateway/Claude/MCP evidence support the proposed repair with no discrete correctness finding.

Priority: P2
Reviewed head: 18f3373b0816df8d9d27af303c25c0c81897419a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong exact-head behavior evidence and focused boundary tests support a correct patch, with the broad compatibility-sensitive implementation still meriting current-merge validation.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides exact-head hosted evidence through the real Gateway, Claude CLI, Anthropic, and MCP tool path, including observed warm reuse and required replacement on a thinking change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides exact-head hosted evidence through the real Gateway, Claude CLI, Anthropic, and MCP tool path, including observed warm reuse and required replacement on a thinking change.
Evidence reviewed 6 items Claude thinking projection: The Anthropic CLI backend derives launch environment from the prepared thinking level, while the shared mapper clears inherited values and maps fixed levels to explicit token budgets.
Public plugin seam: The generic CLI-backend context exposes thinkingLevel as an optional prepared value rather than requiring core to import Anthropic implementation details.
Live-session authority transfer: A reusable child adopts the fresh turn grant before reuse; transfer replaces only a same-runtime bearer, clears the prior capture key, removes the source token, and grant resolution revalidates delegated run authority.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw --help

Result: PASS (completed)

pnpm openclaw --help
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-125528-OoKgUF/target$ pnpm openclaw --help
pnpm openclaw --help
$ node scripts/run-node.mjs --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 99.15 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

[tsdown-build] invocation 2/2 finished in 13.2s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 4191ms (slowest: built plugin control-plane loads 3433ms)

OpenClaw 2026.8.1 (18f3373) — All your chats, one OpenClaw.

Usage: openclaw [options] [command]

Options:
  --container ‹name›   Run the CLI inside a running Podman/Docker container named ‹name› (default: env OPENCLAW_CONTAINER)
  --dev                Dev profile: isolate state under ~/.openclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)
  -h, --help           Display help for command
  --log-level ‹level›  Global log level override for file + console 
… output truncated …

Assertions:

  • PASS expect_output: Usage:

How this fits together

The CLI runner prepares each agent turn, launches or resumes a provider-owned Claude CLI child, and routes MCP tool delivery through the Gateway. The change carries prepared thinking policy into that child and rotates each turn’s Gateway authority while preserving an eligible warm process.

flowchart LR
  A[Agent turn] --> B[Prepared CLI execution]
  B --> C[Thinking policy environment]
  B --> D[MCP turn grant]
  C --> E[Claude CLI child process]
  D --> F[Live-process grant transfer]
  F --> E
  E --> G[Gateway MCP tool delivery]
  G --> H[Turn cleanup or next resume]
Loading

Before merge

  • Resolve merge risk (P1) - This is a compatibility-sensitive provider/runtime change: merging alters environment and reuse behavior for existing Claude CLI live sessions, so validation should be against the clean current-main merge result.
  • Resolve merge risk (P1) - The PR adds substantial production code (+714/-242, excluding docs and tests); the added prepared-runtime and authority-transfer ownership must remain justified as the single canonical path rather than grow a second compatibility layer.
  • Resolve merge risk (P1) - The MCP bearer transfer changes a security boundary. Source review found runtime-owner, active-capture, and delegated-authority checks, but this boundary warrants maintainer attention despite the focused coverage.
  • Complete next step (P2) - No repair is indicated; a maintainer should validate the current merge result for the compatibility and authority-lifecycle changes before landing.
Agent review details

Security

None.

PR surface

Source +640, Tests +1113, Docs +7. Total +1760 across 72 files.

View PR surface stats
Area Files Added Removed Net
Source 39 882 242 +640
Tests 29 1478 365 +1113
Docs 4 12 5 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 72 2372 612 +1760

Review metrics

Metric Value Why it matters
Production vs test delta production +714/-242; tests/support +1646/-365; docs +12/-5 The bug fix is architecture-sized; most growth is boundary coverage, while production growth implements the shared prepared-runtime and grant-lifecycle ownership.

Stored data model

Persistent data-model change detected: persistent cache schema: src/agents/cli-runner/prepare.test.ts, persistent cache schema: src/gateway/gateway-cli-backend.live-cache.test-helpers.ts, persistent cache schema: src/gateway/gateway-cli-backend.live.test.ts, serialized state: src/agents/cli-runner/claude-live-process-capture.test.ts, serialized state: src/gateway/session-utils-model.ts, serialized state: src/gateway/session-utils.test.ts, and 2 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #125528
Summary: This PR is the active consolidated repair for Claude CLI live-process reuse and thinking-policy propagation.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Validate the current merge result (recommended)
    Rebase or create the clean current-main merge result and rerun the focused Gateway/Claude/MCP proof before landing.
  2. Accept the scoped lifecycle risk
    Land only if maintainers explicitly accept the provider environment and MCP-bearer lifecycle change after exact merge-head checks are green.

Technical review

Best possible solution:

Preserve the single prepared-runtime capability handoff and fingerprinted live-session path, then validate the clean merge result rather than adding a thinking-specific reuse exception or parallel grant path.

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

Yes for the PR head: source and focused tests define the prior spawn-per-captured-turn behavior, and the PR body supplies exact-head hosted Gateway/Claude/MCP after-fix evidence; this reviewer did not execute it in the read-only checkout.

Is this the best way to solve the issue?

Yes: carrying prepared thinking facts to the provider backend and transferring each fresh admission onto the existing process bearer is cleaner than rediscovering policy at projection time or adding a thinking-only reuse gate.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head hosted evidence through the real Gateway, Claude CLI, Anthropic, and MCP tool path, including observed warm reuse and required replacement on a thinking change.
  • 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 (live_output): The PR body provides exact-head hosted evidence through the real Gateway, Claude CLI, Anthropic, and MCP tool path, including observed warm reuse and required replacement on a thinking change.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The open PR repairs Claude CLI model behavior and live-session efficiency with meaningful but bounded provider impact.
  • merge-risk: 🚨 compatibility: Prepared CLI backend inputs and Claude child-process environment behavior change for existing live-session users.
  • merge-risk: 🚨 message-delivery: MCP capture activation, drain, and child reuse govern delivery of tool-mediated messages.
  • merge-risk: 🚨 security-boundary: Fresh admitted turn authority is moved onto a process-stable MCP bearer and must remain correctly fenced.
  • 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 (live_output): The PR body provides exact-head hosted evidence through the real Gateway, Claude CLI, Anthropic, and MCP tool path, including observed warm reuse and required replacement on a thinking change.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head hosted evidence through the real Gateway, Claude CLI, Anthropic, and MCP tool path, including observed warm reuse and required replacement on a thinking change.

Evidence

Acceptance criteria:

  • [P1] Create or rebase to a clean current-main merge result.
  • [P1] Run the focused Gateway/Claude/MCP proof against that exact merge head.

What I checked:

  • Claude thinking projection: The Anthropic CLI backend derives launch environment from the prepared thinking level, while the shared mapper clears inherited values and maps fixed levels to explicit token budgets. (extensions/anthropic/cli-backend.ts:255, 18f3373b0816)
  • Public plugin seam: The generic CLI-backend context exposes thinkingLevel as an optional prepared value rather than requiring core to import Anthropic implementation details. (src/plugins/cli-backend.types.ts:108, 18f3373b0816)
  • Live-session authority transfer: A reusable child adopts the fresh turn grant before reuse; transfer replaces only a same-runtime bearer, clears the prior capture key, removes the source token, and grant resolution revalidates delegated run authority. (src/gateway/mcp-grant-store.ts:297, 18f3373b0816)
  • Boundary coverage: Focused tests cover captured-process reuse, restart on changed identity, capture-key fencing, and transfer of fresh admission/tool authority onto the stable child bearer. (src/agents/cli-runner/claude-live-process-capture.test.ts:116, 18f3373b0816)
  • Exact-head real behavior proof: The supplied PR body reports an isolated real Gateway → Claude CLI → Anthropic → MCP run at this head: tool calls completed, the child survived normal grant rotation, a thinking switch replaced it, and the following compatible turn reused the replacement. (18f3373b0816)
  • Area provenance: History shows Peter Steinberger’s substantial prior live-session refactor work and Patrick Erichsen’s exact-head changes on the same path; the local checkout is the open PR head, not a released fix on main. (src/agents/cli-runner/claude-live-session.ts:164, 18f3373b0816)

Likely related people:

  • Peter Steinberger: Authored the major Claude live-session refactor and several subsequent changes on the central session path. (role: feature-history contributor; confidence: high; commits: f5aba5443734, 7ec87b87e783, c9b346e216a6; files: src/agents/cli-runner/claude-live-session.ts)
  • Patrick Erichsen: Authored the exact reviewed head’s live-session, authority-transfer, and prepared-runtime changes. (role: recent area contributor; confidence: high; commits: 18f3373b0816; files: src/agents/cli-runner/claude-live-session.ts, src/gateway/mcp-grant-store.ts, src/plugins/cli-backend.types.ts)

Rank-up moves

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

  • Validate the clean current-main merge result with the focused Gateway/Claude/MCP proof.

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 (26 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-20T07:02:01.912Z sha 972e062 :: found issues before merge. :: [P2] Preserve the concrete runtime thinking policy
  • reviewed 2026-08-20T07:23:37.529Z sha 902ed82 :: found issues before merge. :: [P2] Propagate runtime thinking policy to session paths
  • reviewed 2026-08-20T07:44:34.223Z sha d02eed3 :: needs changes before merge. :: [P2] Honor mandatory provider thinking in models.list
  • reviewed 2026-08-20T08:12:47.623Z sha 79e633c :: needs real behavior proof before merge. :: [P2] Document the new prepareExecution thinking input
  • reviewed 2026-08-20T08:38:05.909Z sha 2fbcfe0 :: needs real behavior proof before merge. :: [P2] Document the prepareExecution thinking input
  • reviewed 2026-08-20T09:03:23.790Z sha 8ea0a6d :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T09:26:42.034Z sha c4ab4c0 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-20T11:20:16.815Z sha 18f3373 :: needs real behavior proof before merge. :: none

@VACInc
VACInc force-pushed the fix/claude-cli-thinking-catalog branch from 9be8039 to 1baba8c Compare August 18, 2026 19:02
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M and removed size: S labels Aug 18, 2026
VACInc and others added 2 commits August 18, 2026 15:32
MCP delivery capture no longer kills the warm Claude process after every
turn. Capture-key admission is fenced by grant activate/deactivate so
prompt-cache continuity can survive across messages.

Co-authored-by: Cursor <[email protected]>
@VACInc

VACInc commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 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:

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 19, 2026
@VACInc

VACInc commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 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 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 20, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 20, 2026
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 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:

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 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 removed the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Aug 20, 2026
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Merged via squash.

@VACInc

VACInc commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

Related follow-up: #140566 (“preserve resumed CLI caches across Git changes”) is now merged.

Keeping a compatible Claude process warm and preserving the request prefix when a process must resume are complementary improvements. The new fix targets the latter: it prevents Claude Code’s refreshed startup Git snapshot from rewriting the conversation prefix after workspace activity.

It does not change MCP capture/grant lifetimes, process-reuse decisions, or thinking-level transitions. It should not be read as replacing the warm-session work tracked here. Existing merged/closed status is unchanged.

Reference: #140566

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

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation extensions: anthropic extensions: microsoft-foundry gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants