Skip to content

fix(opencode): bound Kimi MCP tool loops - #96

Merged
xnoto merged 2 commits into
mainfrom
fix/kimi-mcp-circuit-breaker
Sep 11, 2026
Merged

fix(opencode): bound Kimi MCP tool loops#96
xnoto merged 2 commits into
mainfrom
fix/kimi-mcp-circuit-breaker

Conversation

@xnoto

@xnoto xnoto commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Hardens the packaged kimi and kimi-256k subagents against non-MCP fallback and repeated failed tool calls. Both now deny all native OpenCode tool permissions, bound agentic execution to 6/8 steps, deny the OpenCode doom-loop recovery action, and instruct the model to stop with a blocker after a denied, invalid, unavailable, or no-progress MCP call rather than retrying or guessing an alternate native tool.

Bumps immutable opencode-server chart version from 0.1.73 to 0.1.74 because packaged agent files changed.

Fixes #
N/A — owner-approved headless Kimi subagent hardening.

Type of change

  • Bug fix
  • Feature / enhancement
  • Documentation
  • Infrastructure (OpenTofu root or module)
  • GitOps desired state (manifests, kustomize, charts, SOPS/KSOPS secrets)
  • Container image
  • CI / reusable workflow
  • Refactor / cleanup
  • Breaking change

Validation

  • Required pull-request checks pass — pending: test (repository hygiene and Helm validation), detect, and package opencode-server.
  • Generated or centrally distributed files were regenerated by their owning automation, not hand-edited — the ConfigMap packages agent files via Helm .Files.Glob; no generated source was edited.
  • Exact net scope inspected: two Kimi subagent files and the required Chart.yaml version bump.
  • Independent adversarial review returned ADVANCE; release readiness returned READY.
  • QA coverage analysis: PR checks validate chart syntax and packaging only; fresh-session permission, step-limit, and loop behavior remain a separate functional-verification gate.

Impact and rollout

Producer: makeitworkcloud/charts package opencode-server 0.1.74; affected paths are only the two packaged Kimi subagent definitions and chart metadata.

After a separately confirmed merge, the main workflow automatically packages and publishes the immutable OCI chart, then opens or updates makeitworkcloud/kustomize-cluster's scoped version-pin PR for workloads/apps/opencode-app.yaml. Its required checks and auto-merge govern desired-state selection. Argo CD reconciliation, pod replacement, workload health, and a fresh-session test that Kimi honors the permissions, step limits, and circuit breaker are separate, unverified stages. No sync, rollout, or live mutation is authorized by this PR.

Rollback: publish and select a new immutable chart version restoring the prior agent policy; do not republish 0.1.74.

Safety and secrets

  • Contains no plaintext secrets, decrypted SOPS values, state files, kubeconfigs, tokens, or private endpoints
  • No local OpenTofu init/plan/apply/destroy/import/state operations were run or claimed — plans come from pull-request checks
  • Breaking or irreversible effects are described above with rollback notes

AI-assisted change; reviewer scrutiny requested for OpenCode agent-permission semantics and runtime behavior.

@github-actions

Copy link
Copy Markdown

Chart CI passed

Repository hygiene and Helm validation passed. View the workflow run.

@xnoto
xnoto merged commit 4518397 into main Sep 11, 2026
4 checks passed
@xnoto
xnoto deleted the fix/kimi-mcp-circuit-breaker branch September 11, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant