fix(agent-usage-reminder): skip reminders for council members
Prevents split-brain in solo mode where the system prompt says 'don't delegate' but injected tool output says 'you should delegate'. 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
91b16cc634
commit
a9400b1fae
@ -6,6 +6,8 @@ import {
|
||||
} from "./storage";
|
||||
import { TARGET_TOOLS, AGENT_TOOLS, REMINDER_MESSAGE } from "./constants";
|
||||
import type { AgentUsageState } from "./types";
|
||||
import { getSessionAgent } from "../../features/claude-code-session-state";
|
||||
import { COUNCIL_MEMBER_KEY_PREFIX } from "../../agents/builtin-agents/council-member-agents";
|
||||
|
||||
interface ToolExecuteInput {
|
||||
tool: string;
|
||||
@ -60,6 +62,12 @@ export function createAgentUsageReminderHook(_ctx: PluginInput) {
|
||||
output: ToolExecuteOutput,
|
||||
) => {
|
||||
const { tool, sessionID } = input;
|
||||
|
||||
const agent = getSessionAgent(sessionID);
|
||||
if (agent?.startsWith(COUNCIL_MEMBER_KEY_PREFIX)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const toolLower = tool.toLowerCase();
|
||||
|
||||
if (AGENT_TOOLS.has(toolLower)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user