Conversation
|
I like this idea a lot! Thanks for working on this. However, the code seems to show that this is only implemented for codex, which I think it's fine to start with. But is it possible to factor the code into an abstraction to easily support the next agent backend like claude code? Here is an instance of the tight coupling that I think we should remove, discovered by GPT 6 Astra:
One way is to maintain a list of backends that support this kind of approval notification (currently codex only). For those that are supported, the |
|
I like that - I'm going to work on that |
da8c343 to
5a585e6
Compare
When an agent pauses for permission, Omar’s web UI otherwise keeps showing it as running. This adds approval visibility for both topology agents and the executive assistant, including before a topology exists.
Backend separation
ApprovalHubowns backend-neutral request identity, invocation correlation, timestamps, connection state and retention.ApprovalObserverimplementations publish through anApprovalSinkand own their transport, parsing, replay and reconciliation. The capability registry insrc/approvals/backends/mod.rscurrently registers only Codex; another backend can be added by implementing an observer and registering its factory without changing the hub or UI.Codex socket discovery, WebSocket JSON-RPC, request parsing and protocol fixtures live in
backends/codex.rs. Both topology agents and the executive assistant select an observer by backend identity. Unsupported backends reportunsupportedimmediately instead of starting a Codex monitor.Existing launch defaults and operator permission settings are preserved. The observer does not respond to approvals, change approval policy, or force a backend into unattended mode because notifications are unavailable. Existing Claude/Antigravity skip-permissions and Cursor yolo defaults remain as configured.
Support and limits
The Codex observer handles command/file/permission requests, MCP elicitations and MCP tool approval questions. It falls back to the explicit
waitingOnApprovalflag when history/subscription is unavailable, and retries detailed subscription. Ordinary questions and silence are not classified as approvals. Unsupported integrations remain accessible through the terminal.Independent
/v1/approvalssnapshot and SSE endpoints carry generated wire types. Arbitrary tool arguments, results and private reasoning are excluded. Pending state survives page reloads; daemon restart relies on backend rediscovery/replay. There is no inline approval endpoint. Seedocs/approvals.mdfor the adapter contract and support details.Validation
--all-targets -- -D warnings, formatting and generated protocol checks pass.Activity/progress visibility remains separate in #247.