Harness Engineering: How I Move My Agent Setup to Another Computer

A pattern for moving the harness around your AI agents to a new computer: inventory, bundles, safe installers and a to-do list.

Two computers on desks joined by a rail track; a cart loaded with boxes, cylinders and file icons rolls toward a switch that turns the track up to the second computer

Between 27 and 29 November, my computer went to sleep and stayed asleep. For about 38 hours, none of my scheduled agents ran. No error, no alert. The schedules were fine. The prompts were fine. The machine just wasn't awake to run them.

The fix took two settings. The more useful part was what I did with the fix afterwards, because it changed how I think about the whole setup around my agents. I call that setup the harness, and this article is about making it portable.

In short

  • The harness is everything around the model: rules, skills, hooks, MCP config, scheduled tasks, memory, scripts and OS settings.
  • Each part is code and rules, data, or secrets and logins, and each group moves differently.
  • Code and rules move with bundle scripts and idempotent installers, and install never overwrites data.
  • A per-machine to-do list in the repo, with a verify command on every line, keeps the steps that can't be scripted.

What I mean by a harness

An agent is a model plus everything around it. The model is the part I rent from Anthropic or OpenAI. Everything else is the part I built, and that's the harness.

On my machines the harness includes:

  • rule files like CLAUDE.md and AGENTS.md
  • skills, hooks, MCP server config and plugins
  • scheduled tasks and the prompts they run
  • memory files and permission settings
  • helper scripts, OS scheduler jobs, and even the power plan

Swap the model for a newer one and the agent still behaves like mine. Lose the harness and I have a smart stranger who doesn't know my rules, my tools or my schedule.

Why it gets stuck on one machine

The harness doesn't live in one place. Rule files and skills sit in dot folders under the home directory. Scheduled tasks live in an app's settings, sometimes per account. OS scheduler jobs live in Task Scheduler or launchd. The power plan lives in system settings. And a few things live only in my head: "on this machine I also had to turn that on".

Each piece got there by hand, on a different day. A copy of the home folder doesn't fix this. It carries stale data, misses the OS-level parts, and copies things that should never move.

The pattern

I now treat the harness like an application I deploy. These are the steps I follow.

1. Inventory it

I write down every part of the harness and where it lives on each OS. This list is boring and it's the most important step. Anything not on the list will be missing on the next machine.

2. Split it into three kinds

Every item goes into one of three groups, and each group moves differently.

  • Code and rules: rule files, skills, prompts, scripts, task definitions. They move through git.
  • Data: memory, logs, archives, local databases. It is synced separately and never overwritten by an install.
  • Secrets and logins: login tokens, OAuth consents, API keys. They stay out of git, and the human re-creates them.

A login token copied to a new computer is a security problem, and it often doesn't work anyway. Each computer signs in once. That's a human step, and I write it down as one.

3. Bundle with two verbs

For code and rules, I use bundle scripts with two verbs: export and install.

bash
node scripts/bundle.mjs export    # this machine -> repo
node scripts/bundle.mjs install   # repo -> this machine

The rule for install is strict. It adds missing files. If a code file differs, only an explicit flag replaces it. A log or a database on the target machine is never touched. That rule is why I can run install without thinking twice.

4. Make the OS parts idempotent installers

Scheduler jobs and power settings can't be copied as files. They need a script that sets them, and that script has to be safe to run again. Running it twice should give the same result as running it once. On Windows, Register-ScheduledTask -Force replaces the task instead of adding a second one. On macOS, pmset just sets the value again.

5. Keep a per-machine to-do list in the repo

Some steps can't be scripted from the other machine, and some need a person. For those I keep one Markdown file in the repo with one line per step. Each line names the OS, the owner and an id:

markdown
- [ ] windows agent backup-job: run scripts/install-backup-job.ps1, then verify with
      (Get-ScheduledTask -TaskName 'Nightly backup').Settings.WakeToRun
- [ ] mac human mac-login: sign in to the CLI once in Terminal
- [x] any agent rules-check: run bundle.mjs status (done 2026-11-29 10:40 laptop-2)

The owner is either an agent or a human. The first agent run on a new computer reads this file before its own work, does its lines, and ticks each one with the date and the machine. If a step fails, the line stays open with the error next to it. Human lines stay open until the human does them, and every run repeats them at the top of its summary so they aren't forgotten.

The file is also the memory of small fixes that used to live in my head.

6. Verify with a command

"I think I set that" isn't a state. Every to-do line ends with a command that proves the step, and the agent runs it before ticking the line. If there's no command that can prove it, I write that down too.

7. Say what can't move

Some things don't transfer, and I'd rather list them than pretend. Logins and OAuth consents have to be redone on each computer. Model state doesn't move at all: a new session starts with whatever the harness gives it and nothing more. A conversation can be summarized and handed over with its files, but that's a summary plus evidence, not the same session.

The 38 hours, and the fix

Back to the sleeping computer. A task in the OS scheduler nudges my agents every few minutes. That task had two problems.

