opencode icon indicating copy to clipboard operation
opencode copied to clipboard

ConfigInvalidError on Windows due to unrecognized keys in opencode.json

Open neurafusionai opened this issue 6 days ago • 1 comments

Description

ConfigInvalidError Config file at C:\Users\Usuario\opencode.json is invalid ↳ Unrecognized keys: "name", "description", "rules", "context", "notes"

When attempting to run the OpenCode tool on Windows, the configuration file located at C:\Users\Usuario\opencode.json fails to load with a ConfigInvalidError. The error indicates that the following keys in the configuration file are not recognized:

name description rules context notes

Request:

Clarify the valid configuration schema for OpenCode. Update documentation or error messages to list accepted keys. Consider backward compatibility for deprecated keys. Environment:

OS: Windows Config Path: C:\Users\Usuario\opencode.json

ConfigInvalidError: Config file at C:\Users\Usuario\opencode.json is invalid
↳ Unrecognized keys: "name", "description", "rules", "context", "notes"

Expected Behavior:

The tool should either:

Ignore unrecognized keys (with a warning), or Clearly document valid configuration keys and schema.

Steps to Reproduce:

Create a config file at C:\Users\Usuario\opencode.json with the above keys. Run any OpenCode command that reads this config. The error is thrown, halting execution.

Possible Causes:

The configuration schema may have changed in a recent update. Windows-based paths or environment might trigger stricter validation.

Request:

Clarify the valid configuration schema for OpenCode. Update documentation or error messages to list accepted keys. Consider backward compatibility for deprecated keys.

Screenshot and/or share link

No response

Operating System

OS: Windows

Terminal

Config Path: C:\Users\Usuario\opencode.json

Error: ConfigInvalidError: Config file at C:\Users\Usuario\opencode.json is invalid
↳ Unrecognized keys: "name", "description", "rules", "context", "notes"

neurafusionai avatar Jan 09 '26 13:01 neurafusionai