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
[FEATURE]: add OPENCODE_NO_PARENT_CONFIG to disable parent directory config inheritance #10025
When running opencode in a subdirectory that has its own opencode.json, the config from parent directories is automatically merged via findUp. This can cause unwanted config inheritance.
Example:
~/project/opencode.json # parent config with MCP servers A, B, C
~/project/agent/opencode.json # child config with MCP server D
Running from ~/project/agent/ loads both configs and sees all MCP servers (A, B, C, D), even when you only want the local config.
Use Case
When developing multiple agents locally, each with their own config, you want isolation - only the config in the current directory should be loaded, not inherited from parent directories.
Proposed Solution
Add OPENCODE_NO_PARENT_CONFIG environment variable that limits findUp to only search the current directory, not walk up to parent directories.
OPENCODE_NO_PARENT_CONFIG=true opencode
This would skip:
opencode.json / opencode.jsonc from parent directories
.opencode/ directories from parent directories
AGENTS.md / CLAUDE.md from parent directories
Global config (~/.config/opencode/) would still be loaded unless combined with OPENCODE_DISABLE_GLOBAL_CONFIG=true.
changed the title [-]feat: add OPENCODE_NO_PARENT_CONFIG to disable parent directory config inheritance[/-][+][FEATURE] add OPENCODE_NO_PARENT_CONFIG to disable parent directory config inheritance[/+]on Jan 22, 2026
While #10021 and #10025 are related (both dealing with config isolation), they address different aspects - #10021 focuses on global config, while #10025 focuses on parent directory config in the same project hierarchy. These may need coordinated implementation to provide complete isolation control.
Feel free to ignore if your specific use case requires something different from these existing discussions.
changed the title [-][FEATURE] add OPENCODE_NO_PARENT_CONFIG to disable parent directory config inheritance[/-][+][FEATURE]: add `OPENCODE_NO_PARENT_CONFIG` to disable parent directory config inheritance[/+]on Jan 22, 2026
Activity
[-]feat: add OPENCODE_NO_PARENT_CONFIG to disable parent directory config inheritance[/-][+][FEATURE] add OPENCODE_NO_PARENT_CONFIG to disable parent directory config inheritance[/+]github-actions commentedon Jan 22, 2026
This issue might be a duplicate of existing issues. Please check:
OPENCODE_DISABLE_GLOBAL_CONFIG) #10021: Complementary request forOPENCODE_DISABLE_GLOBAL_CONFIGto disable global config loadingWhile #10021 and #10025 are related (both dealing with config isolation), they address different aspects - #10021 focuses on global config, while #10025 focuses on parent directory config in the same project hierarchy. These may need coordinated implementation to provide complete isolation control.
Feel free to ignore if your specific use case requires something different from these existing discussions.
[-][FEATURE] add OPENCODE_NO_PARENT_CONFIG to disable parent directory config inheritance[/-][+][FEATURE]: add `OPENCODE_NO_PARENT_CONFIG` to disable parent directory config inheritance[/+]