From 9d13c6cff15dc762379cfffc6965944734a73217 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 6 Jan 2026 02:10:34 +0900 Subject: [PATCH] fix(config): skip permission migration for Claude Code agents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude Code uses whitelist-based tools format which is semantically different from OpenCode's denylist-based permission system. Apply migration only to plugin agents for compatibility. 🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) assistance --- src/plugin-handlers/config-handler.ts | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/plugin-handlers/config-handler.ts b/src/plugin-handlers/config-handler.ts index 8d23245..aca2d0f 100644 --- a/src/plugin-handlers/config-handler.ts +++ b/src/plugin-handlers/config-handler.ts @@ -96,26 +96,18 @@ export function createConfigHandler(deps: ConfigHandlerDeps) { config.model as string | undefined ); - const rawUserAgents = (pluginConfig.claude_code?.agents ?? true) + // Claude Code agents: Do NOT apply permission migration + // Claude Code uses whitelist-based tools format which is semantically different + // from OpenCode's denylist-based permission system + const userAgents = (pluginConfig.claude_code?.agents ?? true) ? loadUserAgents() : {}; - const rawProjectAgents = (pluginConfig.claude_code?.agents ?? true) + const projectAgents = (pluginConfig.claude_code?.agents ?? true) ? loadProjectAgents() : {}; - const rawPluginAgents = pluginComponents.agents; - const userAgents = Object.fromEntries( - Object.entries(rawUserAgents).map(([k, v]) => [ - k, - v ? migrateAgentConfig(v as Record) : v, - ]) - ); - const projectAgents = Object.fromEntries( - Object.entries(rawProjectAgents).map(([k, v]) => [ - k, - v ? migrateAgentConfig(v as Record) : v, - ]) - ); + // Plugin agents: Apply permission migration for compatibility + const rawPluginAgents = pluginComponents.agents; const pluginAgents = Object.fromEntries( Object.entries(rawPluginAgents).map(([k, v]) => [ k,