Skip to content

Commit cb2b583

Browse files
committed
feat(core): restore OPENCODE_DISABLE_CLAUDE_CODE for compatibility roots
V1 parity for the skill catalog: OPENCODE_DISABLE_CLAUDE_CODE and OPENCODE_DISABLE_CLAUDE_CODE_SKILLS now drop the ~/.claude compatibility roots at discovery, so the compatibility skill plugin loads no Claude skills. The variables were ignored by the V2 rewrite (anomalyco#36990); upstream anomalyco#51888 restored them but was closed unmerged. Discovery is the single producer of claude roots, so gating here covers every consumer; the existing options.claude === false escape hatch still applies.
1 parent 0868ce4 commit cb2b583

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎packages/core/src/config/discovery.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ export const discover = Effect.fn("ConfigDiscovery.discover")(function* (options
116116
)).at(0)
117117
: undefined
118118

119+
// V1 parity: OPENCODE_DISABLE_CLAUDE_CODE(_SKILLS) drops the ~/.claude compatibility roots,
120+
// so the compatibility skill plugin loads no Claude skills. The variables stopped working in
121+
// the V2 rewrite (anomalyco/opencode#36990); gating the discovery layer restores them, and the
122+
// discovery layer is the single producer of `claude` roots, so every consumer is covered.
123+
const claudeCompatDisabled = Boolean(
124+
process.env.OPENCODE_DISABLE_CLAUDE_CODE || process.env.OPENCODE_DISABLE_CLAUDE_CODE_SKILLS,
125+
)
126+
119127
return {
120128
system: globalEnabled && system ? { path: system, present: yield* fs.isDir(system) } : undefined,
121129
preferences,
@@ -127,7 +135,7 @@ export const discover = Effect.fn("ConfigDiscovery.discover")(function* (options
127135
(directory) => fs.isDir(directory).pipe(Effect.map((present) => ({ path: directory, present }))),
128136
),
129137
claude:
130-
options?.claude === false
138+
options?.claude === false || claudeCompatDisabled
131139
? []
132140
: [
133141
...new Set([

0 commit comments

Comments
 (0)