Skip to content

Require minimum agent versions for all ug launches - #754

Merged
lilly-luo merged 9 commits into
mainfrom
lilly/min-agent-versions
Sep 19, 2026
Merged

lilly-luo merged 9 commits into
mainfrom
lilly/min-agent-versions

Conversation

@lilly-luo

@lilly-luo lilly-luo commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

https://databricks.slack.com/archives/C0BT0VBHAPN/p1789766932687409

Summary

  • Enforce Claude Code >= 2.1.259 and Codex >= 0.145.0 unconditionally at launch, instead of only when smart routing or gateway model discovery is enabled.
  • Drop the feature-specific message casing ('Smart routing requires…' / 'Model discovery requires…') in favor of a single 'ug requires…' message; the warn-then-offer-upgrade flow is unchanged.
  • Remove the now-redundant launch-time version recheck in _launch_smart_routing; rename MINIMUM_ROUTING_CODEX_VERSIONMINIMUM_CODEX_VERSION and the 0.134.0 constant → LEGACY_LAYOUT_CODEX_VERSION (layout detection only).

Testing

# lilly.luo at ip-10-93-38-177 in /tmp/ug-minver (git:lilly/min-agent-versions) [22:00:36]
$ uv run ug
• Using managed config — launching Claude Code as the default agent with system.ai.claude-sonnet-5
! ug requires Claude Code 2.1.259 or newer. Your current version is Claude Code 2.1.258.
Upgrade Claude Code if available? (Y/n) › n
ERROR ug requires Claude Code 2.1.259 or newer. Your current version is Claude Code 2.1.258.
# lilly.luo at ip-10-93-38-177 in /tmp/ug-minver (git:lilly/min-agent-versions) [22:00:41]
$ uv run ug
• Using managed config — launching Claude Code as the default agent with system.ai.claude-sonnet-5
! ug requires Claude Code 2.1.259 or newer. Your current version is Claude Code 2.1.258.
Upgrade Claude Code if available? (Y/n) › y
• Upgrading Claude Code...
Current version: 2.1.258
Checking for updates to latest version...

Warning: Multiple installations found
- npm-global at /home/lilly.luo/.nvm/versions/node/v24.14.0/bin/claude (currently running)
- native at /home/lilly.luo/.local/bin/claude

Warning: Configuration mismatch
Config expects: native installation
Currently running: npm-global
Updating the npm-global installation you are currently using
Config updated to reflect current installation method: global
New version available: 2.1.277 (current: 2.1.258)
Installing update...
Using global installation update method...
Successfully updated from 2.1.258 to version 2.1.277
✔ Claude Code is up to date
✔ Databricks auth already available for https://eng-ml-agent-platform.staging.cloud.databricks.com
✔ Unity Gateway connected
• Enter password to configure settings for Claude Code.
✔ Settings configured for Claude Code

╭──────────────────────────────────────────╮
│ Launching Claude Code with Unity Gateway │
╰──────────────────────────────────────────╯
  Provider: main.andy.test-mps
✔ Starting Claude Code
# lilly.luo at ip-10-93-38-177 in /tmp/ug-minver (git:lilly/min-agent-versions) [22:01:33]
$ uv run ug codex
! ug requires Codex 0.145.0 or newer; found 0.144.0.
Upgrade Codex if available? (Y/n) › n
ERROR ug requires Codex 0.145.0 or newer; found 0.144.0.
# lilly.luo at ip-10-93-38-177 in /tmp/ug-minver (git:lilly/min-agent-versions) [22:01:39]
$ uv run ug codex
! ug requires Codex 0.145.0 or newer; found 0.144.0.
Upgrade Codex if available? (Y/n) › y
• Upgrading Codex...

Updating Codex via `npm install -g @openai/codex`...

changed 2 packages in 5s

🎉 Update ran successfully! Please restart Codex.
✔ Codex is up to date
ERROR Your workspace's managed config doesn't enable Codex. Enabled: Claude Code.

the codex job keeps cancelling itself - it seems like we are on a bad runner? i ran the tests locally and they passed

Screenshot 2026-09-18 at 8 23 36 PM Screenshot 2026-09-18 at 8 25 19 PM

https://github.com/databricks/unity-gateway/actions/runs/35405097543

Enforce Claude Code >= 2.1.259 and Codex >= 0.145.0 unconditionally
instead of only when smart routing or gateway model discovery is
enabled, and drop the feature-specific message casing. The launch-time
recheck in _launch_smart_routing is subsumed by the bootstrap gate.
The 2.1.259 launch floor makes the managedMcpServers version probe
always true, so managed_mcp_uses_managed_file no longer gates on the
CLI version.
Below the version floor, ug again asks 'Upgrade <tool> if available?'
before running the native upgrader (restores the flow removed in #638,
now that the floor applies to every launch). Declining blocks the
launch with the requirement error; EOF/piped runs take the default and
upgrade so headless launches do not stall. npm-managed tools keep the
silent auto-upgrade.
Drives the real installed CLI with below-floor agent pins (claude
2.1.258, codex 0.144.0): declining the required-upgrade prompt blocks
the launch with the requirement restated; accepting runs the native
upgrader and the floor clears only when the upgrade succeeds. The
scenarios skip when the pinned agent already meets the floor, so the
default CI version pins are unaffected. Verified with
scripts/run_integration.py --installation-only under both pin sets.
CI rejected the skip-based selection: the integration contract bans
pytest.skip and the runner fails when selected tests skip. Each agent
now has a single below-floor scenario (decline blocks, accept runs the
native upgrader and the floor clears only on success) that returns
early when the pinned CLI already meets the floor.
@lilly-luo
lilly-luo enabled auto-merge (squash) September 19, 2026 00:24
@lilly-luo
lilly-luo disabled auto-merge September 19, 2026 00:26
@lilly-luo
lilly-luo merged commit ec5bfe2 into main Sep 19, 2026
34 of 40 checks passed
@lilly-luo
lilly-luo deleted the lilly/min-agent-versions branch September 19, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants