Skip to content

Issue Report: Custom instruction files in opencode.jsonc not being loaded #4758

Closed

Description

@coolehs

Description

The instructions array in opencode.jsonc configuration file is not being loaded into the agent's context at session start. Only the AGENTS.md file appears to be loaded automatically.

Configuration

File: ~/.config/opencode/opencode.jsonc

{
    "$schema": "https://opencode.ai/config.json",
    "model": "github-copilot/claude-sonnet-4.5",
    "autoupdate": true,
    "instructions": [
        "SUPEROPENCODE.md",
        "COMMANDS.md",
        "FLAGS.md",
        "PRINCIPLES.md",
        "RULES.md",
        "MCP.md",
        "PERSONAS.md",
        "ORCHESTRATOR.md",
        "MODES.md",
        "KIRO.md"
    ]
}

Expected Behavior

All instruction files listed in the instructions array should be automatically loaded and available in the agent's context at the start of each session.

Actual Behavior

Only AGENTS.md is loaded into the agent's context. The agent confirms it can only see:

  • Instructions from <project>/AGENTS.md (project-level)
  • Instructions from ~/.config/opencode/AGENTS.md (global)

None of the files specified in the instructions array are loaded.

Verification

All instruction files exist in the config directory:

~/.config/opencode/
  ✓ AGENTS.md
  ✓ SUPEROPENCODE.md
  ✓ COMMANDS.md
  ✓ FLAGS.md
  ✓ PRINCIPLES.md
  ✓ RULES.md
  ✓ MCP.md
  ✓ PERSONAS.md
  ✓ ORCHESTRATOR.md
  ✓ MODES.md
  ✓ KIRO.md

Additional Context

The MCP servers defined in the same config file (context7 and sequential-thinking) appear to be loading correctly, suggesting the config file itself is being read, but the instructions array is not being processed. The default model is also correctly loaded.

OpenCode version

1.0.112

Steps to reproduce

  1. Create custom instruction files in ~/.config/opencode/
  2. Add them to the instructions array in opencode.jsonc
  3. Start a new OpenCode session
  4. Ask the agent if it has access to the custom instructions
  5. Agent confirms it only has access to AGENTS.md

Screenshot and/or share link

No response

Operating System

macOS 14 (Darwin 24.5.0, ARM64)

Terminal

No response

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 26, 2025
  2. github-actions commented on Nov 26, 2025

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  3. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Contributor

    @coolehs the files are resolved relative to where opencode runs. You should use absolute paths here instead

  4. self-assigned this
    on Nov 26, 2025
  5. berenar commented on Jan 19, 2026

    @berenar
    Contributor

    I had the same exact issue (#9368): I assumed that the paths in instructions are relative, but they are clearly not. I feel this is important information that should be in the docs.

  6. berenar commented on Jan 19, 2026

    @berenar
    Contributor

    @rekram1-node Sent a PR already

  7. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions