Scheduled AI Agent for Weekly Dependency Upgrades
Dependabot opens thirty pull requests in a week, one per package, each with its own CI run and its own merge conflict with the other twenty-nine. Nobody merges them. They go stale, Dependabot rebases them, and they go stale again. Six months later a security fix needs a new major version of something, and the upgrade that would have been ten small steps is now one two-week project.
This tutorial makes it one pull request a week. Every Monday at 09:00 a scheduled task gives an agent the same job in your repository's checkout: list what is outdated, upgrade every patch and minor version on one branch, run the tests and the build, and open one grouped pull request once you approve it. Major versions are never upgraded on their own. The agent lists them on a card, with the current and latest version, what breaks and the upgrade guide, and a button for each. You pick one, and it becomes a task you spin up in a fork, with its own folder, branch and agent, so it never holds up next Monday.
There is nothing to install and no CI job to write: one workspace and one scheduled task. The screenshots come from the AgentRQ app on November 30, 2026, a Monday, with a demo web app, shop-web, as the repository. The scheduler started that day's run itself at 09:00.
What You Build
| Piece | Setting | What it does |
|---|---|---|
| deps workspace | Working directory: the repository's checkout. YOLO mode off | The agent that upgrades packages and asks before it pushes |
| Weekly dependency upgrades | A scheduled task: Repeated, Weekly, 09:00 | One run every Monday: one branch, the tests, one pull request |
| The majors card | Buttons the agent puts in its reply | One row per major version, with a button to try it |
| A fork per major | Spin up on the task the agent makes | Its own folder, branch and agent, so a big upgrade runs beside the weekly one |
Three ideas make it work:
- → A schedule starts the work. A scheduled task is a template in a workspace. Each time it is due, AgentRQ creates a new task from it with the same title and instructions, and the workspace's agent picks it up.
- → The agent asks with a card, not a wall of text. A reply can carry an A2UI card with buttons, forms and links. A click is your answer, sent back to the agent with the package it names.
- → You stay in charge of what leaves your machine. With YOLO mode off, every command the agent runs waits for your answer, so a push or a pull request never happens without you.
Before You Start
- → An AgentRQ account, and a computer where the agent will run, with a checkout of the repository on it. Here that is shop-web, a TypeScript web app with npm. See machines and the connect agents guidelines.
- → An agent that connects to AgentRQ: Claude Code over MCP, or Codex, Gemini CLI and others through the ACP Gateway.
- → agentrqd, the AgentRQ daemon, running on that computer, version 0.9.3 or later. Spin up needs it to make the fork's folder and start its agent.
- → The GitHub CLI on that computer, signed in with gh auth login, so the agent can push a branch and open a pull request.
- → Tests and a build the agent can run from the command line, here npm test and npm run build. Without them, a green run means nothing.
Step 1: Make the deps Workspace
Create a workspace named deps. Its mission tells the agent what it is for, every time it starts:
In its settings, set the Working Directory to the repository's checkout, ~/code/shop-web here, and start its agent. Leave YOLO mode off.
For Claude Code, the repository's .claude/settings.json can allow the commands that only read, install or test, and keep asking for the two that matter:
Step 2: Write the Weekly Task
In deps, click New Task. 1. Every run gets this title, "Weekly dependency upgrades". 2. And these instructions: each run is a new task with this text. 3. The agent works on it, so leave Agent picked. 4. YOLO off: it asks first before every command your settings don't allow.
The instructions are the whole playbook. This run used:
Step 4 is the one that keeps the pull request mergeable. A weekly batch is only useful if it is green, so a package that breaks the tests is pinned back and named, and the other ten still ship.
For another package manager, change the commands: pnpm outdated and pnpm update, go list -u -m all and go get -u=patch, or cargo update and cargo outdated.
Step 3: Schedule It for Monday 09:00
Still in the form, 1. click the calendar button to open the schedule. 2. Choose Repeated. 3. Frequency: Weekly. 4. Time: 09:00, in your own time zone. 5. The line at the bottom is what AgentRQ saves: the cron expression in UTC, here 0 7 * * 1 for 09:00 in Athens, and how long until the first run. Create the task.
Weekly runs on the day of the week you create the task. This one was made on a Monday. On any other day, choose Custom... as the frequency and tick only Mon under Active Days. Schedule a repeating task has every frequency.
Step 4: The Schedule and Its Runs
The task now sits under Scheduled in deps. Click it. 1. Every Monday at 09:00: the badge says how it repeats, and the line under the title says when it runs next. 2. One run a week, newest first: each run is a task of its own under Recent Instances, here November 9, 16, 23 and 30. 3. The schedule itself stays in the list as the template the runs are made from.
Runs never pile up. When a run is due, the scheduler first checks whether an earlier run of the same schedule is still Not started or Ongoing. If one is, it skips that week instead of adding another. An agent that was offline for a month finds one run waiting, not four. A skipped week is not made up later: the next run is the next Monday.
Step 5: The Run Upgrades and Tests
On November 30 at 09:00 the scheduler created the run, and the agent picked it up. npm outdated found 14 packages behind: 11 patch or minor, 3 major. It upgraded the 11 and left the 3 alone.
1. One branch, deps/weekly-2026-11-30, made from main. 2. 11 patch and minor upgrades, each from and to. 3. Tests and build pass: 214 tests, 0 failures, and a build with no type errors. Nothing had to be pinned back.
Step 6: You Approve the Pull Request
The agent committed, asked to push the branch, and waited. After you allowed that, it asked to open the pull request. 1. It asks before gh pr create, and shows the exact command, with the branch and the title. 2. You say yes with Allow Once. The card also reaches your phone through notifications.
1. One pull request for the week: shop-web#318, 11 packages, patch and minor only. 2. Linked on the task: the Links bar at the top of the task picks up the pull request, so you find it from the run later. 3. Majors wait for you: the agent's next reply is the card.
Step 7: The Majors Card
The agent put the majors on a card instead of upgrading them. 1. Every major, not upgraded: react-router-dom, eslint and tailwindcss. 2. Current → latest, eslint 8.57.1 → 9.39.1. 3. What breaks, in two lines: the flat config is the default, .eslintrc files are no longer read, and it needs Node 18.18 or later. 4. Upgrade guide opens the project's migration page. 5. Pick one to try with its button.
The agent writes the card itself, from step 7 of the instructions. Each Try button sends an event with the package in its context, and each guide button opens a link. For eslint, the two buttons look like this:
Step 8: Pick One
eslint only runs on developer machines, so nothing it changes reaches users: a good first major. Click Try eslint 9.
1. Your click, as your reply: "Try eslint 9" shows in the thread as a message from you, and the agent gets it with the package and versions. The run was completed, so the click reopens it. 2. A task, with the steps: the agent made "Upgrade eslint to 9" in deps, with the migration steps, then completed the run again. 3. Waiting in deps under Not Started. 4. The card is answered: the button you clicked is marked, and the other Try buttons no longer work.
The task holds the whole migration: a branch, deps/eslint-9, the install, moving .eslintrc.cjs to eslint.config.js, npm run lint, npm test and npm run build, and the pull request. Its last line is the upgrade guide.
Step 9: Spin It Up in a Fork
The deps agent could do the upgrade itself, but then next Monday's run and a two-day migration would share one checkout and one agent. A fork keeps them apart. Hover over the task and click the bolt, 1. Spin up in a fork. 2. The task the agent made is the one that moves.
Spin up asks what to run, and where. 1. A fork named after the task, upgrade-eslint-to-9. 2. Your machine, here dev-laptop, the only one online. 3. Spin up forks deps, moves the task into the fork and starts an agent there, in one step.
Step 10: The Fork Does the Major
1. A fork of deps, with its own agent: upgrade-eslint-to-9 sits under deps in the sidebar, and its agent picked up the task. 2. Its own folder and branch: agentrqd made the fork a git worktree of shop-web under ~/.agentrq/forks, so the deps checkout stays on main for next Monday.
eslint 9 found 4 errors the old config didn't: its no-unused-vars rule now checks caught errors by default. The agent fixed them in the code, as the task said, and turned no rule off. Its git push and gh pr create wait for your Allow Once, as in Step 6.
1. A pull request for eslint 9 alone, shop-web#319: the upgrade, the flat config and the 4 fixes, with lint, tests and build passing. 2. Done, in the fork: the task is under Recently Completed.
Step 11: Merge the Fork Back
When the pull request is merged on GitHub, fold the fork back into deps. Right-click it in the sidebar and choose Merge into deps. 1. What Merge does: it stops the fork's agent, moves its task back to deps with its thread, and removes the fork. 2. Delete it too: tick Delete the fork's folder on the machine to remove the worktree as well. Its git branch is kept, so no commit is lost, but anything uncommitted in the folder goes with it. 3. Merge.
Upgrade eslint to 9 is now under Recently Completed in deps, next to the weekly runs. Next Monday the card lists two majors, and you pick the next one when you have the time.
Traps to Avoid
- → Weekly means today's weekday. The Weekly frequency repeats on the day you create the task. Made on a Thursday, it runs on Thursdays. For Monday from any other day, choose Custom... and tick only Mon. When you reopen a saved schedule, it may show as Custom too: the cron is the same.
- → The time is stored in UTC. You pick 09:00 in your time zone, and AgentRQ saves the matching UTC time. With daylight saving, the run moves an hour on your clock twice a year. Check the cron line under the popover.
- → An open run skips the week. If last week's run is still Not started or Ongoing at Monday 09:00, no new run is made, and the missed week is not made up. Make sure the agent completes the run at the end, and remember that clicking a card button reopens it until the agent completes it again.
- → A blocked run doesn't hold the schedule. Only Not started and Ongoing runs stop the next one. A run you set to Blocked stays in the list, and next Monday's run starts beside it.
- → A card is answered once. After one click, the card's other Try buttons stop working. To try a second major the same week, reply in the run with "Try tailwindcss 4", or wait for next Monday's card.
- → A fork starts without your untracked files. The fork's folder is a git worktree, so it has only what is committed, plus the agent's own config. node_modules and .env are not there. Put npm install, or npm ci, in the task's first steps, and copy any .env the tests need.
- → agentrqd adds a .gitignore line. In the fork's folder, agentrqd writes .mcp.json, which holds the workspace's token, and adds it to a .gitignore so it is never committed. Keep that line out of the pull request, or commit it on purpose.
- → Merge waits for the work. Merge into deps is refused while any of the fork's tasks is not completed or rejected. Finish or reject the task first.
Make It Yours
- → Security fixes now, not Monday. Add a second scheduled task, daily at 08:00, that runs npm audit --omit=dev and only opens a pull request when it finds a high or critical advisory with a patch or minor fix.
- → Spin up more than one major. Each Try makes one task. Pick another major the next week, or reply with it in the same run, and spin up each task in its own fork. They run side by side, each on its own branch.
- → Remember what broke. Ask the agent to save each package it pinned back, and why, to workspace memory. Next Monday's run reads it and doesn't try the same upgrade blind.
- → One workspace per repository. Make a deps workspace for each repository, each with its own working directory and schedule. Stagger the times, so the pull requests don't all arrive at once.
- → Have the pull request reviewed first. Ask the agent to add the agent-review label when it opens the weekly pull request, with gh pr create --label agent-review, and the reviewer from AI code review on every pull request gives it a first pass before you do.
- → Fix the red build it might cause. If a weekly upgrade slips through and breaks main, the agent from fix a red main build with an AI agent takes the failed CI run.
FAQ
Can I keep Dependabot? Yes, for security alerts. Turn off its version update pull requests, or limit them to security updates, so the two don't open the same upgrade twice.
What happens when an upgrade breaks the tests? Step 4 of the instructions tells the agent to find the package that broke it, pin it back to the version on main and say so in the pull request. The other upgrades still go out that week, and the pinned one is tried again the next.
Why not let the agent upgrade majors too? A major version can change behavior that tests don't cover, and it often needs code changes and a decision about timing. The card gives you that decision without the reading: what breaks, and the guide, one click away.
Can the agent push to main or merge? Not while it has to ask. The mission says never, and with YOLO mode off every git push and gh pr create waits for Allow Once. Merging the pull request is your normal review.
What if my computer is off on Monday morning? The run is created at 09:00 anyway and waits under Not Started. When the agent connects, it picks it up. Until that run is done, later Mondays are skipped, so you never come back to a queue.
Can the scheduled run use a different agent from the fork? Yes. Each fork has its own agent: Claude Code in deps, and Codex or Gemini CLI through the ACP Gateway in a fork. Pick it in Spin up, under What to run.
Which agents can run deps? Any that connects to AgentRQ: Claude Code, or Codex, Gemini CLI and others through the ACP Gateway.