🤖 fix: defer bash monitor wakes during task_await#3732
Conversation
Hold same-process monitor wake delivery until an active task_await read settles. This lets the existing shown-frontier gate suppress output the await displayed while preserving wakes for matched output hidden by filters. --- _Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$22.23`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=22.23 -->
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69ed831f0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Expose a non-blocking delivery state for each bash process so WorkspaceService can defer only the wake whose process is currently being awaited. Other monitor matches in the workspace continue to deliver immediately. --- _Generated with `mux` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$22.23`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=22.23 -->
|
Addressed the Codex P2 finding about unrelated monitor wakes. The drain now takes a non-blocking delivery-state snapshot per process. It leaves the blocked process's record pending, schedules a retry when that read settles, and continues delivering other processes' records from the same owner batch. Added a regression proving the unrelated wake is delivered before the blocked read resolves. |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. 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". |
Summary
Defers a bash monitor wake while
task_awaitis already waiting on the same process, preventing the wake from interrupting the wait it is meant to supplement without delaying monitor wakes from unrelated processes.Background
The settled shown-frontier gate only synchronized with unfiltered output reads. A filtered
task_awaitwas invisible to that gate, so a monitor match could enqueue a synthetic wake during the active wait. The queued wake interruptedtask_await, and agents could repeatedly restart the wait and be interrupted by the next monitor match.Implementation
task_awaitreads as blockers for same-process monitor wake delivery.BackgroundProcessManagerso the workspace can defer only records for processes with active blocking reads.Risks
A monitor wake for a process can now be delayed for the duration of an active filtered
task_awaiton that same process. This is intentional and bounded by the await. Wakes for other processes and filtered reads from other callers are unaffected.Generated with
mux• Model:openai:gpt-5.6-sol• Thinking:xhigh• Cost:$22.23