Skip to content

The CLI keeps itself up to date in every harness - #5

Merged
hyorman merged 1 commit into
mainfrom
cli-auto-update
Dec 2, 2026
Merged

hyorman merged 1 commit into
mainfrom
cli-auto-update

Conversation

@hyorman

@hyorman hyorman commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

What

  • Auto-update in the CLI, for every harness. At session start (and when a Roo Code task ends), if the once-a-day check finds a newer release, agenthub notify starts agenthub update in the background, detached, and logs to ~/.config/agenthub/cache/update.log. It also skips the "newer version" line. If an update fails, it's tried again an hour later. Every harness whose hooks or plugin run notify gets this: Claude Code, Codex, Copilot, OpenCode, pi, Amp, Gemini, Roo and the rest.
  • On by default. agenthub settings auto-update on|off is a setting for the whole machine (no --project). AGENTHUB_AUTO_UPDATE=0/1 overrides it for one shell. AGENTHUB_NO_UPDATE_CHECK=1 still turns off the check, and auto-update with it.
  • npm installs keep the line. Only the single-file build is given a way to start the update, because a CLI installed with npm can't replace itself.
  • Claude Code plugin. The auto_update option is now on by default and leaves the decision to the CLI. Turning it off sets AGENTHUB_AUTO_UPDATE=0 for that plugin's sessions. hook.sh no longer runs agenthub update itself, and its unused data variable is gone.
  • Docs. Getting-Started.md no longer says the Claude Code plugin installs the CLI. Updates.md, harnesses/Claude-Code.md, docs/plugins.md, the environment table in CLI-Reference.md (regenerated from help.ts) and CHANGELOG.md are updated.

Testing

  • npm run typecheck passes.
  • npm test passes: 704 tests, 2 skipped.
  • New tests cover: on by default; off through the setting; the environment overriding the setting both ways; the one-hour hold-off; the Roo stop event; no update on other events; a CLI with no way to update itself keeping the line; nothing starting when the CLI is up to date. Also the settings auto-update rows, writes and usage errors.
  • Ran agenthub settings auto-update from source.
  • Not tested: a real detached self-update of a released binary.

🤖 Generated with Claude Code

agenthub notify now runs agenthub update in the background when a session
starts and the once-a-day check finds a newer release, instead of the
"newer version" line. It works wherever hooks or a plugin run notify
(Claude Code, Codex, Copilot, OpenCode, pi, Amp, Roo Code at task end and
the rest). On by default; agenthub settings auto-update off or
AGENTHUB_AUTO_UPDATE=0 turns it off. A started update holds off another for
the same release for an hour. An npm-installed CLI keeps the line.

The Claude Code plugin's auto_update option is now on by default and leaves
it to the CLI; off sets AGENTHUB_AUTO_UPDATE=0 for its sessions.

The wiki no longer says the Claude Code plugin installs the CLI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying theagenthub-wiki with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8201024
Status: ✅  Deploy successful!
Preview URL: https://8c772012.theagenthub-wiki.pages.dev
Branch Preview URL: https://cli-auto-update.theagenthub-wiki.pages.dev

View logs

@hyorman
hyorman merged commit 59f86f1 into main Dec 2, 2026
3 checks passed
@hyorman
hyorman deleted the cli-auto-update branch December 2, 2026 21:01
hyorman added a commit that referenced this pull request Dec 2, 2026
agenthub notify now runs agenthub update in the background when a session
starts and the once-a-day check finds a newer release, instead of the
"newer version" line. It works wherever hooks or a plugin run notify
(Claude Code, Codex, Copilot, OpenCode, pi, Amp, Roo Code at task end and
the rest). On by default; agenthub settings auto-update off or
AGENTHUB_AUTO_UPDATE=0 turns it off. A started update holds off another for
the same release for an hour. An npm-installed CLI keeps the line.

The Claude Code plugin's auto_update option is now on by default and leaves
it to the CLI; off sets AGENTHUB_AUTO_UPDATE=0 for its sessions.

The wiki no longer says the Claude Code plugin installs the CLI.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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