diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-24 13:28:39 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-24 13:28:39 +0300 |
| commit | 5af371f2390c702fb12d16b5309e97bc4b054564 (patch) | |
| tree | 0f420bb2410aca4a24bba46010587dbfbe86f1a3 /pi | |
| parent | 95a106fefa81517d55ed2329f1ed90fc032a845e (diff) | |
fix(loop-scheduler): always pass deliverAs followUp for scheduled messages
The runtime now requires a streamingBehavior (steer/followUp) to queue a
message when the agent is already processing. Previously only Gemma 4
models passed { deliverAs: 'followUp' }, causing all other models to
throw 'Agent is already processing' and leaving the job stuck in pending.
Scheduled and watch messages are independent prompts, so followUp is
the correct behavior for all models.
Diffstat (limited to 'pi')
| -rw-r--r-- | pi/agent/extensions/loop-scheduler/index.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pi/agent/extensions/loop-scheduler/index.ts b/pi/agent/extensions/loop-scheduler/index.ts index d57d0c3..cb5398b 100644 --- a/pi/agent/extensions/loop-scheduler/index.ts +++ b/pi/agent/extensions/loop-scheduler/index.ts @@ -377,11 +377,9 @@ export default function loopSchedulerExtension(pi: ExtensionAPI): void { lastCtx = ctx; } - /** Gemma 4 sessions often hit a short "still processing" window after a turn; Pi requires deliverAs then. */ + /** Scheduled messages are independent prompts that should queue when the agent is busy. */ function sendScheduledUserMessage(prompt: string): void { - const id = lastCtx?.model?.id ?? ""; - const gemma4 = /gemma[-_]?4|gemma4/i.test(id); - pi.sendUserMessage(prompt, gemma4 ? { deliverAs: "followUp" } : undefined); + pi.sendUserMessage(prompt, { deliverAs: "followUp" }); } async function openPresetFile(ctx: ExtensionContext, filePath: string, template: string, errorPrefix: string): Promise<void> { |
