Files
gemini-cli/packages/core
Adam Weidman 3f97e7e7a4 feat(core): add RemoteSessionInvocation — session-based remote agent invocation
New invocation class that delegates to RemoteSubagentSession instead of
directly managing A2A client streaming. Existing RemoteAgentInvocation is
untouched — this will be wired in behind a feature flag in a later PR.

Key behaviors:
- Static sessionState map persists A2A contextId/taskId across invocations
- Subscribes to session message events for live SubagentProgress updates
- Detects post-getResult abort and surfaces proper error state
- Includes partial output in error display via getLatestProgress()
- Properly cleans up abort listeners and subscriptions in finally block

Also adds initialState param and getSessionState() to
RemoteSubagentProtocol/RemoteSubagentSession for cross-invocation
state persistence.
2026-05-12 15:37:09 -04:00
..