This commit is contained in:
parent
62bbaa8e8e
commit
7e1fcd3549
1 changed files with 9 additions and 1 deletions
|
|
@ -54,6 +54,14 @@ export default function AsyncJobs(pi: ExtensionAPI) {
|
|||
? output.slice(0, maxLen) + "\n\n[... truncated, use await_job for full output]"
|
||||
: output;
|
||||
|
||||
// Deliver as follow-up without triggering a new LLM turn (#875).
|
||||
// When the agent is streaming: the message is queued and picked up
|
||||
// by the agent loop's getFollowUpMessages() after the current turn.
|
||||
// When the agent is idle: the message is appended to context so it's
|
||||
// visible on the next user-initiated prompt. Previously triggerTurn:true
|
||||
// caused spurious autonomous turns — the model would interpret completed
|
||||
// job output as requiring action and cascade into unbounded self-reinforcing
|
||||
// loops (running more commands, spawning more jobs, burning context).
|
||||
pi.sendMessage(
|
||||
{
|
||||
customType: "async_job_result",
|
||||
|
|
@ -64,7 +72,7 @@ export default function AsyncJobs(pi: ExtensionAPI) {
|
|||
].join("\n"),
|
||||
display: true,
|
||||
},
|
||||
{ deliverAs: "followUp", triggerTurn: true },
|
||||
{ deliverAs: "followUp" },
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue