fix(athena): update council member guards for new agent key format
The hasPendingCouncilMembers guard now matches the 'Council: ' prefix from COUNCIL_MEMBER_KEY_PREFIX instead of the old task.agent === 'council-member' check. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
8f0b5d2e1a
commit
4bc4b36e75
@ -48,7 +48,7 @@ export function createKeywordDetectorHook(ctx: PluginInput, _collector?: Context
|
|||||||
|
|
||||||
// Athena is a council orchestrator — skip all keyword injections.
|
// Athena is a council orchestrator — skip all keyword injections.
|
||||||
// search/analyze modes tell the agent to use explore agents and grep directly,
|
// search/analyze modes tell the agent to use explore agents and grep directly,
|
||||||
// which conflicts with Athena's job of calling athena_council for council fan-out.
|
// which conflicts with Athena's job of launching council members via task calls.
|
||||||
// Use getAgentConfigKey to handle display name remapping ("Athena (Council)" → "athena").
|
// Use getAgentConfigKey to handle display name remapping ("Athena (Council)" → "athena").
|
||||||
const agentConfigKey = currentAgent ? getAgentConfigKey(currentAgent) : undefined
|
const agentConfigKey = currentAgent ? getAgentConfigKey(currentAgent) : undefined
|
||||||
if (agentConfigKey === "athena") {
|
if (agentConfigKey === "athena") {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import { parseRalphLoopArguments } from "../hooks/ralph-loop/command-arguments"
|
|||||||
import { getAgentConfigKey } from "../shared/agent-display-names"
|
import { getAgentConfigKey } from "../shared/agent-display-names"
|
||||||
|
|
||||||
import type { CreatedHooks } from "../create-hooks"
|
import type { CreatedHooks } from "../create-hooks"
|
||||||
|
import { COUNCIL_MEMBER_KEY_PREFIX } from "../agents/builtin-agents/council-member-agents"
|
||||||
|
|
||||||
export function createToolExecuteBeforeHandler(args: {
|
export function createToolExecuteBeforeHandler(args: {
|
||||||
ctx: PluginContext
|
ctx: PluginContext
|
||||||
@ -27,7 +28,7 @@ export function createToolExecuteBeforeHandler(args: {
|
|||||||
|
|
||||||
const tasks = backgroundManager.getTasksByParentSession(sessionID)
|
const tasks = backgroundManager.getTasksByParentSession(sessionID)
|
||||||
return tasks.some((task) =>
|
return tasks.some((task) =>
|
||||||
task.agent === "council-member" &&
|
(task.agent === "council-member" || task.agent.startsWith(COUNCIL_MEMBER_KEY_PREFIX)) &&
|
||||||
(task.status === "pending" || task.status === "running")
|
(task.status === "pending" || task.status === "running")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user