Long Refactor on Your Dev Box, Approved by Phone
A big migration is mostly waiting. Moving 186 files from one payments client to another is hours of agent time: read a file, change the calls, build, test, commit, next file. The work itself is fine to hand over. What keeps you at the desk is the permission prompt that appears at minute 40, then again at minute 95, and the agent sitting idle in between because nobody pressed Enter.
This tutorial moves the job to a machine that can run all afternoon and moves the prompts to your phone. The agent runs on a dev box, a home server or a cloud VM, enrolled with agentrqd. The plan is a Pano doc with one checklist item per batch, and each item is a task for the agent. Build and test commands run without asking. The commands that change something outside the dev box, like git push and opening the pull request, wait for you as a card you answer from your phone. A progress card shows where each batch stands, a reply steers the agent mid-batch, and the trajectory shows everything it asked to run while you were away.
The screenshots come from the AgentRQ app on November 30, 2026: two machines enrolled with agentrqd, a Pano plan with six batches, and every approval, card and checklist tick made through the app's own API, with the agent's side played by a script that speaks the same MCP protocol as Claude Code.
What You Build
| Piece | Setting | What it does |
|---|---|---|
| devbox machine | agentrqd, enrolled with --name devbox | The computer the agent runs on, all afternoon, with your laptop closed |
| shop workspace | Working directory: the clone on devbox. YOLO mode off | The agent that does the migration, one batch at a time |
| Pano plan | A checklist of six batches, each assigned to shop | The plan, the rules for every batch, and the progress, in one doc |
| Two allow rules | go and gofmt, saved with Always Allow | Builds, tests and formatting run without a prompt |
| Push on your phone | Notifications, Enable Push, in a phone browser | Every question the agent asks reaches your pocket |
| Message send delay | 10 seconds | A reply sent from a phone can be cancelled before the agent reads it |
Four ideas make it work:
- → The agent runs where the work is. Machines are computers running agentrqd, the AgentRQ daemon. Enrol a dev box once, then start the agent for any workspace on it from the web app, from anywhere.
- → The plan is a doc, and the doc tracks itself. In Pano, a checklist item can be assigned to a workspace: it becomes a task for that workspace's agent, and the box ticks itself when the task completes.
- → Only the risky commands ask. Rules let the safe commands through. Every other command waits for you as an Authorization Required card, and real-time notifications bring it to your phone.
- → You can see and steer it from anywhere. The agent keeps one progress card up to date, a reply in the task reaches it mid-batch, and the trajectory lists every command it asked to run.
Before You Start
- → An AgentRQ account, and a computer that can run for hours: a home server, a cloud VM or a GPU box. Linux, macOS and Windows all work.
- → A clone of the repository on that computer for the agent alone, /home/dev/code/shop here, on its own branch. Your editor never shares it.
- → Claude Code on that computer, signed in. Codex, Gemini CLI and others work too, through the ACP Gateway: see the connect agents guidelines.
- → git and the GitHub CLI on that computer, signed in with push access to the branch, so the agent can push and open the pull request.
- → A phone with a browser. On an iPhone, web push needs AgentRQ on the Home Screen: Share, then Add to Home Screen.
Step 1: Enrol the Dev Box
Open AgentRQ in any browser and go to Machines. The commands it gives you run in a terminal on the dev box. 1. Click Add machine. 2. Read the warning first: enrolling lets anyone who can sign in to your AgentRQ account run commands on that machine, as the user who starts the daemon. Start agentrqd as a user that can reach the clone and nothing you would not hand to the agent. 3. Install agentrqd with the command for your platform. 4. Enrol it with the second command, and add --name devbox so the machine has a name you will recognize on a small screen. The code is single-use and expires shortly. 5. devbox is online, with its CPU and memory.
agentrqd enroll starts the daemon in the background by itself. Do not start a second one with agentrqd serve: two daemons with one token keep connecting and disconnecting each other. To keep it running after a reboot, see the daemon guide.
Step 2: Make the Workspace and Start Its Agent on the Dev Box
Create a workspace named shop. Its mission says what the job is and what the agent must never do:
In its settings, set the Working Directory to the clone on the dev box, /home/dev/code/shop, and leave YOLO mode off. Then open the workspace and click Start Claude Code. With more than one machine online, the button opens the form. 1. The clone on the dev box is where the agent runs. 2. Pick devbox, not the laptop you are on. 3. Claude Code, or the ACP Gateway for another agent. 4. A model and effort for a long job. 5. Start it.
agentrqd starts Claude Code on devbox, in that folder, connected to the shop workspace. You can close the laptop now: the agent and its terminal live on the dev box, and the tasks, cards and prompts are in the web app wherever you open it.
Step 3: Write the Plan in Pano and Assign Each Batch
Open Pano and write the plan as a doc: what the migration is, the rules for every batch, and the batches as a checklist. Size the batches so each one builds and tests on its own, here by package:
Hover a checklist item and open its menu. 4. Click ⋮, then Assign to: shop. The item becomes a task in shop, and its text is the task's title. 3. The item shows the task's status, Not started for now. 2. Every assigned item is listed under Related tasks. 1. The counter counts the ticked items.
Each task's description ends with a line that names the doc and asks the agent to read it with the pano tool. So the rules travel with every batch without being copied into six tasks, and when you change a rule in the doc, the next batch reads the new one. The clipboard icon at the top of the doc, Make it a task, does something else: it makes the whole doc one task.
Step 4: Turn On Push on Your Phone
Open AgentRQ in your phone's browser, sign in, and open the shop workspace's Settings, then Notifications. 1. Tap Enable Push and allow notifications. Push is set per workspace and per browser, so do it on the phone, for shop. 2. Email Delivery is the other channel, and 3. its event triggers decide what is emailed: turn on New Message to get the agent's questions by email too.
A push goes out for every reply the agent sends, and a permission request is one: it arrives as "Reply on:" and the task's title, and tapping it opens the task. On an iPhone, the button appears only once AgentRQ is on the Home Screen and opened from there. The desktop app raises its own notifications instead.
Step 5: Let the Safe Commands Through
The agent picks up batch 1 and starts asking. The first go build ./... arrives as an Authorization Required card. Click Always Allow on it, and on the first gofmt. Always Allow saves a rule on the command's first word, so from now on the agent runs any go or gofmt command in this workspace without asking.
Open Settings, then Automations, to see them. 1. Every go command: go build, go test, go vet and go mod tidy. 2. Every gofmt command. 3. The trash icon deletes a rule, and the agent asks again. 4. YOLO mode stays off, so everything else still asks. 5. Clear context before each task is on for new workspaces: before each batch, AgentRQ sends /clear to the agent's terminal, so batch 4 does not carry batch 1 in its context.
Do not click Always Allow on git commit. The rule it saves is for git, and git covers git push too, which is the one command you want to see. Allow the narrow git commands in Claude Code's own settings instead, in the clone's .claude/settings.json:
Claude Code runs those without asking anyone, and git push, git rm and gh pr create still reach AgentRQ and your phone.
Step 6: Approve the Push from Your Phone
Batch 1's 34 files build and pass their tests, the agent commits, and asks to push. The task turns yellow, Needs input, and your phone buzzes. Tap the notification. 1. Waiting on you: the timeline counts the seconds. 2. Why it asks, in the agent's words. 3. The exact command, git push origin migrate/pay-v2, with nothing hidden. 4. Allow Once runs it, this one time. 5. Deny means the command does not run. The agent is told so, and you can reply with what to do instead.
Use Allow Once for pushes. Always Allow here would save the git rule from Step 5's warning. Answering takes one tap from wherever you are, and the agent carries on the moment you tap.
Step 7: Follow It on the Progress Card
The agent keeps one card per batch, the way the mission asks, and updates it in place rather than posting a new message for each step. 1. The Pano plan is linked from the task. 2. The bar moves as files are done. 3. Each package: done, running or queued, with what happened. 4. The test results so far. 5. The commands it ran, here two that a rule allowed.
An updated card does not notify you, so a long batch does not buzz your phone every minute. The questions do. The reply under the card carries the same numbers in plain text, which is what a push notification or an email shows. More on cards: agent cards.
Step 8: Steer It Mid-Batch
Halfway through batch 2, you remember that finance re-prints old invoices, and those totals must not change. Reply in the task, from your phone or anywhere. With message send delay at 10 seconds, set in Settings, General, your reply waits before it goes. 1. The countdown. 2. Your words, still editable. 3. Cancel, or send now. A message typed on a phone in a hurry is one you might want back.
The reply reaches the agent while it works on the task. In this run it answered that it would keep v1's rounding for invoices issued before 2026-01-01, with a test for it, and that it would redo the two invoice files it had already moved. Its card gained a line for it, and batch 2 finished with 151 tests passing.
Step 9: See What It Ran While You Were Away
Open the task's Trajectory tab. It lists what happened on the task in order: your input, the agent's replies, and every command it asked to run. 1. 7 s waiting on you: the timeline shows each wait for an answer. 2. Tools filters to the commands. 3. Your reply, in its place among them. 4. The push. 5. Its status: Allowed, by you. The go build and go test rows say Auto-allowed, by a rule.
The trajectory, the tool call history, shows what went through AgentRQ: commands allowed by your rules, by you, or denied. A command Claude Code's own settings allow, like the git commit from Step 5, never asks, so it is not there. git log shows those.
Step 10: Watch the Plan Fill In
The Pano doc is the overview. Open it on any screen. 1. 3 of 6, counted for you. 2. Ticked by itself: when a task completes, its item ticks, and nobody edits the doc. 3. Running now. 4. Done before 3 and 4: batch 5 finished before batches 3 and 4 started. 5. The same tasks, live, under Related tasks.
The agent works on one task at a time, and the oldest waiting one is offered first. But a task the agent does not take at once is passed over, and the next one is offered a minute later. Here, batch 5 went before batches 3 and 4. Make every batch stand alone, as these do, and keep the one that needs all the others last: see Traps.
Step 11: The Last Batch Opens the Pull Request
Batch 6 deletes the old client, tidies go.mod, runs every test and opens the pull request. 1. Three asks: git rm, git push and gh pr create, each a Needs input on the timeline, each a tap on the phone. 2. Every step, done. 3. The pull request, with one commit per batch. 4. Its link, in the agent's last reply.
Step 12: Six Ticks and a Pull Request
1. 6 of 6 done. 2. Every box ticked itself, each when its task completed. 3. All six tasks completed. What is left is the review of acme/shop#312, which is yours.
Traps to Avoid
- → Always Allow on git allows git push. A rule is saved for the command's first word, so one Always Allow on git commit lets every git command run without asking. Allow the narrow ones in Claude Code's settings and keep git push asking.
- → Workspace YOLO is not per fork. A fork takes its settings from its parent, and turning YOLO on in the parent turns it on in every fork, which cannot change it. To skip prompts for one piece of work only, use the YOLO button on that task, not the workspace setting.
- → Batches are not guaranteed to run in order. The queue offers the oldest first but moves on when one is not taken. Make each batch independent, and assign the last one, which needs all the others, only after they are ticked.
- → Unticking a completed item by hand sticks. AgentRQ takes it as your call and does not tick it again. Use the item menu's Tick by hand when you want to set the box yourself.
- → Push on an iPhone needs the Home Screen. Safari has no web push for a site in a tab. Share, Add to Home Screen, then open AgentRQ from the icon and tap Enable Push there.
- → Push is per browser and per workspace. Enabling it on your laptop does nothing for your phone, and enabling it for shop does nothing for another workspace.
- → A second agentrqd serve fights the first. agentrqd enroll already starts the daemon. Two with the same token keep kicking each other off.
- → A command your Claude Code settings allow is not in the trajectory. Only what asks AgentRQ is recorded. Keep the commands you want a record of out of the local allow list.
- → The agent's clone is not yours. Point the workspace at a clone that nobody edits, so a batch never switches a branch under someone's editor.
Make It Yours
- → Run it in a fork, with YOLO on the task. Fork shop, move the batch tasks into the fork, and start its agent: agentrqd makes a git worktree of its own for the fork. Turn on the YOLO button on one task only, for a purely mechanical batch, and keep the push behind a token that cannot touch main.
- → Ask before each batch. Add a rule to the doc: "Before you start a batch, reply with the files you will change and wait for my OK." The question reaches your phone like a permission prompt.
- → Batches by owner. Assign batches to different workspaces, one per team's repository, from the same doc. Each item follows its own task.
- → Bigger boxes, more agents. A machine runs several agents at once. Give each independent package group its own workspace on the same dev box and assign batches to all of them.
- → Night runs. With task scheduling, start a batch after hours and read its progress card with your coffee.
FAQ
Do I need to keep my laptop open? No. The agent runs on the dev box. The web app, on any computer or phone, only shows the tasks and sends your answers.
What happens if I don't answer a prompt? The agent waits, and the task stays at Needs input. Nothing runs until you answer. The next batch is not offered while this one is ongoing.
What if the dev box restarts? The agent stops with it. Start it again from the workspace once agentrqd is back. The batch it was on is still ongoing in AgentRQ, so tell the agent in the task to pick it up again.
Can someone else approve when I'm away? Yes, a teammate who can open the workspace can answer its prompts. See teams.
Does the agent see the whole plan? Each batch's task names the Pano doc and asks the agent to read it, so it reads the rules and the other batches' state before it starts.
How do I know it is still alive after hours on one batch? Every hour that a task stays ongoing, AgentRQ asks the agent for a status update in the task, and the progress card shows the last thing it did.
Which agents can do this? Any that agentrqd can start: Claude Code, or Codex, Gemini CLI and others through the ACP Gateway.