fix(coding-agent): queue messages during branch summarization (#1803)

Messages submitted while a branch summary was being generated were
processed immediately instead of being queued. This happened because
isCompacting only checked compaction abort controllers, not the branch
summary abort controller.

Include _branchSummaryAbortController in the isCompacting getter so all
existing guards (message queueing, reload blocking) also apply during
branch summarization.
This commit is contained in:
Sviatoslav Abakumov 2026-03-04 11:55:30 +04:00 committed by GitHub
parent d515cbd0b8
commit 5c61d6bc92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View file

@ -677,9 +677,13 @@ export class AgentSession {
this.agent.setSystemPrompt(this._baseSystemPrompt);
}
/** Whether auto-compaction is currently running */
/** Whether compaction or branch summarization is currently running */
get isCompacting(): boolean {
return this._autoCompactionAbortController !== undefined || this._compactionAbortController !== undefined;
return (
this._autoCompactionAbortController !== undefined ||
this._compactionAbortController !== undefined ||
this._branchSummaryAbortController !== undefined
);
}
/** All messages including custom types like BashExecutionMessage */

View file

@ -193,6 +193,10 @@ describe.skipIf(!API_KEY)("AgentSession tree navigation e2e", () => {
// Abort after a short delay (let the LLM call start)
await new Promise((resolve) => setTimeout(resolve, 100));
// isCompacting should be true during branch summarization
expect(session.isCompacting).toBe(true);
session.abortBranchSummary();
const result = await navigationPromise;