Cannot read newer opencode.json schema properties if opencode has not been updated #769

Closed
opened 2026-02-16 17:28:13 -05:00 by yindo · 3 comments
Owner

Originally created by @austinm911 on GitHub (Jul 17, 2025).

Originally assigned to: @thdxr on GitHub.

I added an openconfig.json on v0.3.13 in my project and added one of the newer keys "layout": "stretch". opencode won't start because I'm not on a newer version like v0.3.17 and it will error as below.

So you either have to manually update or remove the key/update it to a value known on your current version for opencode to start and it to auto update, where you can add back your newer setting.

Error: Config file at /Users/am/Coding/project/opencode.json is invalid
↳ Unrecognized key(s) in object: 'layout' 
Originally created by @austinm911 on GitHub (Jul 17, 2025). Originally assigned to: @thdxr on GitHub. I added an openconfig.json on v0.3.13 in my project and added one of the newer keys `"layout": "stretch"`. opencode won't start because I'm not on a newer version like v0.3.17 and it will error as below. So you either have to manually update or remove the key/update it to a value known on your current version for opencode to start and it to auto update, where you can add back your newer setting. ```bash Error: Config file at /Users/am/Coding/project/opencode.json is invalid ↳ Unrecognized key(s) in object: 'layout' ```
yindo closed this issue 2026-02-16 17:28:13 -05:00
Author
Owner

@drewbitt commented on GitHub (Jul 17, 2025):

I believe that is expected. They could consider not totally failing in this scenario - warn and read known keys.

@drewbitt commented on GitHub (Jul 17, 2025): I believe that is expected. They could consider not totally failing in this scenario - warn and read known keys.
Author
Owner

@thdxr commented on GitHub (Jul 17, 2025):

i think opencode upgrade would still work with a broken config. we're trying to be strict about config so people who mess it up get proper feedback

@thdxr commented on GitHub (Jul 17, 2025): i think `opencode upgrade` would still work with a broken config. we're trying to be strict about config so people who mess it up get proper feedback
Author
Owner

@thdxr commented on GitHub (Jul 17, 2025):

closing for now

@thdxr commented on GitHub (Jul 17, 2025): closing for now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#769