core-agent-ide/codex-rs/app-server/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
..
bespoke_event_handling.rs app-server: Replay pending item requests on thread/resume (#12560) 2026-02-27 12:45:59 -08:00
codex_message_processor.rs app-server: Replay pending item requests on thread/resume (#12560) 2026-02-27 12:45:59 -08:00
config_api.rs fix(network-proxy): add unix socket allow-all and update seatbelt rules (#11368) 2026-02-20 10:56:57 -08:00
dynamic_tools.rs app-server: Replay pending item requests on thread/resume (#12560) 2026-02-27 12:45:59 -08:00
error_code.rs Enforce user input length cap (#12823) 2026-02-25 22:23:51 -08:00
external_agent_config_api.rs Support external agent config detect and import (#12660) 2026-02-25 02:11:51 -08:00
filters.rs feat: add nick name to sub-agents (#12320) 2026-02-20 14:39:49 +00:00
fuzzy_file_search.rs [app-server] add fuzzyFileSearch/sessionCompleted (#11773) 2026-02-13 15:08:14 -08:00
lib.rs app-server: Replay pending item requests on thread/resume (#12560) 2026-02-27 12:45:59 -08:00
main.rs feat: pass helper executable paths via Arg0DispatchPaths (#12719) 2026-02-24 17:44:38 -08:00
message_processor.rs notify: include client in legacy hook payload (#12968) 2026-02-26 22:27:34 -08:00
models.rs Add model availability NUX metadata (#12972) 2026-02-26 22:02:57 -08:00
outgoing_message.rs app-server: Replay pending item requests on thread/resume (#12560) 2026-02-27 12:45:59 -08:00
server_request_error.rs app-server: Replay pending item requests on thread/resume (#12560) 2026-02-27 12:45:59 -08:00
thread_state.rs app-server: Replay pending item requests on thread/resume (#12560) 2026-02-27 12:45:59 -08:00
thread_status.rs feat(app-server): thread/unsubscribe API (#10954) 2026-02-25 13:14:30 -08:00
transport.rs fix: use AbsolutePathBuf for permission profile file roots (#12970) 2026-02-27 17:42:52 +00:00