Skip to content

fix(config): tolerate missing file variables in config#30708

Open
stone-w4tch3r wants to merge 2 commits into
anomalyco:devfrom
stone-w4tch3r:fix/config-missing-file-vars
Open

fix(config): tolerate missing file variables in config#30708
stone-w4tch3r wants to merge 2 commits into
anomalyco:devfrom
stone-w4tch3r:fix/config-missing-file-vars

Conversation

@stone-w4tch3r
Copy link
Copy Markdown

Issue for this PR

Fixes/Closes #15033

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Makes missing {file:...} config variables resolve to an empty string instead of failing opencode start when file is not present.

Existing file references are still read normally, and non-missing file read errors remain fatal (eg permissions problems).

How did you verify your code works?

  • Ran: bun test --timeout 30000 test/config/config.test.ts — passed
  • Ran: bun typecheck — passed
  • Ran dev TUI: bun dev /home/myuser/myproject where project-local opencode.json has missing file from {file:path} in MCP section. Command succeeded, opencode loaded, MCPs were off (not all config entries properly set). Compared with opencode /home/myuser/myproject and it fails to start (treats missing files as fatal).

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@stone-w4tch3r stone-w4tch3r changed the title fix(config): tolerate missing file variables fix(config): tolerate missing file variables in config Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing {file:} reference causes entire agent config to fail

1 participant