Anthropic models ignore Custom Instructions #6481

Open
opened 2026-02-16 18:04:21 -05:00 by yindo · 4 comments
Owner

Originally created by @dvpadmin on GitHub (Jan 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

The Custom Instructions feature documented at https://opencode.ai/docs/rules/#custom-instructions does not work with Anthropic models.
From docs:

"You can specify custom instruction files in your opencode.json [...] This allows you and your team to reuse existing rules rather than having to duplicate them to AGENTS.md."

"All instruction files are combined with your AGENTS.md files."

Expected behavior

Files specified in instructions array are automatically combined with AGENTS.md and included in the LLM context. The model should follow these rules.

Actual behavior

Anthropic models (Claude Sonnet 4.5, Opus 4.5, Haiku 4.5) completely ignore content from instructions array. The same configuration works correctly with OpenAI and Groq models.

Reproduction

// opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "instructions": ["my-rules.md"]
}
  1. Add any rule to my-rules.md
  2. Start opencode, select Anthropic model
  3. Ask a question where the rule should apply
  4. Rule is ignored
    Switch to OpenAI/Groq → rule is applied.
    Environment
  • opencode v1.1.21
  • macOS
  • Tested with multiple Anthropic models
Originally created by @dvpadmin on GitHub (Jan 16, 2026). Originally assigned to: @rekram1-node on GitHub. ## Description The **Custom Instructions** feature documented at https://opencode.ai/docs/rules/#custom-instructions does not work with Anthropic models. From docs: > "You can specify custom instruction files in your opencode.json [...] This allows you and your team to reuse existing rules rather than having to duplicate them to AGENTS.md." > > "All instruction files are combined with your AGENTS.md files." ## Expected behavior Files specified in `instructions` array are automatically combined with AGENTS.md and included in the LLM context. The model should follow these rules. ## Actual behavior Anthropic models (Claude Sonnet 4.5, Opus 4.5, Haiku 4.5) completely ignore content from `instructions` array. The same configuration works correctly with OpenAI and Groq models. ## Reproduction ```json // opencode.json { "$schema": "https://opencode.ai/config.json", "instructions": ["my-rules.md"] } ``` 1. Add any rule to my-rules.md 2. Start opencode, select Anthropic model 3. Ask a question where the rule should apply 4. Rule is ignored Switch to OpenAI/Groq → rule is applied. Environment - opencode v1.1.21 - macOS - Tested with multiple Anthropic models
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of or related to existing issues. Please check:

  • #6105: Allow for system prompts for models hosted elsewhere - discusses provider-specific system prompt handling for Anthropic models
  • #8733: Subagent not reading markdown instructions from agent definition file - reports instructions not being properly passed to agents/subagents on macOS with Anthropic models (v1.1.21)

Feel free to ignore if these don't address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of or related to existing issues. Please check: - #6105: Allow for system prompts for models hosted elsewhere - discusses provider-specific system prompt handling for Anthropic models - #8733: Subagent not reading markdown instructions from agent definition file - reports instructions not being properly passed to agents/subagents on macOS with Anthropic models (v1.1.21) Feel free to ignore if these don't address your specific case.
Author
Owner

@pedropombeiro commented on GitHub (Feb 3, 2026):

Still seeing this in v1.1.49, FWIW.

@pedropombeiro commented on GitHub (Feb 3, 2026): Still seeing this in v1.1.49, FWIW.
Author
Owner

@rekram1-node commented on GitHub (Feb 3, 2026):

What provider? Anthropic?

@rekram1-node commented on GitHub (Feb 3, 2026): What provider? Anthropic?
Author
Owner

@pedropombeiro commented on GitHub (Feb 3, 2026):

What provider? Anthropic?

Yes, Anthropic and also GitLab with Anthropic-based models.

@pedropombeiro commented on GitHub (Feb 3, 2026): > What provider? Anthropic? Yes, Anthropic and also GitLab with Anthropic-based models.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6481