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.
This commit is contained in:
YeonGyu-Kim
2026-01-13 21:00:00 +09:00
parent cf66a86e16
commit cf53b2b51a
2 changed files with 6 additions and 1 deletions

View File

@@ -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<string, string> }).permission || {}), ...questionPermission },
} as AgentConfig
}

View File

@@ -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 },
}