From cf53b2b51a6ee1505e6a8fd272a703f89dbffb4e Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 13 Jan 2026 21:00:00 +0900 Subject: [PATCH] feat(agents): enable question tool permission for Sisyphus agents Allow Sisyphus and orchestrator-sisyphus agents to use OpenCode's question tool for interactive user prompts. OpenCode defaults question permission to "deny" for all agents except build/plan. --- src/agents/orchestrator-sisyphus.ts | 3 ++- src/agents/sisyphus.ts | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/agents/orchestrator-sisyphus.ts b/src/agents/orchestrator-sisyphus.ts index b536b056..f0e8938e 100644 --- a/src/agents/orchestrator-sisyphus.ts +++ b/src/agents/orchestrator-sisyphus.ts @@ -1441,6 +1441,7 @@ export function createOrchestratorSisyphusAgent(ctx?: OrchestratorContext): Agen "task", "call_omo_agent", ]) + const questionPermission = { question: "allow" } as AgentConfig["permission"] return { description: @@ -1450,7 +1451,7 @@ export function createOrchestratorSisyphusAgent(ctx?: OrchestratorContext): Agen temperature: 0.1, prompt: buildDynamicOrchestratorPrompt(ctx), thinking: { type: "enabled", budgetTokens: 32000 }, - ...restrictions, + permission: { ...((restrictions as { permission?: Record }).permission || {}), ...questionPermission }, } as AgentConfig } diff --git a/src/agents/sisyphus.ts b/src/agents/sisyphus.ts index b7075e58..fe45b68e 100644 --- a/src/agents/sisyphus.ts +++ b/src/agents/sisyphus.ts @@ -618,6 +618,9 @@ export function createSisyphusAgent( ? buildDynamicSisyphusPrompt(availableAgents, tools, skills) : buildDynamicSisyphusPrompt([], tools, skills) + // Note: question permission allows agent to ask user questions via OpenCode's QuestionTool + // SDK type doesn't include 'question' yet, but OpenCode runtime supports it + const permission = { question: "allow" } as AgentConfig["permission"] const base = { description: "Sisyphus - Powerful AI orchestrator from OhMyOpenCode. Plans obsessively with todos, assesses search complexity before exploration, delegates strategically to specialized agents. Uses explore for internal code (parallel-friendly), librarian only for external docs, and always delegates UI work to frontend engineer.", @@ -626,6 +629,7 @@ export function createSisyphusAgent( maxTokens: 64000, prompt, color: "#00CED1", + permission, tools: { call_omo_agent: false }, }