fix(athena): prevent recursive council explosion — deny tool for bg tasks + dedup guard
Council members launched as agent='athena' got Athena's system prompt saying 'ALWAYS call athena_council first', plus the tool wasn't denied for bg athena tasks. Each council member spawned 4 more → exponential explosion (47+ tasks). Three fixes: 1. Deny athena_council in ATHENA_RESTRICTIONS (agent-tool-restrictions.ts) - Only affects background athena tasks (task-starter.ts) - Primary Athena (user-selected) still has access via permission field 2. Session-level dedup guard prevents re-calling while council is running - If Athena retries during long wait, returns 'already running' 3. Increase wait timeout from 2min to 10min (council members need time for real code analysis with Read/Grep/LSP)
This commit is contained in:
@@ -16,7 +16,7 @@ const EXPLORATION_AGENT_DENYLIST: Record<string, boolean> = {
|
||||
}
|
||||
|
||||
const ATHENA_RESTRICTIONS = permissionToToolBooleans(
|
||||
createAgentToolRestrictions(["write", "edit"]).permission
|
||||
createAgentToolRestrictions(["write", "edit", "athena_council"]).permission
|
||||
)
|
||||
|
||||
const AGENT_RESTRICTIONS: Record<string, Record<string, boolean>> = {
|
||||
|
||||
Reference in New Issue
Block a user