How Claude Code and the Copilot and Codex CLIs are kept up to date on a machine, and how to install the daily upgrade job — plain cron on an always-on machine, a launchd agent on a laptop (cron silently skips runs the machine sleeps through). Use when: setting Aide up on a new machine, the AI tools have gone stale, choosing between cron and launchd, editing core/scripts/upgrade-ai-tools. Do NOT use for: checking for news (use check-news).
2 stars
0 votes
0 copies
0 views
Added November 18, 2026
ai-agentsgobash
Works with
claude code
cli
Security analysis
C68/100
highCreates or modifies cron jobs for persistent execution
criticalModifies startup scripts or system services for persistence
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ai Tools Upgrade?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ragnarwestad-ai-tools-upgrade)
---
name: ai-tools-upgrade
description: >-
How Claude Code and the Copilot and Codex CLIs are kept up to date on a machine, and how
to install the daily upgrade job — plain cron on an always-on machine,
a launchd agent on a laptop (cron silently skips runs the machine sleeps
through). Use when: setting Aide up on a new machine, the AI tools have
gone stale, choosing between cron and launchd, editing
core/scripts/upgrade-ai-tools. Do NOT use for: checking for news (use
check-news).
---
# Updating the AI tools
The CLI tools are kept up to date automatically:
- **Claude Code** is updated by the job's `claude update`. Its own
background updater is off on both machines (`"autoUpdates": false` in
`~/.claude.json`), so a machine without the job stays on the version it has.
- **Copilot and Codex** are managed by [mise](https://mise.jdx.dev/), pinned to
`latest` in `~/.config/mise/config.toml`.
`core/scripts/upgrade-ai-tools` runs `mise upgrade` on the tools +
`claude update`. It is installed to `~/.local/bin/` by each AI installer (via
`core/scripts/_install-bin.sh`).
The script runs daily at 05:00, before the board's morning jobs (the X list
at 06:30, Nyhetssjekk at 07:00), so they run on the new versions. Set it up
once per machine, and pick the
mechanism by whether the machine sleeps:
**Always-on machine (desktop, server):** plain cron.
```bash
crontab -e
# Add:
0 5 * * * ~/.local/bin/upgrade-ai-tools
```
**Laptop:** a launchd agent instead. cron silently skips any run the machine
sleeps through and never catches up, so a lid shut past 05:00 means no upgrade
that day. launchd runs a missed `StartCalendarInterval` job on the next wake.
Save as `~/Library/LaunchAgents/com.<user>.upgrade-ai-tools.plist`, then
`launchctl bootstrap gui/$(id -u) <path>`:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.USER.upgrade-ai-tools</string>
<key>ProgramArguments</key>
<array>
<string>/Users/USER/.local/bin/upgrade-ai-tools</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key><integer>5</integer>
<key>Minute</key><integer>0</integer>
</dict>
<key>StandardOutPath</key>
<string>/Users/USER/Library/Logs/upgrade-ai-tools.log</string>
<key>StandardErrorPath</key>
<string>/Users/USER/Library/Logs/upgrade-ai-tools.log</string>
</dict>
</plist>
```
Do not run both — remove the cron line when installing the launchd agent.
The matrix (`docs/AI_SUPPORT_MATRIX.md`) reflects the *last verified* versions and
is updated manually via `/check-news` — not by the cron job.