From 750db54468ab6df33015d812004e2dfce7f9849a Mon Sep 17 00:00:00 2001 From: ismeth Date: Wed, 18 Feb 2026 20:55:19 +0100 Subject: [PATCH] fix(athena): add permission restrictions to council-member agent Add explicit tool denials (write, edit, task, call_omo_agent, athena_council) matching Oracle/Librarian pattern. Simplify static prompt to one-liner since council-prompt.ts provides full instructions. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- src/agents/athena/council-member-agent.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/agents/athena/council-member-agent.ts b/src/agents/athena/council-member-agent.ts index ff5d6464..32b94c73 100644 --- a/src/agents/athena/council-member-agent.ts +++ b/src/agents/athena/council-member-agent.ts @@ -1,24 +1,28 @@ import type { AgentConfig } from "@opencode-ai/sdk" import type { AgentMode } from "../types" +import { createAgentToolRestrictions } from "../../shared/permission-compat" const MODE: AgentMode = "subagent" -const COUNCIL_MEMBER_PROMPT = `You are an independent code analyst in a multi-model council. Your role is to provide thorough, evidence-based analysis of the question you receive. - -## Instructions -- Search the codebase using available tools (Read, Grep, Glob, LSP) -- Report findings with evidence: file paths, line numbers, code snippets -- For each finding, state severity (critical/high/medium/low) and confidence (high/medium/low) -- Focus on real issues backed by evidence, not hypothetical concerns -- Be concise but thorough — quality over quantity` +const COUNCIL_MEMBER_PROMPT = + "You are an independent code analyst in a multi-model council. Provide thorough, evidence-based analysis." export function createCouncilMemberAgent(model: string): AgentConfig { + const restrictions = createAgentToolRestrictions([ + "write", + "edit", + "task", + "call_omo_agent", + "athena_council", + ]) + return { description: "Independent code analyst for Athena multi-model council. Read-only, evidence-based analysis. (Council Member - OhMyOpenCode)", mode: MODE, model, temperature: 0.1, prompt: COUNCIL_MEMBER_PROMPT, + ...restrictions, } as AgentConfig } createCouncilMemberAgent.mode = MODE