GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `instructions` array in opencode.json not injected in v2.0.28 — worked in v1.19.0 · Issue #55345 · anomalyco/opencode

instructions array in opencode.json not injected in v2.0.28 — worked in v1.19.0 #55345

New issue
Copy link
New issue
Copy link
Closed as duplicate
#55539
Closed as duplicate
instructions array in opencode.json not injected in v2.0.28 — worked in v1.19.0#55345
#55539
Copy link
Labels
pending closetriaging

Description

@yg-codes
yg-codes
opened on Oct 14, 2026
Issue body actions

OpenCode version

v2.0.28 (v2 line, installed via mise latest). Comparison below is against v1.19.0, the latest release on the GitHub releases page -- noting that the releases page only tracks v1.x tags while v2.x is distributed via the website/other channels.

Minimal repro

/tmp/pluto-token.md:

The magic word is PLUTO-3. When asked for the magic word, reply with only: PLUTO-3

Global ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "instructions": ["/tmp/pluto-token.md"]
}
$ cd /tmp
$ opencode run --standalone --model <model> \
    "Reply with exactly one line: MAGIC=<magic word>. If no magic word appears in your instruction context, reply exactly: NONE"
NONE                     # v2.0.28

$ mise x [email protected] -- opencode run --model <model> "...same prompt..."
MAGIC=PLUTO-3            # v1.19.0

Also checked on v2.0.28

  • Absolute path (above) fails too -- so this is not the relative-path resolution problem discussed in Issue Report: Custom instruction files in opencode.jsonc not being loaded #4758; the "use absolute paths" workaround suggested there does not hold on v2.0.28.
  • Project-level opencode.json with instructions -- not injected either (tried a path inside the project, and an absolute path). opencode debug config parses and displays the array in both the global and project documents, so config resolution sees it; session injection ignores it.
  • A multi-entry global array with ~/ paths and globs -- not injected.

What does work in the same v2.0.28 session

AGENTS.md discovery is fine: global ~/.config/opencode/AGENTS.md loads, and AGENTS.md/CLAUDE.md files are picked up per level from cwd up to the git root (verified with a two-token sandbox: repo-root and cwd CLAUDE.md both injected; a CLAUDE.md above the git root does not load; non-git directories only get the global file).

Related

  • Issue Report: Custom instruction files in opencode.jsonc not being loaded #4758 -- same symptom on v1.0.112, auto-closed as stale 2026-03-26
  • OpenCode doesn't respect external instructions files when added to opencode.json #4553 -- same symptom on v1.0.80
  • Is there a way to have instructions in the global configuration? #9368 -- global instructions question, same symptom
  • Bug: Global AGENTS.md (~/.config/opencode/AGENTS.md) not loaded when project AGENTS.md exists #22020 -- global AGENTS.md silently dropped when a project AGENTS.md exists

Activity

  1. opencode-agent commented on Oct 14, 2026

    @opencode-agent
    opencode-agentBot
    on Oct 14, 2026 – with OpenCode Agent
    Contributor
    More actions

    Thanks for the detailed report and the clean repro! I think this is a duplicate of #51341, which reports the same thing: in v2 the instructions array in opencode.json passes validation and shows up in opencode debug config, but nothing loads it into the session. AGENTS.md discovery still works.

    Possible duplicates and related items, ordered by likelihood:

    • config: instructions field does not load instruction files (v2.0.16) #51341: same bug. Global instructions entries never reach the session, whether the paths are absolute, ~/ or relative, while AGENTS.md loads fine. It is still open and other users have confirmed it there.
    • config: instructions field is parsed but never loaded (v2 regression) #54157: same report on v2.0.24, already closed as a duplicate of config: instructions field does not load instruction files (v2.0.16) #51341. It points out that the field is decoded but nothing reads it at runtime.
    • v2: config instructions entries are never loaded (only AGENTS.md scanned) #51262: an earlier v2 report that config instructions entries are never loaded and only AGENTS.md is scanned.
    • fix(core): resolve configured instructions #51422: an open pull request that would load configured instructions entries again (paths, ~/, globs and URLs).
    • Issue Report: Custom instruction files in opencode.jsonc not being loaded #4758, OpenCode doesn't respect external instructions files when added to opencode.json #4553, Is there a way to have instructions in the global configuration? #9368: older v1 reports of a similar symptom.

    To follow progress, you can subscribe to #51341 or #51422. Until then, putting the content in AGENTS.md, or referencing it from there, is the way to get it loaded.

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  2. opencode-agent
    added
    pending close
    triaging
    on Oct 14, 2026
  3. opencode-agent commented on Oct 14, 2026

    @opencode-agent
    opencode-agentBot
    on Oct 14, 2026 – with OpenCode Agent
    Contributor
    More actions

    Thanks for confirming, and for the clear v1 vs v2 comparison. Your matrix matches what #51341 tracks: v2 reads the instructions field from both global and project config but never loads the files into the session, while AGENTS.md discovery keeps working.

    Your comment looks like it was written for #51341. If you haven't already, it's worth posting it there too, so the data point sits with the main issue and PR #51422.

    As agreed, this issue will close as a duplicate of #51341.

  4. neriousy
    closed this as completedin #55539on Oct 14, 2026
  5. opencode-agent
    closed this as duplicateon Oct 15, 2026
  6. opencode-agent commented on Oct 15, 2026

    @opencode-agent
    opencode-agentBot
    on Oct 15, 2026 – with OpenCode Agent
    Contributor
    More actions

    Closing this as a duplicate of #51341. As you confirmed, it's the same problem: v2 reads the instructions field from both global and project config but never loads the files into the session. Thanks again for the clear repro and the v1.19.0 vs v2.0.28 comparison.

    To follow progress, subscribe to #51341 and PR #51422. If you find a case that #51341 doesn't cover, reply here and we'll take another look.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending closetriaging

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.