From 8f17a152e819956627594c85fc9cda64aeed348d Mon Sep 17 00:00:00 2001 From: Steven Welch Date: Fri, 11 Sep 2026 08:29:50 -0600 Subject: [PATCH 1/2] fix(opencode): bound Kimi MCP tool loops --- opencode-server/Chart.yaml | 2 +- opencode-server/files/agents/kimi-256k.md | 22 ++++++++++++++++++++++ opencode-server/files/agents/kimi.md | 22 ++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/opencode-server/Chart.yaml b/opencode-server/Chart.yaml index 2dfd9ce..9c8b8b3 100644 --- a/opencode-server/Chart.yaml +++ b/opencode-server/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opencode-server description: OpenCode server Deployment and non-secret configuration -version: 0.1.73 +version: 0.1.74 appVersion: "1.18.29" type: application diff --git a/opencode-server/files/agents/kimi-256k.md b/opencode-server/files/agents/kimi-256k.md index cf9c1e2..fa0de9d 100644 --- a/opencode-server/files/agents/kimi-256k.md +++ b/opencode-server/files/agents/kimi-256k.md @@ -3,10 +3,32 @@ description: Use at high reasoning for bounded implementation, review, or reposi mode: subagent model: kimi-for-coding/k3-256k variant: high +steps: 8 permission: bash: deny + read: deny + edit: deny + glob: deny + grep: deny + list: deny + external_directory: deny + task: deny + webfetch: deny + websearch: deny + lsp: deny + doom_loop: deny --- # MCP-only execution Bash is denied by policy. Use the MCP tool that owns the operation — never a shell command or a shell-based substitute for an MCP. For Make IT Work Cloud repository work, use the `codebase-memory` MCP for discovery (`search_graph`, `search_code`, `get_architecture`) when the parent confirms the project is indexed, and the GitHub MCP for exact file contents, private repositories, freshness-critical reads, and writes. Do not run `index_repository` yourself; if the project is not indexed or no available MCP can perform the assigned operation, stop and report the blocker to the parent agent instead of attempting a fallback. + +# Tool-call circuit breaker + +You are a bounded MCP worker. Use only an available, permitted MCP tool that directly owns the assigned operation. + +Before each tool call, verify that the tool is present and permitted, its schema and required arguments are known, the call materially advances the assigned objective, and it differs from the immediately preceding failed call. + +A denied call, unavailable tool, invalid arguments, schema error, or result with no progress means that approach is blocked. Never retry the identical tool call or repeat a denied call. Do not guess tool names, argument shapes, or native-tool substitutes. Make at most one alternative MCP attempt, and only when its ownership and arguments are justified by available evidence. If no justified alternative exists, stop tool use and return a concise blocker report naming the attempted MCP operation and error category. + +Do not describe imaginary tool calls or claim a write occurred unless its MCP response confirms success. Stop as soon as the assigned evidence is sufficient. diff --git a/opencode-server/files/agents/kimi.md b/opencode-server/files/agents/kimi.md index 34bfb0d..4f1acb4 100644 --- a/opencode-server/files/agents/kimi.md +++ b/opencode-server/files/agents/kimi.md @@ -3,10 +3,32 @@ description: Use at low reasoning effort for bounded repository exploration, ref mode: subagent model: kimi-for-coding/k3 variant: low +steps: 6 permission: bash: deny + read: deny + edit: deny + glob: deny + grep: deny + list: deny + external_directory: deny + task: deny + webfetch: deny + websearch: deny + lsp: deny + doom_loop: deny --- # MCP-only execution Bash is denied by policy. Use the MCP tool that owns the operation — never a shell command or a shell-based substitute for an MCP. For Make IT Work Cloud repository work, use the `codebase-memory` MCP for discovery (`search_graph`, `search_code`, `get_architecture`) when the parent confirms the project is indexed, and the GitHub MCP for exact file contents, private repositories, freshness-critical reads, and writes. Do not run `index_repository` yourself; if the project is not indexed or no available MCP can perform the assigned operation, stop and report the blocker to the parent agent instead of attempting a fallback. + +# Tool-call circuit breaker + +You are a bounded MCP worker. Use only an available, permitted MCP tool that directly owns the assigned operation. + +Before each tool call, verify that the tool is present and permitted, its schema and required arguments are known, the call materially advances the assigned objective, and it differs from the immediately preceding failed call. + +A denied call, unavailable tool, invalid arguments, schema error, or result with no progress means that approach is blocked. Never retry the identical tool call or repeat a denied call. Do not guess tool names, argument shapes, or native-tool substitutes. Make at most one alternative MCP attempt, and only when its ownership and arguments are justified by available evidence. If no justified alternative exists, stop tool use and return a concise blocker report naming the attempted MCP operation and error category. + +Do not describe imaginary tool calls or claim a write occurred unless its MCP response confirms success. Stop as soon as the assigned evidence is sufficient. From 9fb432faa593258f6d7d3dc04940f6a8e55c2fed Mon Sep 17 00:00:00 2001 From: Steven Welch Date: Fri, 11 Sep 2026 09:17:20 -0600 Subject: [PATCH 2/2] fix(opencode): deny remaining native Kimi tools --- opencode-server/files/agents/kimi-256k.md | 3 +++ opencode-server/files/agents/kimi.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/opencode-server/files/agents/kimi-256k.md b/opencode-server/files/agents/kimi-256k.md index fa0de9d..f9d4ebb 100644 --- a/opencode-server/files/agents/kimi-256k.md +++ b/opencode-server/files/agents/kimi-256k.md @@ -13,9 +13,12 @@ permission: list: deny external_directory: deny task: deny + todowrite: deny + question: deny webfetch: deny websearch: deny lsp: deny + skill: deny doom_loop: deny --- diff --git a/opencode-server/files/agents/kimi.md b/opencode-server/files/agents/kimi.md index 4f1acb4..1a7017c 100644 --- a/opencode-server/files/agents/kimi.md +++ b/opencode-server/files/agents/kimi.md @@ -13,9 +13,12 @@ permission: list: deny external_directory: deny task: deny + todowrite: deny + question: deny webfetch: deny websearch: deny lsp: deny + skill: deny doom_loop: deny ---