docs/rpc-wait-policy.md
Request waiting and cancellation
A slow request on a connected transport remains pending. Elapsed time alone is not an error, evidence of nonacceptance, or permission to retry. This applies to JSONL startup/hello, writes, RPC replies, and the app owners waiting on those operations, including submission, settings/helper cleanup, attention, workflow, history, actions and endpoint monitoring. There are no fixed elapsed or renewable inactivity RPC deadlines, nor outer owner/drain deadlines that recreate them.
Show the pending state and available server progress while waiting. Progress and RPC heartbeats are informative, not a lease that must be renewed to keep a request alive. Silence does not establish transport loss. A matching success completes the request; actual response/protocol errors, transport loss/closure, or explicit cancellation end the wait without inventing a timeout result. Local validation and stale-owner guards still prevent inadmissible work and stale UI delivery.
Cancellation is not proof that an already admitted remote mutation did not execute. Keep uncertainty and reconciliation rules; never automatically resend a mutation, reconnect, clear retained input, or claim helper deletion because time passed. Generation retirement or explicit cancellation must release local ownership safely, ignore stale delivery, and preserve any separately owned cleanup obligations. Graceful cleanup can remain pending while connected; transport loss is a separate terminal event, not a cleanup success. While cleanup is pending, an explicit second Disconnect (shown as Disconnect now in endpoint controls and the notification) stops waiting and closes the transport immediately. Unconfirmed remote cleanup is reported as uncertain, never as a rollback or successful deletion. Connection replacement does not implicitly force-close a pending drain.
Timers that remain
- SSH connection establishment and forwarding-channel establishment timeouts.
- SSH transport-liveness probes and failure detection. A genuinely lost transport fails its pending requests; an idle or slow RPC alone does not.
- Polling intervals, debounce, refresh rate limits, bounded concurrency and backoff for consistency reconciliation. They control admission or presentation, not the lifetime of an admitted connected request. A poll must not retire a pending request merely to start another copy.
- UI animation, gesture and progress-display timing, and explicit user-selected scheduling such as snooze times.
- Local document-provider/key-import cancellation deadlines and resource/size limits, which do not govern the EzAgent RPC transport.
A tool's own requested execution timeout is part of that tool's arguments, not an Android RPC deadline. Displaying that argument does not enforce a client wait limit.
Evidence scope
This is the current behavior contract, not a test report. Older dated validation sections and delivery reports describe the revisions tested at that time; their references to timeout fixtures or prior deadlines do not define current behavior or establish validation of deadline removal.