---
title: "Scheduled AI Agent for Weekly Dependency Upgrades | AgentRQ Tutorials"
url: https://agentrq.com/tutorials/weekly-dependency-upgrades-with-a-scheduled-ai-agent-one-grouped-pull-request-and-majors-you-pick
description: "Schedule an AI agent for Monday 09:00 to upgrade every patch and minor dependency in one tested pull request, and list the majors on a card for you to pick."
---

![](https://agentrq.com/assets/guideline-icons/calendar-clock.svg) Tested November 30, 2026 | [All Tutorials](https://agentrq.com/tutorials/)

# 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.

![The flow: once, you make the deps workspace with a mission, the repository's checkout and YOLO mode off, and a scheduled task, Weekly dependency upgrades, repeated every Monday at 09:00 your time and saved as a cron in UTC. Every Monday at 09:00 the scheduler starts one run, the deps agent upgrades patch and minor versions on one branch and runs the tests, you allow gh pr create once, and one grouped pull request opens with 11 upgrades, tests and build passing. If the last run is still open, that week is skipped. The 3 majors are not upgraded: the agent lists them on an A2UI card with current and latest version, what breaks and a button each. You click Try eslint 9, then Spin up, which makes a fork, upgrade-eslint-to-9, with its own folder, branch and agent. It opens its own pull request for eslint 9 alone, and Merge into deps removes the fork and keeps the branch](https://agentrq.com/assets/tutorials/deps-upgrades-00-flow.svg)

## 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](https://agentrq.com/features/task-scheduling) is a template in a [workspace](https://agentrq.com/features/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](https://agentrq.com/blog/agent-cards-charts-buttons-forms-and-live-updating-status-in-agentrq-task-threads). 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](https://agentrq.com/features/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](https://agentrq.com/features/machines) and the [connect agents guidelines](https://agentrq.com/guidelines/connect-agents/).
- → An agent that connects to AgentRQ: Claude Code over [MCP](https://agentrq.com/features/mcp-integration), 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:

text

```text
You keep shop-web's dependencies current. Patch and minor upgrades go in one weekly pull
request. You never upgrade a major version on your own: you list them and a human picks.
Never push to main. Ask before git push and gh pr create.
```

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:

json

```json
{
  "permissions": {
    "allow": ["Bash(npm outdated:*)", "Bash(npm install:*)", "Bash(npm test:*)", "Bash(npm run build:*)", "Bash(git switch:*)", "Bash(git commit:*)"],
    "ask": ["Bash(git push:*)", "Bash(gh pr create:*)"]
  }
}
```

## 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.

![Step 2: the New Task form in deps, with “Weekly dependency upgrades” as the title, the instructions from git switch main to the majors card, AGENT picked and YOLO off, with arrows at each](https://agentrq.com/assets/tutorials/deps-upgrades-01-new-task.png)

The instructions are the whole playbook. This run used:

text

```text
Weekly dependency upgrades for shop-web.

1. git switch main && git pull, then make a branch: deps/weekly-<today's date>.
2. Run npm outdated --json. Sort each package into patch, minor or major by
   comparing Current with Latest.
3. Upgrade every patch and minor in one go. Never install a new major.
4. Run npm test and npm run build. If one fails, find the package that broke it,
   pin it back to the version on main, say so in the PR, and run both again.
5. Commit, push the branch and open ONE pull request with gh pr create, titled
   "deps: weekly upgrades <date>", with a table of every package (from -> to).
6. Reply with the pull request link and the test and build results.
7. For the majors, reply with a card: one row per package with current -> latest,
   its changelog link, a short summary of the breaking changes, and a button
   "Try <package> <major>". Do not upgrade any of them.
8. Complete this task. When I press a button, create a task in this workspace,
   "Upgrade <package> to <major>", with the migration steps, then complete again.
```

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.

![Step 3: the schedule popover over the New Task form, with Repeated picked, Weekly as the frequency, 09:00 AM as the time, and the cron line “0 7 * * 1” with “In 6 days”, with arrows at the calendar button and at each](https://agentrq.com/assets/tutorials/deps-upgrades-02-schedule-weekly.png)

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](https://agentrq.com/guidelines/tasks/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.

![Step 4: the Weekly dependency upgrades schedule open, with the badge “Runs weekly (Mon) at 09:00 AM”, “Next run: Dec 7, 09:00 AM”, four runs under Recent Instances from Nov 30 back to Nov 9, and the schedule under Scheduled with “In 6 days”, with arrows at each](https://agentrq.com/assets/tutorials/deps-upgrades-03-schedule-and-runs.png)

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 5: the run's reply, “Patch and minor upgrades are in, on deps/weekly-2026-11-30”, a table of 11 packages from @tanstack/react-query 5.59.0 to 5.90.11 down to nanoid 5.0.7 to 5.1.6, and “npm test: 214 passed, 0 failed” and “npm run build: ok”, with arrows at the branch, the table and the results](https://agentrq.com/assets/tutorials/deps-upgrades-04-run-tests.png)

## 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](https://agentrq.com/features/real-time-notifications).

![Step 6: an Authorization Required card for Bash with the command gh pr create --base main --head deps/weekly-2026-11-30 --title “deps: weekly upgrades 2026-11-30”, and the buttons Allow Once, Always Allow and Deny, with arrows at the command and at Allow Once](https://agentrq.com/assets/tutorials/deps-upgrades-05-pr-approval.png)

**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 6, continued: the reply “Pull request open: https://github.com/acme/shop-web/pull/318” with its title and test results, the Links bar showing shop-web#318, and the start of the card “3 major upgrades are waiting”, with arrows at each](https://agentrq.com/assets/tutorials/deps-upgrades-06-pr-opened.png)

## 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.

![Step 7: the A2UI card “3 major upgrades are waiting” with rows for react-router-dom 6.30.1 to 7.9.6, eslint 8.57.1 to 9.39.1 and tailwindcss 3.4.17 to 4.1.17, each with a summary of its breaking changes, an Upgrade guide link and a Try button, with arrows at the title, the eslint versions, its summary, its Upgrade guide link and its Try eslint 9 button](https://agentrq.com/assets/tutorials/deps-upgrades-07-majors-card.png)

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:

json

```json
{ "id": "eslinttry", "component": "Button", "variant": "primary", "child": "eslinttryl",
  "action": { "event": { "name": "try_eslint",
    "context": { "package": "eslint", "from": "8.57.1", "to": "9.39.1" },
    "userMessage": "Try eslint 9" } } },
{ "id": "eslintlog", "component": "Button", "variant": "borderless", "child": "eslintlogl",
  "action": { "functionCall": { "@call": "openUrl",
    "args": { "url": "https://eslint.org/docs/latest/use/migrate-to-9.0.0" } } } }
```

## 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.

![Step 8: the run after the click, with the reply “Try eslint 9” from You, the agent's answer “Made it a task: Upgrade eslint to 9, in deps, with the migration steps”, the new task under Not Started and the card's Try buttons disabled, with arrows at each](https://agentrq.com/assets/tutorials/deps-upgrades-08-picked-a-major.png)

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.

![Step 9: the deps workspace with Upgrade eslint to 9 under Not Started, and an arrow pointing at the Spin up in a fork button on its hovered row](https://agentrq.com/assets/tutorials/deps-upgrades-09-spin-up-button.png)

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 9, continued: the Spin up popover, “Forks deps as upgrade-eslint-to-9, moves this task into it and starts an agent there. On dev-laptop, your only machine that is online.”, with Claude Code picked and the model, effort and auto-compact settings, with arrows at the fork's name, the machine line and the Spin Up button](https://agentrq.com/assets/tutorials/deps-upgrades-10-spin-up.png)

## 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.

![Step 10: the upgrade-eslint-to-9 fork under deps in the sidebar, with Upgrade eslint to 9 ongoing, and the agent's reply “Working in this fork's own folder, ~/.agentrq/forks/0mqMI3XlunF, a git worktree of shop-web, on branch deps/eslint-9”, with arrows at the fork and the folder](https://agentrq.com/assets/tutorials/deps-upgrades-11-fork-working.png)

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 10, continued: the fork's task with the reply “Pull request open: https://github.com/acme/shop-web/pull/319, deps: eslint 9”, and Upgrade eslint to 9 under Recently Completed, with arrows at the pull request and the completed task](https://agentrq.com/assets/tutorials/deps-upgrades-12-fork-pr.png)

## 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.**

![Step 11: the Merge into deps dialog, “The fork's agent is stopped, 1 task moves back to deps, and the fork is removed. Its folder on the machine is deleted, and its git branch is kept: /home/dev/.agentrq/forks/0mqMI3XlunF”, with the Delete the fork's folder checkbox ticked, with arrows at the text, the checkbox and the Merge button](https://agentrq.com/assets/tutorials/deps-upgrades-13-merge-fork.png)

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](https://agentrq.com/features/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](https://agentrq.com/tutorials/ai-code-review-on-every-pull-request-label-it-and-an-agent-posts-the-review-in-minutes) 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](https://agentrq.com/tutorials/fix-a-red-main-build-with-an-ai-agent-github-ci-failure-to-pull-request) 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.
