ucode opencode ignores the user's own OpenCode config

Open Beginner friendly
#391 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start by locating the ucode OpenCode environment setup and inspect where XDG_CONFIG_HOME is assigned. Verify the change uses OPENCODE_CONFIG as an additional layer, preserves ucode's model and provider settings, and allows the user's permissions, MCP servers, and other OpenCode configuration to take effect.

Written by the indexing model from the issue text.

Description

What happens

ucode opencode ignores your own OpenCode config in ~/.config/opencode/.

Your settings there have no effect during a ucode session:

  • permission rules (for example rm -rf * = deny, git push --force* = deny)
  • your MCP servers
  • disabled_providers / enabled_providers
  • skills, agents, commands, plugins, themes, tui.json
  • your global AGENTS.md

The permission rules are the biggest concern. A user who blocks rm -rf * and force pushes in their global config gets none of that protection under ucode opencode.

Why

ucode changes XDG_CONFIG_HOME to send OpenCode to ucode's own folder. That variable tells OpenCode where its config folder is. When ucode changes it, OpenCode looks in ucode's folder and never reads ~/.config/opencode/. The user's config is invisible.

What it should do

OpenCode is built to read many config files and combine them by priority. ucode should add its file on top of the user's config, not replace the whole folder. Then ucode keeps control of model and provider, and the user keeps everything else.

The fix: name ucode's file with OPENCODE_CONFIG (a layer on top) instead of redirecting XDG_CONFIG_HOME (a full replace).

Note

gemini (GEMINI_CLI_HOME) and pi (PI_CODING_AGENT_DIR) hide the user config in the same way. Separate follow-ups.

Dominant language
Python
Stars
97
Forks
75
Avg merge
1d 9h
Merged PRs (30d)
193

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/unity-gateway

All issues in databricks/unity-gateway

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.