Skip to content

fix(sessions): keep Gateway responsive with long transcripts - #138094

Merged
steipete merged 8 commits into
mainfrom
codex/session-context-latency
Sep 4, 2026
Merged

steipete merged 8 commits into
mainfrom
codex/session-context-latency

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Long Codex transcripts could pause the Gateway for seconds even when compaction left only a few visible messages. The synchronous SQLite scan blocked timers, channel work, Workshop review, and settled-turn verification. Moving that scan to workers also exposed callers that could resume canceled work or leak resources while waiting for history.

Why This Change Was Made

Core model-context reads and Codex native-history verification now use bounded, reusable workers. The existing readonly snapshot and selection remain authoritative; the native reader stays lazy, so a rejected projection never decodes later payloads. The accepting facade validates the original turn admission or the same snapshot's existing rewrite generation and event sequence. Admitted later appends and unrelated-session appends remain accepted.

Cancellation belongs to the operation that acquired the work. Workshop carries its original Gateway restart signal through context acquisition and checks it before starting a review or entering another proposal. The Codex compaction projector checks its closure/abort state before and after awaited history and hooks. Asynchronous MCP preview preparation now finishes before the existing closure check and synchronous recording, preventing late progress or transcript writes.

The attempt owner disposes configured and requester MCP handles on every exit after acquisition; each disposer runs independently, preserving the original setup error. The connection factory releases its upstream abort listener if preparation fails before ownership transfers. Cancellation remains observable during pending rotation. Duplicate cleanup paths and the asynchronous record-before-check helper are removed.

The shipped synchronous APIs remain available; incognito reads remain in the process that owns their in-memory database. This changes no configuration, environment surface, SQLite schema, stored representation, retention, or native protocol. Native realtime voice remains enabled; its separate interruption/reply repair landed in #138072.

User Impact

The Gateway can service timers and other requests while durable context is built. Canceled compaction and Workshop work cannot start later hooks or reviews. Closed projections cannot record late MCP previews; ordinary native results can still settle after abort while the projection remains open. Failed history preparation releases startup resources. This moves scan work off the event loop; it does not make SQL scanning constant-time or remove worker startup and memory costs.

Evidence

The candidate preserves main's eager payload batching from #138168 and fixture cleanup from #138238. Final head 90193d75bd3b5dd8005c3fc095fbf928c87aee9c differs from 99c2875 only by a Workshop test spy correction. Independent P2 review is clean for the complete 44-path implementation in two packs and for that final test-only delta. The complete canonical changed-check run passed on this head, including full type checking, all three dead-code scans, full lint, runtime import cycles and structural/config/SDK/store guards. All 44 committed files and 8,323 runtime artifacts were independently rehashed afterward and remained unchanged. Exact-head CI passed: 112 jobs succeeded and 15 were skipped, with no failures.

Validation passed 326 owner/sibling cases, the canonical requester-MCP fork/restart integration with a real loopback HTTP server, 256 final affected cases across eight projector families and startup/MCP ownership, and 21 Workshop cases after the spy correction. These runs overlap and are not summed as unique tests. Full lint caught two unbound-method references in the new Workshop regression; the corrected test passes targeted type-aware lint and retains every behavioral assertion.

The runtime build at 99c2875 passed all five supported phases, 90 plugin runtimes, and native loading of 53 control-plane modules. Eight fresh packaged probes passed on Node 26.8.1 and checksum-verified official Node 22.22.3, bound to source digest 94ed931e and the same 8,323 JavaScript artifacts (04ae46d4). The subsequent test-only correction leaves production source unchanged; it is not described as a new runtime build.
A synthetic SQLite history contains 1,600 large messages (421,412,864 bytes), a compaction boundary, and 13 visible context messages. Output hashes and the complete raw transcript fingerprint remained identical. Warm model/native worker timer lateness was 2.8–6.9 ms, compared with 574–580 ms for the batched synchronous read. The full mutation/projection suite's highest sample was 22.5 ms. Cold worker reads took 1.01–1.21 seconds, and warm process RSS was 409–638 MiB. Whole-process peaks of 686–801 MiB include artifact hashing and the separate observer. These are observed fixture results, not latency or memory guarantees; they demonstrate responsiveness, not faster scans or an authenticated provider turn.

