Allow running bare claude unwrapped alongside ug claude (opt out of OS-managed settings)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start with src/ucode/agents/claude.py and src/ucode/managed_files.py, then read “Claude Subscription Relay” in docs/os-managed-settings-design.md to understand the local-only path and managed-settings behavior. Trace how ug claude reconciles settings and how ug status reports them; define and test the opt-out, repeated launches, and a documented non-destructive cleanup path for existing managed settings.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
After running ug claude once from an interactive terminal, a bare claude
invocation is permanently routed through the Databricks AI Gateway. There is
currently no supported way to keep the two separate, i.e.:
• ug claude -> Databricks AI Gateway (Unity Gateway models)
• claude -> the user's own native configuration (e.g. personal subscription)
Current behavior
Every interactive ug claude launch calls write_tool_config(), which writes
the gateway overlay (ANTHROPIC_BASE_URL, ANTHROPIC_CUSTOM_HEADERS,
apiKeyHelper, ANTHROPIC_DEFAULT_*_MODEL, ...) to two places
(src/ucode/agents/claude.py):
- ~/.claude/ucode-settings.json (passed explicitly via claude --settings ...)
- /etc/claude-code/managed-settings.json (Linux) — the OS-managed,
machine-wide, highest-precedence scope
The managed file is what captures bare claude: it reads the managed scope
without any flags (managed > --settings > user), and _reconcile_managed_settings
is explicit that this is intentional ("so a bare claude uses the gateway").
Why this can't be worked around today
• claude --setting-sources only accepts user,project,local; the managed
scope always applies and cannot be excluded via CLI flags.
• Interactive ug claude re-reconciles the managed file on every launch
(recreates it when absent, overwrites drifted values), so manually deleting
it only lasts until the next run.
• managed_writes_allowed() keys off stdin.isatty() only
(src/ucode/managed_files.py) — there is no flag or env var to stay local-only.
• ug revert restores everything and clears state, so it is not usable as a
toggle between the two modes.
Use case
Developers who use both their own Claude subscription and the Databricks
gateway (e.g. personal vs. work contexts, or comparing native vs. gateway
behavior) currently have to choose one: after the first ug claude run, the
native claude experience is gone machine-wide until a full revert.
(Related: subscription-relay mode is already intentionally local-only for the
same class of reason — a persisted gateway address would break bare claude.
See "Claude Subscription Relay" in docs/os-managed-settings-design.md.)
Proposal
Add a supported local-only opt-out so ug claude uses only the
--settings injection (~/.claude/ucode-settings.json) and never touches the
OS-managed file. For example, one of:
• ug claude --local-only / ug configure --no-managed-settings, or
• UCODE_NO_MANAGED_SETTINGS=1 env var
Suggested semantics:
• When opted out, skip _reconcile_managed_settings (same path as the
non-interactive local fallback) instead of writing the managed file.
• If the managed file already contains ug-owned gateway values, either warn
that bare claude is still captured (with a remediation hint), or offer to
clean just the ug-owned keys — without a full ug revert/state wipe
(e.g. ug revert --managed-only or per-agent revert).
• ug status already reports managed state (current, compatible (local settings), ...), so the opted-out state stays observable.
Acceptance criteria
• [ ] With the opt-out set, ug claude launches through the gateway while
bare claude keeps working against the user's native configuration.
• [ ] Repeated opted-out launches never create or modify the OS-managed file.
• [ ] A user who previously ran without the opt-out has a documented,
non-destructive path back to a clean managed file.
Environment
• ug --version: 0.2.0+53.g3076da9
• OS: Ubuntu
• Claude Code version (claude --version): 2.1.310 (Claude Code)
- Lenguaje dominante
- Python
- Estrellas
- 122
- Forks
- 101
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 228
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de databricks/unity-gateway
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
databricks/unity-gateway#1622 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
databricks/unity-gateway#1042 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
databricks/unity-gateway#1021 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
feat(codex): support amazon_bedrock Model Provider Services that expose OpenAI-compatible modelsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
databricks/unity-gateway#454 ·
Los mantenedores suelen responder en 1 día
-
ucode opencode ignores the user's own OpenCode configPosiblemente ocupada @larsmoan la tomó hace 79 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
databricks/unity-gateway#391 ·
Los mantenedores suelen responder en 1 día
Todos los issues de databricks/unity-gateway
Issues similares
-
Unknown stop ID in slow zone data crashes post formatting and skips the rest of that day's postsAbiertobackend bug tm-new-volunteer
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
transitmatters/mbta-slow-zone-bot#81 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
spacetelescope/rdmt-spire#49 ·
Los mantenedores suelen responder en 1 día
-
AI bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
AUTO-MAS-Project/AUTO-MAS#1960 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
btclib-org/btclib-wallet#872 ·
Los mantenedores suelen responder en 1 día