Skip to content

Refresh ACP permissions on follow-ups and queued steers - #4795

Closed
brsbl wants to merge 8 commits into
mainfrom
fix/acp-permission-refresh
Closed

brsbl wants to merge 8 commits into
mainfrom
fix/acp-permission-refresh

Conversation

@brsbl

@brsbl brsbl commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

ACP sessions retained their startup permission policy and write roots on follow-ups and queued steers. Switching from Full Access to workspace permissions could therefore keep automatically approving requests.

What changed

  • Follow-ups and queued steers apply the current permission policy and writable roots before sending their prompt.
  • Agents update in place unless native permission flags require a restart, preserving one logical turn across steers.
  • Restarted agents resume the conversation when supported; otherwise BB reports that context was lost.

How you verified

  • Remote regressions reproduced stale auto-approval and split steer lifecycles before their fixes. Policy · Lifecycle
  • Live Hermes ACP 0.18.0 preserved conversation memory and completed a harmless command after an in-place permission change.
  • Remote CI passed on aba7f1f, including Linux/Windows permission and single-turn lifecycle regressions. Run

Live queued-steer QA is blocked by a Hermes cancellation error (NoneType has no attribute startswith), reproduced on unchanged main. Automated queued-steer regressions pass.

BB-Thread-ID: thr_amz5shmy85

AGENT GENERATED

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T03:46:57.358272Z 70f1128 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70f112862c

ℹ️ 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".

@brsbl

brsbl commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator Author

Deferred to #4797 at the user’s request because they have no ACP plugin available for acceptance testing. The issue preserves reproduction details, existing implementation and CI evidence, and the outstanding real-agent queued-steer validation gap. Closing without merging; retaining the branch for future work.

@brsbl brsbl closed this Oct 3, 2026
ymichael added a commit that referenced this pull request Oct 5, 2026
## Human comments

## What was wrong

After the runtime delegated permission reconciliation to providers in
#1640, ACP retained its launch-time write policy on follow-ups and
ignored changed execution options on steers. A thread started in Full
could still write outside the workspace after switching to Accept-edits.

## What changed

Reconcile ACP permissions before follow-up prompts and steered
re-prompts. Update bridge-owned policy in place when launch arguments
stay the same; rebuild and use existing session/load support when
permission arguments differ. Preserve queued inputs across rebuilds and
report failed reconstruction. Keep the unchanged-mode path synchronous
to preserve concurrent-start rejection.

Add a shared permission-change contract covering ACP, Codex, and Claude,
include Claude’s dependencies in the Windows foundation job’s filtered
install, and correct ACP fixtures that accidentally changed modes. No
server/daemon wire changes or new public API/CLI surface.

## How you verified

- Turbo lint, typecheck, and tests for `@bb/provider-bridge-acp` and
`@bb/provider-bridge-protocol`: 367 ACP and 299 protocol tests passed,
including 40 permission transitions. Four unrelated ACP operation tests
skipped.
- After CI exposed the missing Claude install in the Windows foundation
job, corrected its package filter; the targeted local shared contract
rerun passes all 24 cases, and the corrected hosted Windows foundation
job passes, including all 24 contract cases (296 protocol tests passed,
3 unrelated platform skips; 371 ACP tests passed).
- Historical bridges fail the relevant contract: all 16 ACP transitions;
all 6 pre-#4794 Codex steers; all 12 pre-#4789 Claude transitions.
- Real OpenCode v2.0.22 with live `opencode/fledge-alpha-free` through
the source ACP bridge (model/token provenance confirmed by session
export): base reproduces the outside write after tightening; head passes
tightening/loosening on follow-ups and active-tool steers. Accept-edits
forwards approval, denial leaves the file absent; Full writes the file.
- Real OpenCode environment-triggered rebuilds change PIDs, retain the
session, and recover a random token from earlier conversation history
without reading files. OpenCode ACP rejects `--auto`, so permission-CLI
argument changes, queued steer ordering, and reconstruction failure
retain deterministic harness coverage.
- Strict recorded ACP parity: 10 passed, 0 failed, 1 skipped with an
empty temporary allowlist. Default full parity reports 9 stale allowlist
failures, with no event/row/grammar differences; a representative
failure reproduces in an untouched baseline-versus-baseline control.

Real ACP checks invoke the bridge worker directly, not the full BB
UI/server/daemon path. Codex/Claude contract adapters use real bridges
with provider fakes; native-provider evidence for those unchanged
bridges predates this commit. Background tools and Linux sandboxes are
outside this verification.

Fixes #4806.

Partially addresses #4797: permission refresh on follow-ups and steers,
conditional rebuilds, and session restoration are covered. Its
single-logical-turn requirement across native-flag restarts remains
outstanding: this implementation emits a cancelled turn boundary and
opens a replacement turn. The earlier alternative PR #4795 is closed and
was not merged.

> AGENT GENERATED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant