Skip to content

ConfigInvalidError on Windows due to unrecognized keys in opencode.json #7483

Closed

Description

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"

Activity

  1. ghost added
    bugSomething isn't working
    on Jan 9, 2026
  2. github-actions commented on Jan 9, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. cravenceiling commented on Jan 9, 2026

    @cravenceiling
    Contributor

    You can see the schema with descriptions for the properties here, and you could use and ide/editor with a proper json lsp to validate your config and get suggestions for valid fields according to the config schema.

  4. rekram1-node commented on Jan 9, 2026

    @rekram1-node
    Contributor

    this is expected, seems like your config is invalid, the error message is pretty clear on what you should fix

  5. rekram1-node commented on Jan 12, 2026

    @rekram1-node
    Contributor

    @neurafusionai it seems to me that ur unfamiliar with json schemas? are u just pasting a schema as a config? you dont want to do that

  6. ghost closed this as completedon Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions