Merge pull request #846 from LTS2/fix/826-sisyphus-junior-model-override

fix: pass model parameter when resuming background tasks

Ensure resumed tasks maintain their original model configuration
from category settings, preventing unexpected model switching.
This commit is contained in:
Jeremy Gollehon
2026-01-17 00:52:46 -08:00
committed by GitHub
2 changed files with 90 additions and 1 deletions
+3 -1
View File
@@ -401,15 +401,17 @@ export class BackgroundManager {
log("[background-agent] Resuming task - calling prompt (fire-and-forget) with:", {
sessionID: existingTask.sessionID,
agent: existingTask.agent,
model: existingTask.model,
promptLength: input.prompt.length,
})
// Note: Don't pass model in body - use agent's configured model instead
// Use prompt() instead of promptAsync() to properly initialize agent loop
// Include model if task has one (preserved from original launch with category config)
this.client.session.prompt({
path: { id: existingTask.sessionID },
body: {
agent: existingTask.agent,
...(existingTask.model ? { model: existingTask.model } : {}),
tools: {
...getAgentToolRestrictions(existingTask.agent),
task: false,