🤖 fix: terminal wakes skip the compaction request's disable-all tool policy - #4052
Merged
Merged
Conversation
…policy resolveTerminalWakeCallerSendRestrictions walked history backward and adopted the newest user row carrying a toolPolicy. After a compaction, that row is the synthetic compaction-request (toolPolicy: .* disable), so every workflow-result and workspace-turn wake until the next manual send ran with zero tools: the agent could only announce its next step and end the turn (finishReason stop). Skip compaction-request rows in the walk; their per-turn policy only governs the summary turn and is not a caller restriction. Red-green covered by the new taskService test (received .* disable instead of the caller's ^bash$ before the fix). --- _Generated with `xum` • Model: `anthropic:claude-fable-5-1` • Thinking: `xhigh` • Cost: `$0.00`_ <!-- mux-attribution: model=anthropic:claude-fable-5-1 thinking=xhigh costs=0.00 -->
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This comment has been minimized.
This comment has been minimized.
ibetitsmike
deleted the
mike/terminal-wake-skip-compaction-tool-policy
branch
September 2, 2026 08:19
Merged
asm
pushed a commit
to asm/mux
that referenced
this pull request
Sep 2, 2026
## Summary Version bump for the v0.28.4 patch release. The headline change since v0.28.3 is Gemini 3.8 Flash becoming the default Gemini Flash model (coder#4060). The release also carries browser Login with Coder on remote Xum servers (coder#4047), the opt-in project bundle for settings backup (coder#4043), the connection-indicator slow-response surfacing (coder#4059), send-queue and terminal-wake fixes (coder#4053, coder#4052), and the Effect Phase 11 runtime refactors. ## Implementation Bumped with `node ./scripts/set-package-version.js 0.28.4` so the root `package.json` and the legacy `packages/mux-compat` forwarding package stay version-locked (the v0.28.3 bump missed the compat package and broke `Test / Unit` on main, fixed in coder#4048). `src/common/compat/productIdentity.test.ts` passes locally. After this PR merges, the `v0.28.4` tag will be applied to the squash commit and the GitHub Release published to trigger the desktop/npm/docker pipelines. --- _Generated with `xum` • Model: `anthropic:claude-fable-5-1` • Thinking: `medium` • Cost: `$0.00`_ <!-- mux-attribution: model=anthropic:claude-fable-5-1 thinking=medium costs=0.00 -->
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.
Summary
Terminal-attention wakes (workflow results, workspace-turn wakes) no longer inherit the compaction request's disable-all tool policy.
resolveTerminalWakeCallerSendRestrictionsnow skipscompaction-requestrows while walking history for the caller's restrictions, so the wake adopts the row that actually defines the conversation's tool policy.Background
After a compaction, the newest user row carrying a
toolPolicyis the synthetic compaction-request row, whose[{ regex_match: ".*", action: "disable" }]policy exists only for its own summary turn. The wake walk treated it as the caller's restriction, so every terminal wake until the next manual send ran with zero tools (tool configuration ... "toolNames":[]inmux.log). The agent could only answer with text ("Let me inspect the checkout...") and stalled. Observed live on a dogfood workspace whoseimprove-codebase-architectureworkflow finished after a compaction; a paused goal meant nothing re-prompted it.Implementation
Same doctrine as
resolveParentAutoResumeOptions, which already excludes thecompactidentity: the compaction row is a per-turn policy, not a caller restriction, so the backward walk skips it and keeps going.Validation
^bash$) followed by a compaction row and asserts the wake carries the manual restriction; a second run seeds an unrestricted manual row plus compaction and asserts the wake has notoolPolicy..*disable policy instead of^bash$).Risks
Low. The change only affects which user row the terminal-wake walk adopts, and only when a compaction row sits between the wake and the last manual send. Workspaces on older builds still hit the stall after their next compaction until upgraded; a manual message clears it.
Generated with
xum• Model:anthropic:claude-fable-5-1• Thinking:xhigh• Cost:$8.76