Packaged proof covers cancellation/reuse, admission rewrite rejection, admitted later-append acceptance, unrelated-session acceptance, unadmitted durable/incognito append and rewrite rejection, complete settled projection, and lazy budget rejection with zero later payload decodes. All processes exit naturally with idle workers. Earlier stock Codex 0.153.0 proof passed four finalizer scenarios against a synthetic loopback provider, including host-capability closure; it was not authenticated provider testing.

New regressions failed before repair: five Workshop restart boundaries; six late compaction-hook calls and four late compaction-event continuations, with two additional signal-forwarding cases; two late MCP preview results; MCP handle/listener leaks before startup; setup cleanup skipping the second disposer and replacing the original error; and connection-factory failure retaining a listener and invoking a stale abort callback. Controls preserve positive compaction, aborted-but-open native result settlement, immediate cancellation during rotation, and normal resource disposal. An initial Workshop test fixture error was corrected and its five cases rerun to valid red before accepting green.

The lead personally compared OSS Codex at 1b53f6a44eff890b5169bde8d3bd5b12b8766946: codex-rs/core/src/tasks/mod.rs:301–405 owns the task and child cancellation token; :909–945 cancels and joins/aborts it; tasks/compact.rs and tasks/review.rs:54–91 retain work inside that lifecycle. OpenClaw's JavaScript continuations need explicit checks at their own ownership boundaries; this PR does not change Codex protocol behavior.

Review and CI

Final CI tested merge a17dd17b60c35f9509a276e4c10d48d3bb473be2, whose parents are main 068ef71bd20e0b22f92c26364b758551aa13363b and PR head 90193d75bd3b5dd8005c3fc095fbf928c87aee9c. The production dependency audit executed and found no matching high-or-higher advisories from npm bulk. It explicitly excludes upstream repository advisories and is not comprehensive vulnerability clearance.

The ClawSweeper review identified the two late-continuation P1s on 0901bf7: compaction hooks after projection closure and Workshop acquiring a fresh restart signal after reset. Both are repaired at their lifecycle owners, with failing/passing regressions. Its Rank-up moves require those repairs, green exact-head CI, and a production-growth explanation; packaged proof, all local checks and exact-head CI are complete. The durable review was rechecked before landing; no additional finding had been published, and the requested re-review remains a publisher refresh. The earlier unadmitted snapshot P1 is also repaired at the accepting facade, with durable/incognito regressions and admitted-append controls.

Historical CI 33873290186 passed all 111 executed jobs, with 15 skipped, on 0901bf7; its actual tested merge was 740d537abc78de06645edbc6ea122f675b7d0a6c. The production dependency audit executed successfully and reported no high-or-critical registry matches; its output explicitly excludes upstream repository advisories. That run predates the lifecycle repairs and does not clear their final head.

Earlier CI exposed a type-import cycle and missing-worker packaging fixture, both repaired. Run 33867413182 exposed three Code Mode denial fixture failures after main removed an outcome hook. The fixture now uses the real in-memory session manager and structured-result classifier, retaining specific denial, guest/bridge phase, nested-denial, and zero-action assertions. Main's concurrent cleanup is preserved. No production fallback, timeout increase, retry, or weakened assertion was added.

The broader recovery run 33860752777 was canceled after classifying advisory-service timeout, PowerShell pre-READY failure, registry teardown race, and an old rollback fixture timeout. It is not passing evidence. Normal CI passed those cases; the registry's six ordered local cases also passed without context workers, and main already carries the rollback fixture repair.

Scope and Follow-ups

Production: +1,041/-531 (net +510). Tests and test support: +1,024/-71 (net +953). Docs: net +2; build entries: net +2. Raw counts include method moves and try-scope indentation, which do not represent new behavior. Growth provides the two worker boundaries, the additive API needed to preserve shipped synchronous callers, snapshot acceptance checks, and cleanup/cancellation ownership around newly asynchronous work. Existing verification is moved rather than duplicated; the obsolete generic history wrapper and duplicate resource cleanup are removed. No new database design or operator action is required.

