You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix approval popup not appearing when ACP agents request permission.
The root cause was that approval requests were being deferred during
active streaming, but in ACP mode the agent subprocess blocks waiting
for approval - causing a deadlock.
Changes:
- Handle approval requests immediately in TUI (not deferred)
- Add MOCK_AGENT_REQUEST_PERMISSION support to mock agent
- Enable test_acp_approval_request_displayed_in_tui test
- Update documentation for approval handling behavior
Copy file name to clipboardExpand all lines: codex-rs/acp/HANDOFF.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,22 @@
21
21
-`LocalBoxFuture` is `!Send`, requiring the dedicated worker thread pattern already in `connection.rs`
22
22
- Test snapshot changes for version numbers are pre-existing upstream issues, not caused by this work
23
23
24
-
## Critical Changes to Forthcoming Work
24
+
## Approval Bridging - COMPLETED
25
+
26
+
The approval bridging is now working end-to-end:
27
+
- Permission requests from ACP agents are displayed in the TUI approval popup
28
+
- User decisions are sent back to the agent via `Op::ExecApproval`
29
+
- The TUI handles approval requests immediately (not deferred) to avoid deadlock with blocking agent subprocess
30
+
- E2E test `test_acp_approval_request_displayed_in_tui` passes
31
+
32
+
Key changes:
33
+
- Modified `tui/src/chatwidget.rs` to handle approval requests immediately
34
+
- Added `MOCK_AGENT_REQUEST_PERMISSION` env var support to mock agent
35
+
- Removed `#[ignore]` from approval bridging E2E test
36
+
37
+
## Remaining Work
25
38
26
-
-**Approval bridging is incomplete**: The `submit()` method handles `Op::ExecApproval` and `Op::PatchApproval` by storing decisions in `pending_approvals`, but the actual bridging logic to forward these to the ACP connection's `ClientDelegate` is not yet wired up
27
39
-**MCP servers config**: The plan mentions passing `config.mcp_servers` to `NewSessionRequest`, but this is not yet implemented
28
40
-**Sandbox policy**: Currently read from config but not used - needs to be passed to agent
29
41
-**Error events need refinement**: Currently sends generic error text for unsupported Ops; may need structured error types
30
-
-**E2E tests not yet written**: The plan lists tests in `tui-pty-e2e/tests/acp_mode.rs` that still need implementation
31
-
-**Tool call display**: `ToolCall` and `ToolCallUpdate` translation returns empty vec - needs implementation to show tool execution in TUI
42
+
-**Tool call display**: `ToolCall` and `ToolCallUpdate` translation returns empty vec - needs implementation to show tool execution in TUI (E2E tests exist but fail)
0 commit comments