opencode: link the guard config, and turn off native Plan Mode

Two things, one of them overdue.

1. ~/.config/opencode/opencode.json is now dotbot-linked on mainframe and
   sctfw004. It has lived in the repo since August while being linked
   NOWHERE -- each machine had a hand-placed copy and nothing checked they
   agreed, or that the Zen guard was there at all. That file is what stops a
   bare `opencode` falling back to built-in providers including OpenCode Zen,
   which is under a ToS block. An unverified guard is not a guard.

2. It carries `agent.plan.disable: true` and `permission.plan_enter: deny`.
   opencode's native Plan Mode was activating unbidden and taking sessions
   read-only with "Plan mode is active ... This supersedes any other
   instructions you have received."

⚠ (2) IS A PREFERENCE, NOT A FIX. Remove those two keys to restore Plan Mode.

⚠ This is NOT OMO, despite looking like it. OMO's agents carry only
description/model/tools -- there is no keyword or prompt-text trigger
anywhere in ~/.omo/omo.jsonc. `plan` is native to opencode. Verified:
`agent list` shows plan gone under the local profile, and plan_enter
resolving to deny on `build` under personal, where the OMO plugin re-adds
plan as a subagent.

⚠ Turning OMO off would NOT have fixed this and WOULD have broken the
default model. personal.json defaults to litellm/agent/atlas-glm-5.3, and
that alias does not exist in LiteLLM -- measured, it returns 400, while
local/librarian returns 200. The agent/* names live only in the opencode
config and the OMO plugin rewrites them at request time. Disabling OMO needs
`model`/`small_model` repointed in the same change. `"plugin": []` in the
base does not disable it either; the profile wins on that key.

Applies to mainframe and sctfw004 only -- system76 and nas link no opencode
config at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E9UH1zGZZtA9yhohmQrcT6
This commit is contained in:
connorandClaude Opus 5 committed 2026-09-21 22:13:40 -04:00
1 parent 4e3a0d6ccc
commit 89c6db1cfb
4 files changed
+30 -1

No files matched your search

+9 -1
View File
@@ -2,5 +2,13 @@
"$schema": "https://opencode.ai/config.json",
"enabled_providers": [
"litellm"
]
],
"agent": {
"plan": {
"disable": true
}
},
"permission": {
"plan_enter": "deny"
}
}
+19
View File
@@ -153,6 +153,25 @@ _oc_launch() {
# include OpenCode Zen -- the account currently under a ToS block. With it,
# a bare `opencode` lists nothing at all and cannot reach Zen.
#
# ⚠ opencode.json IS NOW DOTBOT-LINKED, and was not until 2026-09-21. It sat
# in the repo at common/opencode/opencode.json while being linked nowhere, so
# each machine carried a hand-placed copy and nothing verified they matched --
# or that the Zen guard was present at all. An unlinked guard file is a guard
# you are trusting without checking.
#
# ⚠ TEMPORARY, 2026-09-21: it also carries `agent.plan.disable` plus
# `permission.plan_enter: deny`, which turn OFF opencode's native Plan Mode
# fleet-wide. Plan Mode was firing unbidden and taking the session read-only
# with "Plan mode is active ... This supersedes any other instructions you
# have received." This is a preference, not a fix -- REMOVE THESE TWO KEYS to
# get Plan Mode back.
#
# Note this is NOT an OMO feature, though it looks like one. OMO's agents
# carry only description/model/tools and cannot trigger on prompt text; the
# `plan` agent is native to opencode. Disabling OMO would not have stopped it,
# and would have broken the default model -- `agent/atlas-glm-5.3` is rewritten
# by the OMO plugin at request time and 400s at LiteLLM without it.
#
# Personal is still wrapped under the bare name so `opencode` does the
# expected thing and gets a key.
opencode() { _oc_launch personal litellm-key-personal "$HOME/.config/opencode/personal.json" "$@" }