Files
gemini-cli/packages/core
Adam Weidman d034c4dd96 test(core): add unit tests for LocalSubagentProtocol and RemoteSubagentProtocol
Adds 58 tests covering lifecycle events, activity translation, config
buffering, session state persistence, auth setup, error handling, abort,
and concurrent send() guard for both new protocol implementations.

Also fixes a timing bug in RemoteSubagentProtocol where _sessionState was
persisted in a finally block, causing it to be written after the result
promise settled. Moved _saveSessionState() calls to run synchronously
before each _resultResolve/_resultReject so callers see updated
contextId/taskId immediately after getResult() settles.
2026-03-26 15:56:14 -04:00
..