Merge pull request #5115 from DanielThomas/dannyt/sendUserMessage-agent-end

fix(coding-agent): drain follow-ups queued during agent_end
This commit is contained in:
Mario Zechner
2026-05-28 10:47:31 +02:00
committed by GitHub
5 changed files with 352 additions and 1 deletions

View File

@@ -947,7 +947,13 @@ export class AgentSession {
this._retryAttempt = 0;
}
return await this._checkCompaction(msg);
if (await this._checkCompaction(msg)) {
return true;
}
// The agent loop drains both queues before emitting agent_end. Any messages
// here were queued by agent_end extension handlers and need a continuation.
return this.agent.hasQueuedMessages();
}
/**