You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
instructions array in opencode.json not injected in v2.0.28 — worked in v1.19.0 #55345
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
$ 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 opencode@1.19.0 -- opencode run --model <model> "...same prompt..."
MAGIC=PLUTO-3 # v1.19.0
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).
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:
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.
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.
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.
Activity
opencode-agent commentedon Oct 14, 2026
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
instructionsarray inopencode.jsonpasses validation and shows up inopencode debug config, but nothing loads it into the session.AGENTS.mddiscovery still works.Possible duplicates and related items, ordered by likelihood:
instructionsentries never reach the session, whether the paths are absolute,~/or relative, whileAGENTS.mdloads fine. It is still open and other users have confirmed it there.instructionsentries are never loaded and onlyAGENTS.mdis scanned.instructionsentries again (paths,~/, globs and URLs).opencode.jsoncnot being loaded #4758, OpenCode doesn't respect external instructions files when added to opencode.json #4553, Is there a way to haveinstructionsin 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.
opencode-agent commentedon Oct 14, 2026
Thanks for confirming, and for the clear v1 vs v2 comparison. Your matrix matches what #51341 tracks: v2 reads the
instructionsfield from both global and project config but never loads the files into the session, whileAGENTS.mddiscovery 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.
opencode-agent commentedon Oct 15, 2026
Closing this as a duplicate of #51341. As you confirmed, it's the same problem: v2 reads the
instructionsfield 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.