Skip to content

Use native upgrade commands for Claude Code and Codex - #497

Open
lilly-luo wants to merge 8 commits into
mainfrom
lilly/fix-upgrade-cmds
Open

Use native upgrade commands for Claude Code and Codex#497
lilly-luo wants to merge 8 commits into
mainfrom
lilly/fix-upgrade-cmds

Conversation

@lilly-luo

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

Copy link
Copy Markdown
Collaborator

this PR does the following:

1/ use native upgrade cmd for cc + codex (claude update, codex upgrade) instead of going thru npm which doesnt respect our internal databricks proxy
2/ consolidate the upgrade logic
3/ prompt y/n from user for upgrade (instead of just doing it) for safety

testing:

cc - doesn't ask me to update unless i need it

$ claude --version
2.1.247 (Claude Code)
# lilly.luo at ip-10-93-35-82 in ~/worktrees/ucode-demo (git:lilly/fix-upgrade-cmds) [18:58:25]
$ uv run ucode claude
      Built ucode @ file:///home/lilly.luo/worktrees/ucode-demo
Uninstalled 1 package in 2ms
Installed 1 package in 1ms

╭──────────────────────────────────────────╮
│ Launching Claude Code with Unity Gateway │
╰──────────────────────────────────────────╯
✔ Starting Claude Code
# lilly.luo at ip-10-93-35-82 in ~/worktrees/ucode-demo (git:lilly/fix-upgrade-cmds) [18:58:33]
$ uv run ucode claude --enable-smart-routing
! Smart routing requires Claude Code 2.1.248 or newer. Your current version is Claude Code 2.1.247.
Upgrade Claude Code if available? (y/n) › y
• Upgrading Claude Code...
Current version: 2.1.247
Checking for updates to latest version...
Updating to 2.1.260...
Successfully updated from 2.1.247 to version 2.1.260
✔ Claude Code is up to date

╭──────────────────────────────────────────╮
│ Launching Claude Code with Unity Gateway │
╰──────────────────────────────────────────╯
✔ Starting Claude Code
• Smart routing v2: the first submitted prompt will select Claude Code's model; log: /home/lilly.luo/.ucode/claude-v2-pty.log.

codex -- doesn't ask me to update unless i need it

$ codex --version
codex-cli 0.152.1

$ uv run ucode codex 
# comes up 

$ uv run ucode codex --enable-smart-routing
! Codex smart routing requires Codex 0.145.0 or newer; found 0.143.0.
Upgrade Codex if available? (y/n) › y
# upgrades and comes up

@lilly-luo lilly-luo changed the title ugprade cmds Use native upgrade commands for Claude Code and Codex Sep 4, 2026
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.

1 participant