Skip to content

fix(core): let either Claude Code flag disable every CLAUDE.md - #64533

Merged
rekram1-node merged 1 commit into
devfrom
claude-instructions-mode
Nov 17, 2026
Merged

rekram1-node merged 1 commit into
devfrom
claude-instructions-mode

Conversation

@neriousy

@neriousy neriousy commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

Follow-up to #64474

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

#64474 added two server options for the CLAUDE.md fallback, instructions.claude and instructions.claudeGlobal, so that OPENCODE_DISABLE_CLAUDE_CODE_PROMPT could keep its V1 meaning of skipping only ~/.claude/CLAUDE.md. This merges them into a single instructions.claude boolean. When it is false, OpenCode skips every CLAUDE.md, both the per-directory ones and ~/.claude/CLAUDE.md.

Both OPENCODE_DISABLE_CLAUDE_CODE and OPENCODE_DISABLE_CLAUDE_CODE_PROMPT now set it to false. If you're disabling Claude Code files, you most likely want all of them gone, and one flag is simpler than keeping V1's half-way option. OPENCODE_DISABLE_CLAUDE_CODE still also disables .claude skills.

instructions.mdx and migrate-v1.mdx are updated, and the migration page notes that _PROMPT used to skip only the global file.

No feature flag: this narrows a fallback that just landed.

How did you verify your code works?

  • bun typecheck in packages/core, packages/server and packages/cli
  • bun test test/instruction-discovery.test.ts test/session-instructions.test.ts test/tool-read.test.ts in packages/core (61 pass, 1 skip)

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #36990

Public API: removes server option instructions.claudeGlobal; OPENCODE_DISABLE_CLAUDE_CODE_PROMPT now skips every CLAUDE.md instead of only ~/.claude/CLAUDE.md (breaking only for the option added in #64474)

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I ran OpenCode from source with the simulated model on a project that has only a CLAUDE.md. On the base, OPENCODE_DISABLE_CLAUDE_CODE_PROMPT=1 still loaded the project CLAUDE.md. With this PR it is skipped, the same as with OPENCODE_DISABLE_CLAUDE_CODE=1. With no flag set, it still loads. The instruction-discovery and session-instructions tests pass. I couldn't run the type checks here because bun check isn't available, but no claudeGlobal option is left in packages/.

Public API: removes the server option instructions.claudeGlobal and the matching InstructionDiscovery option, which leaves instructions.claude as the only switch. OPENCODE_DISABLE_CLAUDE_CODE_PROMPT changes from skipping only ~/.claude/CLAUDE.md to skipping every CLAUDE.md. Both options came from #64474, which merged today, so the break is small as long as that hasn't shipped yet. The docs cover the env var change.

No concerns.

Related: #36990

@rekram1-node
rekram1-node enabled auto-merge (squash) November 17, 2026 22:43
@rekram1-node
rekram1-node merged commit bd115fd into dev Nov 17, 2026
14 checks passed
@rekram1-node
rekram1-node deleted the claude-instructions-mode branch November 17, 2026 22:44
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.

2 participants