Repository navigation
Keep a running user turn's approvals when a non-user message steers into it - #8096
Merged
ymichael merged 1 commit intoNov 26, 2026
Conversation
…nto it A non-user message (another thread's bb thread tell, a child-outcome system notice) resolves to permission escalation "deny". When it steered into a turn the user started, runtime.steerTurn recorded the steer's options as the thread's options, so the provider was told to drop approvals (Codex restarted the turn with approvalPolicy never) and runtime-enforced bridges declined the turn's later approvals without asking. steerTurn now never lowers a running turn's escalation from ask to deny (keepRunningTurnApprovals); a user steer can still raise deny to ask. The runtime also logs every approval it declines without asking. Fixes #7040 Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/7040-codex-accept-edits-non-user-steer-can-silen-thr_jnfqbhuram
branch
from
November 26, 2026 04:03
32d274d to
5e587c8
Compare
ymichael
deleted the
bb/7040-codex-accept-edits-non-user-steer-can-silen-thr_jnfqbhuram
branch
November 26, 2026 04:19
alexburlis
added a commit
to alexburlis/omnyo
that referenced
this pull request
Nov 26, 2026
Record the upstream PRs, revisions, contributors, and Omnyo integration commits for merge d2a24ac in docs/upstream-credits.md. Original-PR: get-bb/bb#7663 Original-Commit: get-bb/bb@1737a03 Original-Author: rufi Original-PR: get-bb/bb#8055 Original-Commit: get-bb/bb@651ae20 Original-Author: Jake Lancaster Original-PR: get-bb/bb#8075 Original-Commit: get-bb/bb@511e1ed Original-Author: Jake Lancaster Original-Co-Author: Michael Yong Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8096 Original-Commit: get-bb/bb@775090b Original-Author: Michael Yong Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8145 Original-Commit: get-bb/bb@8de6711 Original-Commit: get-bb/bb@0d3db49 Original-Commit: get-bb/bb@92d3a76 Original-Commit: get-bb/bb@6705422 Original-Author: Michael Yong Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8171 Original-Commit: get-bb/bb@b56ed04 Original-Author: Jake Lancaster Original-PR: get-bb/bb#8238 Original-Commit: get-bb/bb@2a9a142 Original-Author: SawyerHood Original-PR: get-bb/bb#8247 Original-Commit: get-bb/bb@ba4ae22 Original-Author: Salem Original-Co-Author: Claude Opus 5.5 Original-PR: get-bb/bb#8259 Original-Commit: get-bb/bb@96f40a9 Original-Author: SawyerHood Original-PR: get-bb/bb#8263 Original-Commit: get-bb/bb@141e40a Original-Author: mk Original-PR: get-bb/bb#8266 Original-Commit: get-bb/bb@84e20e9 Original-Author: ILIA GOLUBEV
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.
Human comments
What was wrong
A message that isn't from the user (another thread's
bb thread tell, a child-outcome system notice) runs with permission escalationdeny. When it arrived during a turn the user started, the dispatcher steered it into that turn, andruntime.steerTurntook the steer's options as the thread's new options. That revoked the running turn's approvals. Codex's bridge saw the changed permission settings and restarted the active turn withapprovalPolicy: never, so the step that needed approval was aborted and no prompt appeared. Bridges where the runtime enforces approvals (Pi, ACP) kept running the user's work, but the runtime gate now readdenyand declined its later approval requests before any interaction was persisted. I reproduced it on main with real Codex in Accept Edits, 2 of 2 times: a turn ransleep 20and then wrote outside the workspace, another thread sent "FYI, my build finished" during the sleep, and Codex replied "Step 1 was interrupted… Step 2 did not run, and no approval was requested". #7040 asks that informational input not change an active turn's authority.What changed
runtime.ts,execution-options.ts):steerTurnnever lowers a running turn's escalation fromasktodeny(keepRunningTurnApprovals). The provider isn't told to drop approvals, and the runtime gate keeps asking. Non-user messages still join a user-started turn as they do on main. Only the escalation is kept; everything else in the steer's options applies as before. A user steer can still raise adenyturn toask. A strictly fixed per-turn copy would block that and cause the same silent decline in the other direction.runtime-provider-requests.ts): every approval request the runtime declines without asking now logs the request id, turn, thread and reason (denyescalation or no handler). Command contents aren't logged. A kept escalation logs a line too.approve_after_steer:<kind>directive holds the turn until a steer joins it, then raises the approval from that same turn.HOST_DAEMON_PROTOCOL_VERSIONor SDK bump.How you verified
tests/integration/fake/smoke/non-user-steer-approvals.test.tsruns the Codex accept-edits: non-user steer can silently change the active turn approval gate #7040 path end to end on a real server, daemon and scripted echo bridge. A user starts an Accept Edits turn, and another thread's tell (senderThreadId, initiatoragent) joins it. The turn's later approval reaches the user as a pending interaction. After it is allowed, the turn answers with its own response, and its onlyturn/completedhas statuscompleted. Withruntime.tsreverted to main the test fails: no approval reaches the user.runtime.interactive-requests.test.tshas a two-row table. Anaskturn steered withdenystill routes its next approval to the user, and adenyturn steered withaskstarts asking. Each row fails whenkeepRunningTurnApprovalsis mutated to always take the requested or always keep the running escalation. A declined approval logs its reason.pnpm exec turbo run typecheck lint testfor@bb/server(4583 passed),@bb/agent-runtime(319),@bb/host-daemon(930),@bb/templates(47) andbb-plugin-scripted-echo-provider. Typecheck and lint pass for@bb/integration-tests.pnpm start:worktree: a user turn ransleep 20and thenecho done > ~/bb-7040-live-outside/out.txt. Another thread's tell arrived during the sleep and was delivered assent, joining the turn. The sleep kept running and the approval prompt for the write appeared while the thread was still active. After approval Codex reported "sleep 20finished with exit code 0" and "After approval, the shell wrotedone", and the file was written. The thread had one turn: the tell's input was accepted into it, and it endedcompleted.Fixes #7040
🤖 Generated with Claude Code