fix(agents): isolated cron busts prompt prefix cache via per-run session id#96686
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 25, 2026, 4:11 AM ET / 08:11 UTC. Summary PR surface: Source +38, Tests +74. Total +112 across 4 files. Reproducibility: yes. at source level: current main constructs a Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this prompt-rendering fix after maintainers accept the prompt-facing cron identity tradeoff, while keeping actual isolated-cron routing, transcript, cleanup, and delivery state per-run. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main constructs a Is this the best way to solve the issue? Yes. Prompt-facing normalization in AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 770b19f496c1. Label changesLabel justifications:
Evidence reviewedPR surface: Source +38, Tests +74. Total +112 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
cea99f9 to
c8d516b
Compare
…ion id Isolated cron runs carry a per-run :run:<id> session scope (openclaw#91685) rendered verbatim into the cached system-prompt Runtime line, re-busting byte-exact prefix caching for the tool catalog after it every run (openclaw#96677, openclaw#43148 class). buildRuntimeLine now renders the stable base session key and drops the per-run id the run scope duplicates; parseCronRunScopeSuffix is gated to the isolated-cron key shape so a :run: segment in any other session key is never truncated.
c8d516b to
a32fa89
Compare
|
Maintainer landing proof for
Residual evidence limit: no independent live metered-provider token trace; cache stability is proven deterministically at the renderer, cron execution, observability, and affected transport boundaries. |
|
Merged via squash.
|
…ion id (openclaw#96686) * fix(agents): isolated cron busts prompt prefix cache via per-run session id Isolated cron runs carry a per-run :run:<id> session scope (openclaw#91685) rendered verbatim into the cached system-prompt Runtime line, re-busting byte-exact prefix caching for the tool catalog after it every run (openclaw#96677, openclaw#43148 class). buildRuntimeLine now renders the stable base session key and drops the per-run id the run scope duplicates; parseCronRunScopeSuffix is gated to the isolated-cron key shape so a :run: segment in any other session key is never truncated. * fix(agents): preserve mixed-case cron run markers * test(agents): cover rotated cron session identity --------- Co-authored-by: Peter Steinberger <[email protected]>
…ion id (openclaw#96686) * fix(agents): isolated cron busts prompt prefix cache via per-run session id Isolated cron runs carry a per-run :run:<id> session scope (openclaw#91685) rendered verbatim into the cached system-prompt Runtime line, re-busting byte-exact prefix caching for the tool catalog after it every run (openclaw#96677, openclaw#43148 class). buildRuntimeLine now renders the stable base session key and drops the per-run id the run scope duplicates; parseCronRunScopeSuffix is gated to the isolated-cron key shape so a :run: segment in any other session key is never truncated. * fix(agents): preserve mixed-case cron run markers * test(agents): cover rotated cron session identity --------- Co-authored-by: Peter Steinberger <[email protected]>
Summary
agent:<agent>:cron:<job>:run:<runId>).buildRuntimeLinerendered that key and the matching session id into the prompt-facingRuntime:line. Transports that strip the explicit cache-boundary marker and rely on automatic literal-prefix caching therefore received different prompt bytes for every run, invalidating reuse before the tool catalog.Runtime:. Their interaction made prompt identity volatile. fix(cron): refuse keyless implicit isolated cron delivery inherited from shared agent-main bucket #91685 changed delivery-target resolution, but did not introduce or render the run-scoped key. The issue reporter's measured 2026.6.8/2026.6.9 boundary is useful runtime evidence, but that exact version boundary is not source-verifiable because v2026.6.8 already contains both source changes.parseCronRunScopeSuffixrecognizes the terminal canonical cron-run shape,buildRuntimeLinerenders the stable job key, and asessionIdis omitted only when it duplicates the parsed run id. Execution, transcripts, routing, delivery, registry, and cleanup remain run-scoped.Scope and behavior
sessionIdis preserved.:run:segments, and channel-owned:run:data remain unchanged.The tradeoff is deliberate: the model sees stable cron-job identity instead of the concrete run key, while every operational identity path still uses the concrete run-scoped key.
Proof
Exact reviewed head:
a32fa8912f9bffd23310f851ab41141d1a6e925fSanitized untrusted-source AWS Crabbox proof (
cbx_b3d9e9da2799, runrun_a702d09110a3, Linux/Node 24) ran:Result: 7 files across 4 Vitest shards, 579 tests passed. Fresh maintainer autoreview found no actionable findings. Exact-head hosted CI is required before merge; an Opengrep installer network-fetch failure was rerun successfully.
Not independently tested: live metered-provider token telemetry. The cache-stability mechanism is covered deterministically at the renderer, cron execution, observability, and affected transport boundaries.
Release note
Fix isolated cron prompt-cache stability by keeping per-run UUIDs out of the prompt-facing runtime identity.
Change type
Scope
Fixes #96677