Already-entered Workshop apply transitions retain their existing commit/rollback behavior. This patch fences entry and subsequent proposals; a named follow-up is to audit cancellation and lease enforcement inside that existing transaction. Other bounded follow-ups from the CI investigation are PowerShell startup timing, registry fixture writer/cleanup lifetime, and cold session-deletion profiling if it recurs on the current fixture.

@steipete
steipete requested a review from a team as a code owner September 4, 2026 08:38
@clawsweeper

clawsweeper Bot commented Sep 4, 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 docs Improvements or additions to documentation scripts Repository scripts agents Agent runtime and tooling extensions: codex size: XL maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. 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 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 8:48 AM ET / 12:48 UTC.

ClawSweeper review

What this changes

This PR moves long session-history and model-context reads onto worker-backed paths, with supporting validation and packaging changes to keep Gateway work responsive.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 7 items remain

Keep open: two worker-backed read paths can continue with hooks or autonomous review work after their owning projection or Gateway admission has closed.

Priority: P1
Reviewed head: 0901bf7cd0f4fe0ade7ccc7893155b23f13e2fda

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The worker-read direction is coherent, but two P1 lifecycle races remain untested and unguarded.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 7 items Introduced asynchronous history path: The PR-head diff replaces the native-evidence reader with an awaited worker call, making compaction-hook history acquisition externally delayable.
Compaction closure gap: The projector awaits mirrored history immediately before both compaction hooks, while closeProjection only sets projectionClosed; neither hook path rechecks closure after that await.
Workshop stale-admission gap: The PR changed the Workshop path from synchronous context acquisition to openModelContextAsync without a signal; reset aborts the old restart signal and replaces its controller before the subsequent review obtains a signal.
Findings 2 actionable findings [P1] Fence compaction hooks after the worker history read
[P1] Keep Workshop reviews bound to their pre-reset admission
Security None None.

How this fits together

Session transcripts feed both the Codex app-server event projector and background Skill Workshop reviews. Worker reads produce detached history that those consumers use for compaction hooks, review execution, and proposal actions.

flowchart LR
A[Session transcript] --> B[Worker history reader]
B --> C[Codex event projector]
B --> D[Skill Workshop review]
C --> E[Compaction hooks]
D --> F[Proposal actions]
G[Projection close or Gateway reset] --> C
G --> D
Loading

Before merge

  • Fence compaction hooks after the worker history read (P1) - readCodexMirroredSessionHistoryMessages now waits for a worker at this line. If closeProjection() runs during that wait, handleItemStarted and handleItemCompleted still invoke their compaction hooks before their next closure check. Pass the run signal through the transcript reader, recheck closure/abort immediately after the read and before each hook, and add a delayed-read → close → release regression proving neither hook runs.
  • Keep Workshop reviews bound to their pre-reset admission (P1) - This new await has no captured restart signal. A Gateway reset can abort and retire the old admission while the context read is pending; when it returns, runSkillWorkshopReview obtains the replacement un-aborted signal and can start a stale review or proposal action. Capture the restart signal before the read, pass it to both the context read and review, recheck it after awaiting, and add a reset-during-read regression.
  • Resolve merge risk (P1) - The bug-fix branch has production +711/-278 lines (net +433); avoid retaining wrapper/refactor growth that is not required for the worker ownership boundary.
  • Complete next step (P2) - Fence both delayed-read lifecycle paths, add the close/reset race regressions, and obtain green exact-head CI before merge.
  • Improve patch quality - Fence the compaction hook paths after their worker read.
  • Improve patch quality - Bind Workshop acquisition and execution to the same pre-reset signal.
  • Improve patch quality - Run the focused race regressions and fresh exact-head CI.

Findings

  • [P1] Fence compaction hooks after the worker history read — extensions/codex/src/app-server/session-history.ts:101-103
  • [P1] Keep Workshop reviews bound to their pre-reset admission — src/skills/workshop/experience-review.ts:437-439
Agent review details

Security

None.

