Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(claude): mark cancelled query before terminal fence

fmfsaisai72e8299cd3d9
diff --git a/packages/maker-core/src/agents/claude-code/index.ts b/packages/maker-core/src/agents/claude-code/index.ts
index adde162a2a..256f924f37 100644
--- a/packages/maker-core/src/agents/claude-code/index.ts
+++ b/packages/maker-core/src/agents/claude-code/index.ts
@@ -4877,13 +4877,13 @@ export class ClaudeCodeAgent extends BaseAgent {
// best-effort stopTask RPCs above remain responsible for stopping
// the provider tasks themselves.
retireContinuationTasks(cancelledContinuation);
- emitCancelledContinuationBoundary(cancelledContinuation, 'user_stop');
// The provider may already have queued the automatic continuation
// on this Query. Close it now so that cancellation fences process
// termination and canUseTool callbacks as well as event output;
// the next send will perform the existing fresh-query rebuild.
const cancelledQuery = q;
canceledBridgeQueries.add(cancelledQuery);
+ emitCancelledContinuationBoundary(cancelledContinuation, 'user_stop');
inputQueue.clear();
try {
inputQueue.end();