fix(athena): always show background_wait guidance for athena-junior, not just when forced

The background_wait instruction was only shown when the caller passed
run_in_background=false (forced case). But callers passing true also need
the guidance since they were polling background_output instead. Now
athena-junior always gets background_wait instructions regardless of how
it was launched.
This commit is contained in:
ismeth
2026-03-03 18:33:59 +01:00
committed by YeonGyu-Kim
parent 4d3cbda8ce
commit 67de601807
2 changed files with 4 additions and 5 deletions
+3 -3
View File
@@ -861,11 +861,11 @@ describe("sisyphus-task", () => {
toolContext
)
//#then — should still be background but with normal (non-forced) message
//#then — should also get background_wait guidance (athena-junior always gets it)
const resultStr = String(result)
expect(resultStr).toContain("Background task launched")
expect(resultStr).toContain("System notifies on completion")
expect(resultStr).not.toContain("automatically backgrounded")
expect(resultStr).toContain("background_wait")
expect(resultStr).toContain("automatically backgrounded")
}, { timeout: 10000 })
})
+1 -2
View File
@@ -263,8 +263,7 @@ export function createDelegateTask(options: DelegateTaskToolOptions): ToolDefini
})
if (effectiveRunInBackground) {
const wasForced = isAthenaJunior && !runInBackground
return executeBackgroundTask(args, ctx, options, parentContext, agentToUse, categoryModel, systemContent, fallbackChain, wasForced)
return executeBackgroundTask(args, ctx, options, parentContext, agentToUse, categoryModel, systemContent, fallbackChain, isAthenaJunior)
}
return executeSyncTask(args, ctx, options, parentContext, agentToUse, categoryModel, systemContent, modelInfo, fallbackChain)