Repository navigation
fix(agents): keep read-only steering carriers when publishing suppressed user envelopes - #200156
Merged
Merged
Conversation
…sed user envelopes Object.assign copied the persisted spread-copy's enumerable steering symbol onto the runtime message's read-only carrier, throwing inside the store writer and crashing the Gateway on an unhandled rejection. Publish only string-keyed envelope fields; symbol-carried runtime facts stay prepared.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
November 16, 2026 15:32
Contributor
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
vincentkoc
added a commit
that referenced
this pull request
Nov 16, 2026
…tgres-compaction-watched-prompt-20261116 * commit '9e810f7101557b006d5ff223d955f14dc43329f0': (23 commits) chore(ui): refresh control ui locales (#200164) fix(update): stop reporting unset git config keys as failing checks (#200153) test: consolidate redundant coverage (198793, part 2) (#198936) revert: skills-used full-transcript scan on every chat history page (#200159) refactor(sessions): follow the chat by key for stored delivery references (#200099) fix(update): bridge 2026.11.5-beta.4 updaters (#200152) fix(gateway): avoid filesystem stalls during catalog refresh (#200136) fix(ci): match update refusal probe to selected candidate (#200043) fix(agents): keep read-only steering carriers when publishing suppressed user envelopes (#200156) test: consolidate suites while retaining recovery owners (#198933) test: consolidate redundant coverage (198789, part 2) (#198932) refactor(cli): consolidate camera command tests (#200144) fix(cli): avoid initializing provider runtime during cleanup (#200139) fix(ui): show mobile destinations without the drawer exit delay (#198879) chore(ui): refresh control ui locales (#200146) fix(knowledge): keep historical claims distinct and reject changed retries (#200140) fix(ui): align dropdown arrows on mobile New Session improve(sessions): archive inactive transcripts by default (#199899) refactor(agents): own background commands and yield waits by the chat (#200097) fix(models): guessed non-chat models leave the default picker instead of being refused (#200102) ...
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 17, 2026
…sed user envelopes (openclaw#200156) Object.assign copied the persisted spread-copy's enumerable steering symbol onto the runtime message's read-only carrier, throwing inside the store writer and crashing the Team Gateway (2026-11-16 07:04 PST) on an unhandled rejection. Publish only string-keyed envelope fields; symbol-carried runtime facts stay prepared. Regression test reproduces the TypeError on main. Production crash hotfix, merged at pinned head after exact-head local proof with no failing CI jobs.
RomneyDa
added a commit
that referenced
this pull request
Nov 17, 2026
Backport ade4216. Publish string-keyed persisted envelope fields without assigning readonly symbol carriers. Co-authored-by: RomneyDa <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Team Gateway crashed on 2026-11-16 at 07:04:29 PST (release 25c9790) with an unhandled promise rejection:
The throw happened inside the store writer queue, so the process exited and systemd restarted it. The restart interrupted 13 sessions (restart-resume), 6 subagent waits, 3 cron jobs and two long runs.
Why This Change Was Made
attachSteeringRuntimeContext(src/agents/embedded-agent-runner/run/runtime-context-prompt.ts) defines the steering carrier withObject.defineProperty, enumerable but non-writable. Spread copies of the runtime user message carry that enumerable symbol into the prepared/persisted envelope.publishPersistedUserEnvelopedeletes the runtime message's string keys and then ranObject.assign(runtime, persisted, { content }).Object.assignalso copies enumerable own symbols, so it tried to overwrite the read-only carrier and threw.The function's own comment says symbol-carried media and steering facts stay on the runtime message. The fix publishes only string-keyed envelope fields (
Object.fromEntries(Object.entries(persisted))), which matches that contract. Production LOC: +2 (one changed line plus a two-line comment explaining the read-only carrier hazard).User Impact
Steered user turns whose persistence is suppressed no longer crash the Gateway, and the steering carrier on the runtime message is preserved.
Evidence
publishes a suppressed user envelope without rewriting the steering carrierinsrc/agents/embedded-agent-runner.guard.test.ts. On unfixedmainit fails withTypeError: Attempted to assign to readonly property; with the fix it passes.node scripts/run-vitest.mjs src/agents/embedded-agent-runner.guard.test.ts src/agents/session-tool-result-guard.test.ts src/agents/embedded-agent-runner/run/runtime-context-prompt.test.ts: 18 + 37 passed.node scripts/check-changed.mjs: all lanes pass except the dead-export scan, which flagsProjectedContinuationSourceinsrc/config/sessions/session-history-types.ts. That file is untouched here; it's an inheritedmainregression.