fix(athena): force athena-junior to background and exempt from hard TTL
Council sessions are long-running: athena-junior launches members then waits for them via background_wait. Two changes prevent premature kills: - Force run_in_background=true when subagent_type resolves to athena-junior, avoiding the 10-minute sync poll timeout (MAX_POLL_TIME_MS) - Exempt athena-junior from the 30-minute TASK_TTL_MS hard cutoff since council members have their own independent TTLs - Fix missing bulk_launch field in AthenaOverrideConfigSchema (type error)
This commit is contained in:
@@ -240,6 +240,17 @@ export function createDelegateTask(options: DelegateTaskToolOptions): ToolDefini
|
||||
fallbackChain = resolution.fallbackChain
|
||||
}
|
||||
|
||||
// Athena-junior council sessions are long-running (members do deep work).
|
||||
// Force background to avoid the 10-minute sync poll timeout.
|
||||
const isAthenaJunior = agentToUse.toLowerCase() === "athena-junior"
|
||||
if (isAthenaJunior && !runInBackground) {
|
||||
log("[task] Forcing athena-junior to background — council sessions exceed sync poll timeout", {
|
||||
originalRunInBackground: args.run_in_background,
|
||||
agentToUse,
|
||||
})
|
||||
}
|
||||
const effectiveRunInBackground = runInBackground || isAthenaJunior
|
||||
|
||||
const systemContent = buildSystemContent({
|
||||
skillContent,
|
||||
skillContents,
|
||||
@@ -251,7 +262,7 @@ export function createDelegateTask(options: DelegateTaskToolOptions): ToolDefini
|
||||
availableSkills,
|
||||
})
|
||||
|
||||
if (runInBackground) {
|
||||
if (effectiveRunInBackground) {
|
||||
return executeBackgroundTask(args, ctx, options, parentContext, agentToUse, categoryModel, systemContent, fallbackChain)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user