First, the task wasn't allowed to wake the computer. Second, the active power plan had wake timers switched off, so even a task that asks to wake the machine is ignored. Either one alone is enough to stop everything while the machine sleeps.

The fix is two settings. Here's the idea, with an invented task name:

powershell
$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -WakeToRun `
  -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
Register-ScheduledTask -TaskName 'Agent pulse' -Action $action -Trigger $trigger `
  -Settings $settings -Force

powercfg /setacvalueindex SCHEME_CURRENT SUB_SLEEP RTCWAKE 1
powercfg /setdcvalueindex SCHEME_CURRENT SUB_SLEEP RTCWAKE 1
powercfg /setactive SCHEME_CURRENT

RTCWAKE is "Allow wake timers". The AC and DC lines set it on the charger and on battery.

The lesson wasn't the settings. It was that a fix I apply by hand on one machine is lost on the next one. So on the same day, the settings went into the installer script that registers the task, and a line went into the machine to-do list for every other Windows computer, with the verify command:

powershell
(Get-ScheduledTask -TaskName 'Agent pulse').Settings.WakeToRun
powercfg /q SCHEME_CURRENT SUB_SLEEP RTCWAKE

I want to be precise about what I know. On the machine where I made the fix, both checks show the settings are applied. I haven't yet seen the agents wake the computer from a real sleep. That test is still to come, and the to-do line stays open until the other machines have run the installer too.

The Mac is different

macOS has no per-task wake setting, and launchd can't wake a sleeping Mac. So the Mac twin of the installer doesn't set a wake timer per run. It changes the power plan with pmset: no system sleep on the charger, Power Nap on battery, and one scheduled daily wake.

sh
sudo pmset -c sleep 0 powernap 1
sudo pmset -b powernap 1

pmset needs the administrator password, and an agent never types a password. So this is a human-owned line in the to-do list. The script exists, but I wrote it on Windows and it hasn't run on a Mac yet. When it does, its own output is the check: the printed power plan and pmset -g sched.

What Switchyard carries today

Switchyard is my open-source local app for AI coding sessions. Its Harness Transfer part covers some of this pattern today, not all of it.

What it carries now:

  • Skills. One command copies the newest copy of every skill to the local skills folder, every Claude account's skill cache on the machine, and a bundle folder. Put that folder in a synced folder or your own git repo to reach another computer.
  • Claude scheduled tasks. It exports task definitions and prompts to a manifest with portable paths, and applies them to other accounts. The same manifest works on another machine.
  • Codex schedules. It copies Claude tasks to Codex automations.
  • macOS session data. An exporter copies the Mac's session folders into a synced folder, and the other machine reads that copy read-only.
  • Windows autostart. An installer registers Switchyard itself as a per-user scheduled task with a watchdog.
  • Conversations. A handoff package moves a chat to another account or tool: a brief, a redacted transcript and the native session file, each with a SHA-256 hash, plus locks, an account check and proof of delivery. Moving a chat between Windows and macOS isn't implemented yet.

What it doesn't carry yet: memory files, hooks, MCP config and plugins.

The fuller pipeline in this article, with bundles, the machine to-do list and the OS installers, runs in my private setup. It's the direction I'm taking Switchyard, one piece at a time.

A checklist you can copy

  • List every harness part and where it lives on each OS.
  • Mark each one as code and rules, data, or secrets and logins.
  • Put code and rules in git. Sync data separately.
  • Keep secrets and logins out of git. Write the sign-in steps down for the human.
  • Write bundle scripts with export and install. install adds missing files and never overwrites data.
  • Turn every OS-level setting into an installer that is safe to re-run.
  • Keep a machine to-do file with an owner per line. Let the first agent run do its lines and tick them with date and machine.
  • End every line with a verify command.
  • When you fix something by hand, put it in an installer or a to-do line the same day.
  • Write down what can't move.

Questions people ask

What is an agent harness?

An agent is a model plus everything around it, and the harness is everything around it. That means rule files, skills, hooks, MCP config, plugins, scheduled tasks, memory, permission settings, helper scripts and OS-level settings like scheduler jobs and the power plan.

Why not just copy the home folder to the new computer?

A copy of the home folder carries stale data, misses the OS-level parts, and copies things that should never move, like login tokens. The harness lives in many places, so it needs an inventory and a different path for each kind of item.

Why did my scheduled agents stop running while the computer slept?

In my case the scheduler task wasn't allowed to wake the computer, and the power plan had wake timers switched off. Either one alone stops everything while the machine sleeps. On Windows the fix is the task's WakeToRun setting plus "Allow wake timers" in the power plan.

Can login tokens and OAuth consents move to another computer?

No. A copied login token is a security problem and often doesn't work anyway. Each computer signs in once, and that step goes into the to-do list as a human-owned line.

More about Switchyard is at /lab/switchyard/.

Switchyard is on GitHub: github.com/huseyinkaplandev/switchyard

Have a problem worth solving?Let's make it reliable

Start a conversation

Open to full-stack and applied AI roles, remote or hybrid.

Tell me about the role, the team and the problem.