atr: How I Finally Got My Coding Agents Working While I Sleep
I pay for Grok Build, Claude Code, Codex and Cursor. Good tools, all of them. But for a long time something bugged me about it.
Most of the time they just sat there.
They only worked when I was at the keyboard, driving them one prompt at a time. And when I did hand one a bigger job, it would sometimes hit its weekly limit halfway through. The task stopped, and the next morning I had to pick it up again by hand.
I'm paying for all of that, and most of it goes unused. That didn't feel right.
So I went looking for something simple. Not a cloud platform, not another dashboard to babysit. Just a runner that takes a task, picks an agent and gets on with it while I'm doing something else. I couldn't find one that fit, so my Grok Bot built it for me. It's called atr.
My Grok Bot also tested it itself, on my Mac mini and on my MacBook running Omarchy Linux, before I ever trusted it with real work.
What atr actually is
atr (short for agent-task-runner) is a small local task runner for coding agents. It's one Rust binary for macOS and Linux, and it's open source.
You give it a task, which is just a prompt plus a repo or folder if you want one. atr picks a coding agent and runs it unattended in its own git worktree. When it's done, it reports back the way you asked: a pull request, a comment, or a reply to whoever sent the task.
The nice part is that you can hand it work from wherever you already are. Label a GitHub issue for:atr. Type atr add "..." --dir . in a terminal. Let another agent pass work to it over its MCP connector. Hit its HTTP API, drop a file into its inbox folder, or put a task on a schedule.
What my day looks like now
Before atr, it was one agent, one terminal, and me watching it. If it hit a limit, the task got stuck. If I walked away, nothing happened.
Now I label an issue before bed. atr picks it up on a Mac mini that's on all the time (any always-on Linux server works too). If Claude or Grok gets close to its weekly limit, atr quietly moves to the next agent. In the morning there's a PR waiting for me to review over coffee.
That's really the whole point. My machines keep working, and I get my evenings back.
It respects your limits
This part mattered a lot to me. atr switches away from Claude or Grok at 90% of the weekly limit, so you're never left stranded at the end of the week. It never spends extra credits. When one agent runs out, it moves on to the next one on your list.
There are no API keys, no cloud and no per-token bills. atr drives the official CLIs you already pay for, and you sign in to each one yourself.
It caches hard, so your limits last longer
If I had to pick one thing I care about most, it's this. Fresh tokens eat your weekly limit, and cached tokens cost a fraction of that. So atr is built to hit the cache as often as it can.
It does all of this through the official CLIs, with no API calls. Claude Code's cache_control, server-side caching for Grok and Cursor, and a stable prefix for OpenCode and Ollama.
It puts the task text at the very end of the prompt, so everything before it stays byte-for-byte the same from run to run. You can check that with atr doctor --cache.
Each repo and agent reuses the same worktree path, reset between tasks. That way the folder and git details in the agent's system prompt never change, and they stay cacheable too.
It also tries to keep things warm. Retries and follow-ups stay on the same agent and session. Work that's still inside the cache window (about 5 minutes for Claude, 60 for the others) goes first, and queued tasks for the same agent get batched right after.
And I wanted the numbers to be honest. atr usage, atr status and the dashboard show the cache hit rate for every run: input, cache read and write, output and cost. First runs and resumed runs are shown separately, so nothing gets flattered.
Why Grok Build is my main agent
Grok Build is the recommended main agent in atr. It gets to use Grok's subagents, workflows (like --workflow deep-research) and scheduled tasks. Every other agent works fine too, but Grok Build is where atr does the most.
It just runs in the background
atr runs as a background service, all day and all night. When I want to see what it's up to, atr ui opens a local dashboard. atr doctor tells me if something needs fixing, atr upgrade updates it in place, and atr reset gives me a clean start.
Your Grok Bot can talk to it
This is the part I'm most excited about next. An "atr operator" template for Grok Bot is on the way. Your Grok Bot hands coding work to atr through the MCP connector, checks on it and tells you the result right in chat. You just talk to your bot, and your own machines do the work.
Plugins for Grok Build, Claude Code and Codex are coming too. They bundle the atr connector and skill, so any of those agents can hand work to atr in one step.
After that comes browser and desktop tasks. The routing for them is already merged, and the tools are next.
Try it
Sign in to whichever coding CLIs you already have, then:
curl -fsSL https://raw.githubusercontent.com/rimusz/agent-task-runner/main/install.sh | sh
atr init
atr add "fix the spelling mistakes in README.md" --dir .
If anything's missing, atr doctor will tell you.
My Grok Bot built atr because I wanted it for myself, and I suspect a lot of you will want it too. It's open source under MIT or Apache-2.0. Give it a spin, open an issue, or ping me on X.