PR surface

Source +430, Tests +409, Docs +2, Other +3. Total +844 across 29 files.

View PR surface stats
Area Files Added Removed Net
Source 18 708 278 +430
Tests 8 467 58 +409
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 2 3 0 +3
Total 29 1181 337 +844

Review metrics

Metric Value Why it matters
Production versus test delta production +711/-278 (net +433); tests/support +467/-58; docs +3/-1 The reliability fix materially grows production code, so the repaired lifecycle boundary should be simplified where possible.

Merge-risk options

Maintainer options:

  1. Fence both delayed read paths (recommended)
    Propagate the captured owner signal through the worker read and add close/reset race tests before requesting fresh exact-head validation.

Technical review

Best possible solution:

Carry the original closure or restart signal through each read-to-side-effect chain, recheck it after the read, add both delayed-read race regressions, and absorb any avoidable production growth.

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

No live reproduction was run in this read-only review, but the delayed-read interleavings are directly reproducible from the source paths and existing test seams.

Is this the best way to solve the issue?

No: worker offloading is appropriate, but the current implementation fails to preserve lifecycle authority across the new awaits.

Full review comments:

  • [P1] Fence compaction hooks after the worker history read — extensions/codex/src/app-server/session-history.ts:101-103
    readCodexMirroredSessionHistoryMessages now waits for a worker at this line. If closeProjection() runs during that wait, handleItemStarted and handleItemCompleted still invoke their compaction hooks before their next closure check. Pass the run signal through the transcript reader, recheck closure/abort immediately after the read and before each hook, and add a delayed-read → close → release regression proving neither hook runs.
    Confidence: 0.98
  • [P1] Keep Workshop reviews bound to their pre-reset admission — src/skills/workshop/experience-review.ts:437-439
    This new await has no captured restart signal. A Gateway reset can abort and retire the old admission while the context read is pending; when it returns, runSkillWorkshopReview obtains the replacement un-aborted signal and can start a stale review or proposal action. Capture the restart signal before the read, pass it to both the context read and review, recheck it after awaiting, and add a reset-during-read regression.
    Confidence: 0.97
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: A Gateway reset or closed Codex projection can still start background work with observable session and proposal effects.
  • merge-risk: 🚨 session-state: The unfenced continuations can operate on transcript-derived session work after the owning lifecycle has closed.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

Acceptance criteria:

  • [P1] pnpm test extensions/codex/src/app-server/event-projector.verbose-hooks.test.ts src/skills/workshop/experience-review.apply.test.ts.
  • [P1] pnpm test src/agents/sessions/session-manager-model-context.test.ts.
  • [P1] pnpm check:changed.

What I checked:

Likely related people:

  • unknown: 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 (4 earlier review cycles)
  • reviewed 2026-09-04T09:15:29.990Z sha 144c3c0 :: blocked before merge. :: none
  • reviewed 2026-09-04T09:48:02.149Z sha 78b66fe :: blocked before merge. :: [P1] Reject stale unfenced worker snapshots
  • reviewed 2026-09-04T11:06:22.405Z sha f3a806f :: blocked before merge. :: none
  • reviewed 2026-09-04T11:53:21.180Z sha 4a781bc :: blocked before merge. :: [P1] Fence compaction hooks after delayed history reads

Keep the required context worker in both release-check packaging fixtures.
@steipete steipete closed this Sep 4, 2026
@steipete steipete reopened this Sep 4, 2026
@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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 4, 2026
@clawsweeper clawsweeper Bot added 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 proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. labels Sep 4, 2026
@clawsweeper clawsweeper Bot removed the rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. label Sep 4, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
Use the in-memory SessionManager and normal structured-error projection in
the attempt denial fixture. Assert the policy refusal or unavailable guest
global, recorded nested denial, and zero source preparation or execution.

This fixes the integration failure exposed when main removed the redundant
Code Mode outcome hook, while preventing missing fixture methods from
passing as permission denials. The exact CI merge reproduced three failing
cases before the correction; ordered owner and continuation siblings pass.

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acceptance-time fencing is the key property here. Moving durable scans to workers is safe only if stale snapshots cannot be published; admission revalidation plus rewrite/sequence checks provides that while admitted later appends remain valid.

