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
v2: config instructions entries are never loaded (only AGENTS.md scanned) #51262
In opencode v2 (tested on 2.0.14 and 2.0.16), the instructions array in opencode.json is accepted by the config schema but its entries never reach the session context. Only AGENTS.md files are discovered and loaded.
Evidence
ConfigInstructionPlugin.projectSource scans up({ targets: ["AGENTS.md"], ... }) and globalSource reads only <config>/AGENTS.md. Nothing iterates config.instructions (the v1 session/instruction.ts globUp loop that handles glob patterns, ~ expansion, absolute paths, and remote URLs is not wired in v2).
Empirical: three canary tests all fail — absolute path outside project, project-root relative path, config-dir relative path, and project-level .opencode/opencode.json instructions. The serialized instruction blob in instruction_blob table contains only the two AGENTS.md files.
Debug watcher log shows watcher subscribe only for AGENTS.md files; instruction entries get no subscription.
Docs (https://opencode.ai/docs/rules/ + config page) still document instructions as working: paths, glob patterns, ~, and remote URLs.
Impact
Migration from v1 silently loses all custom instruction files referenced via instructions — including shared team rules files (CONTRIBUTING.md, .cursor/rules/*.md) and remote URL instructions.
Expected
config.instructions entries resolve (local globs relative to config dir, ~-expansion, absolute paths, remote URLs) and are included in the discovered instruction file list, or the schema/docs should mark the key unsupported in v2.
Withdrawn — the injection need is covered by the maintained opencode-rules plugin (2.0.0-beta line, session.synthetic delivery verified working on 2.0.16). Leaving the config.instructions schema/docs mismatch noted for others hitting it.
Activity
pkuqiuning commentedon Sep 25, 2026
Withdrawn — the injection need is covered by the maintained opencode-rules plugin (2.0.0-beta line, session.synthetic delivery verified working on 2.0.16). Leaving the config.instructions schema/docs mismatch noted for others hitting it.
fix(core): resolve configured instructions
fix(core): resolve configured instructions
fix(core): resolve configured instructions