core-agent-ide/codex-rs/app-server-protocol/src
Ruslan Nigmatullin 69d7a456bb
app-server: Replay pending item requests on thread/resume (#12560)
Replay pending client requests after `thread/resume` and emit resolved
notifications when those requests clear so approval/input UI state stays
in sync after reconnects and across subscribed clients.

Affected RPCs:
- `item/commandExecution/requestApproval`
- `item/fileChange/requestApproval`
- `item/tool/requestUserInput`

Motivation:
- Resumed clients need to see pending approval/input requests that were
already outstanding before the reconnect.
- Clients also need an explicit signal when a pending request resolves
or is cleared so stale UI can be removed on turn start, completion, or
interruption.

Implementation notes:
- Use pending client requests from `OutgoingMessageSender` in order to
replay them after `thread/resume` attaches the connection, using
original request ids.
- Emit `serverRequest/resolved` when pending requests are answered
or cleared by lifecycle cleanup.
- Update the app-server protocol schema, generated TypeScript bindings,
and README docs for the replay/resolution flow.

High-level test plan:
- Added automated coverage for replaying pending command execution and
file change approval requests on `thread/resume`.
- Added automated coverage for resolved notifications in command
approval, file change approval, request_user_input, turn start, and turn
interrupt flows.
- Verified schema/docs updates in the relevant protocol and app-server
tests.

Manual testing:
- Tested reconnect/resume with multiple connections.
- Confirmed state stayed in sync between connections.
2026-02-27 12:45:59 -08:00
..
bin feat: add --experimental to generate-ts (#10402) 2026-02-02 20:30:01 +00:00
protocol app-server: Replay pending item requests on thread/resume (#12560) 2026-02-27 12:45:59 -08:00
experimental_api.rs feat: experimental flags (#10231) 2026-02-02 11:06:50 +00:00
export.rs feat: add experimental additionalPermissions to v2 command execution approval requests (#12737) 2026-02-25 05:16:35 +00:00
jsonrpc_lite.rs app-server: Replay pending item requests on thread/resume (#12560) 2026-02-27 12:45:59 -08:00
lib.rs feat: add --experimental to generate-ts (#10402) 2026-02-02 20:30:01 +00:00
schema_fixtures.rs feat: replace custom mcp-types crate with equivalents from rmcp (#10349) 2026-02-02 17:41:55 -08:00