Merge current main and preserve the fixture cleanup from #138238. Retain
real in-memory session management, structured denial classification, and
recorded nested denial assertions while removing the redundant observation
array.

The CPU context-reader implementation remains unchanged. The combined
candidate preserves main's batching and normal Code Mode continuation.
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 4, 2026
Retain the original Workshop restart signal and fence closed compaction and preview continuations. Transfer MCP cleanup and abort-listener ownership at acquisition, preserving original failures and immediate cancellation during connection preparation.
@steipete steipete self-assigned this Sep 4, 2026
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Head 99c2875 repairs both delayed-read P1s with the original restart/run signals and owner checks. It also fixes reproduced MCP cleanup and connection-listener leaks, and prevents preview recording after projection closure. The PR body documents regression failures, positive controls, cleanup ownership, production growth, and the Workshop apply-transaction follow-up.

Independent P2 review is clean in both packs. The final 256 affected tests pass; the preceding 326-case run and requester-MCP fork/restart proof cover unchanged sibling paths. The fresh runtime build passed. Full local checks, final packaged probes, and exact-head CI are still being completed before landing.

@clawsweeper

clawsweeper Bot commented Sep 4, 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:

@steipete
steipete merged commit ea3e77d into main Sep 4, 2026
194 of 195 checks passed
@steipete
steipete deleted the codex/session-context-latency branch September 4, 2026 14:23
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 4, 2026
…9-prep

* commit '407a8f453c0f0306af1ddc0aafa8697c1d49a9e7': (312 commits)
  perf(ui): coalesce automation event refreshes (#138065)
  fix: reject incomplete Skill Workshop directory reads (#138082)
  test(ui): decouple rendering checks from generated wording (#138283)
  perf: avoid temporary entries in bounded JSON traversal (#138017)
  fix(irc): render complete messages before splitting (#138328)
  perf: prepare worker trajectory payloads only for recorded events (#138086)
  fix(mcp): paginated listings no longer time out after a forward clock step (#137206)
  fix(codex): page native transcripts and bound UI previews (#136282)
  feat(gateway): apply more settings without restarting (#138112)
  fix(docs): preserve mirrored ClawHub maturity links (#138241)
  fix(test): own UI animation and legacy database setup (#138296)
  fix(tts): preserve literal directives in Markdown code (#138319)
  fix: load chat widgets behind authenticated gateways (#138074)
  chore(ui): cover native approval finalization (#137259)
  fix(cron): cancel conditions before main-session handoff (#138313)
  fix(backup): preserve text after embedded NUL characters (#138327)
  fix(android): align composer control sheets (#137442)
  fix(ci): wait for replacement PR runs instead of stale failures (#138307)
  fix(sessions): keep Gateway responsive with long transcripts (#138094)
  fix(computer): map window inputs to delivered image coordinates (#138271)
  ...

# Conflicts:
#	scripts/release-check.ts
#	test/release-check.test.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
…w#138094)

* fix(sessions): keep Gateway responsive with long transcripts

* fix(codex): remove history reader type cycle

Keep the required context worker in both release-check packaging fixtures.

* fix(sessions): reject stale unadmitted context snapshots

* test(agents): verify catalog denials through real sessions

Use the in-memory SessionManager and normal structured-error projection in
the attempt denial fixture. Assert the policy refusal or unavailable guest
global, recorded nested denial, and zero source preparation or execution.

This fixes the integration failure exposed when main removed the redundant
Code Mode outcome hook, while preventing missing fixture methods from
passing as permission denials. The exact CI merge reproduced three failing
cases before the correction; ordered owner and continuation siblings pass.

* fix(sessions): preserve cancellation across history preparation

Retain the original Workshop restart signal and fence closed compaction and preview continuations. Transfer MCP cleanup and abort-listener ownership at acquisition, preserving original failures and immediate cancellation during connection preparation.

* test(workshop): keep context acquisition spies bound
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: codex maintainer Maintainer-authored PR 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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL 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