{"slug": "how-i-use-my-bots-to-plan-and-a-dedicated-spare-macbook-to-write-the-code", "title": "How I use my bots to plan, and a dedicated spare MacBook to write the code", "summary": "A developer described a setup in which a Grok bot acts as orchestrator, writing plans in chat and dispatching coding work over SSH to a dedicated spare MacBook running agent CLIs such as Codex, Claude Code, GitHub Copilot CLI and Grok. The machine is isolated with Tailscale, a non-admin macOS user for agents, SSH restricted to the bots' key, and a fine-grained GitHub token that can push branches and open draft pull requests but not merge or push to main. A small shell launcher with plan and build modes handles runs, and the developer notes the spare MacBook was reachable from the bot side only by its full MagicDNS name.", "body_md": "*Originally published on [X](https://x.com/c_calabro/status/2123445020623602152).*\n\nThe main idea is to use Grok Bot as an orchestrator, with a coding agent CLI (Codex, Claude Code, GitHub Copilot CLI, or Grok) doing the engineering.\n\nI talk through an idea with one of my bots in chat. The bot has the context and the memory, and it writes the plan. When I say to send it to the Mac, the work goes to a dedicated spare MacBook, not to a cloud coding agent.\n\nI want my bots' credits spent on planning and orchestration, not on coding. Coding burns the most tokens, and I already pay for Codex, Grok, Claude, and Copilot CLI subscriptions, so the coding runs on those.\n\nI also wanted \"send it to implement\" to go to my own spare MacBook rather than to a cloud coding agent. On that machine, I have my CLIs, my subscriptions, and my choice of model and effort per task. It's the same environment I use myself, so a repo behaves for the agent the way it does for me.\n\nThe bot keeps the context: the conversation, the memory, and what I care about. That's why it's the right place to plan. The CLI is the right place to read code, edit, and run tests.\n\n[Tailscale](https://tailscale.com/) links the bot computer and the spare MacBook on a private network. Nothing is exposed to the internet.\n\nOn that MacBook, there is a dedicated non-admin macOS user just for agents. The agent CLIs run with permission prompts off, because a headless run needs that, so the blast radius has to be the account itself. That user can't sudo. It also can't reach my personal files, my browser sessions, or my keychain.\n\nRemote Login (SSH) is limited to that user, and only the bots' key is allowed in, so the bots can't log in as me.\n\nA Tailscale access rule (an ACL) lets the bot device reach exactly one thing: SSH on that spare MacBook. My main Mac is off-limits to the bots, for now. My own devices keep full access.\n\nThe agent CLIs are installed and logged in under the agents user, separate from my personal account and my personal sessions.\n\nGitHub access is a fine-grained token for that user, scoped to the repos I choose, with only contents and pull requests access. The agents can push branches and open draft pull requests. They are not allowed to merge, push to main, or delete branches. Pull requests stay draft for my review, at least for now.\n\nNo secrets go in tasks or in chat. Tokens are typed on the MacBook itself, never pasted to a bot. Runs only happen on the machine I named.\n\nOne gotcha: from the bot side, the spare MacBook was only reachable by its full MagicDNS name, the long name Tailscale uses on the private network, not the short name or the IP.\n\nThe launcher on the spare MacBook is a small shell script. I used SSH and a tiny script, not a platform, because it's easy to read and easy to audit.\n\nIt has two modes, plan and build. The bot calls it over SSH with the repo, the task or the plan, and an optional CLI, model, and effort.\n\nWhen a run starts, this is what the script does:\n\nThe model never gets `push` or `merge` as part of its job. The launcher does the one git step that leaves the machine, and only as a draft.\n\nIt also has a few small commands. Mostly the bots use these.\n\n`list` shows every run, with its status and a one-line summary of the repo, the mode, the CLI, the model, and the effort.`status` shows one run's state, and the pull request link if there is one.`log` shows the end of the CLI's transcript, which is what the bot reads to explain a failure. There's no live view in the chat. If I want to watch a run, I connect to the MacBook and follow the run's log there.`result` shows the plan a plan run wrote.`stop` kills a run I no longer want and marks it stopped. A stopped build pushes nothing.\nAny of my bots can do this. They share one computer, so one connection and one shared skill serve all of them.\n\nThe skill is a saved recipe in my shared library. It holds how to reach the spare MacBook, how to call the launcher in plan and build mode, how the CLI, the model, and the effort are chosen, the format of that header at the top of a plan, and how to watch a run and report back. It also holds the rules already described: never merge, never push to main, never delete branches, draft-only pull requests, no secrets in tasks or chat, and only that one MacBook.\n\nThe skill only applies when I name the MacBook, for example \"send it to the Mac to plan\" or \"send it to implement.\" Otherwise the bot works in chat as usual. A plan never turns into a build unless I say so.\n\nI stay in GrokBot the whole time. After a bot starts a run, it tells me the run started and stops there. I can keep doing other things while the plan or the implementation runs in the background on the spare MacBook.\n\nWhen the run ends, the launcher calls that bot's webhook with the run id and its status. That wakes the bot. It checks the run on the MacBook over SSH, because it only trusts the run id from the call, then messages me with the pull request link, the plan, or what stopped it.\n\nMy first version had the bot wait in a background loop that checked the run's status every 30 seconds. That didn't work. Once the bot's turn ended, nothing woke it when the loop finished, so a run could end without anyone telling me. The webhook fixed that.\n\nThe launcher writes that status, not the model. The statuses are:\n\n\"Blocked\" is not a separate status. When a build ends with no changes, the bot reads the end of the log to find out why, and tells me in plain words. I don't read the logs. That's a rule I made.\n\nHere's a full run, from the chat to the draft pull request:\n\n``` php\nGrok Bot: idea and plan\n  -> Approve or edit in chat\n  -> Send it to implement on the MacBook\n  -> CLI builds, tests, and commits\n  -> Draft pull request and a short summary\n  -> Review, then fixes as new commits on the same pull request\n```\n\nLet's say I'm chatting with a bot about a small docs change to one of my repos. The bot writes the plan, and I approve it. In the same message I pick the CLI, the model, and the effort: Codex, gpt-6-luna, medium.\n\nThen I say \"send it to implement.\" The launcher gives the run a fresh worktree and runs Codex with the approved plan. This repo has its own spec-driven workflow with a human approval gate, so the agent reads the repo's rules, writes the proposal and the spec, and stops at the gate. The bot brings me the exact text to approve. I approve it, and the agent records my approval, implements the work, runs the tests, validates the specs, and commits. The launcher pushes the branch and opens a draft pull request. The bot messages me the link, with a short summary.\n\nAt one point the repo's tooling needed one extra section that the approved spec didn't have. The agent stopped instead of changing the approved text. The message was: \"It stopped at your spec gate because the tooling needs one extra section that wasn't in the text you approved. Here's the exact addition; approve it and I'll continue.\" I approved it, and the build continued.\n\nA blocked message always says what stopped the run, why, and the one thing needed next, never a log dump. Another example, if the repo's workflow needs a tool that isn't installed on the MacBook: \"The build stopped without changing anything. Your repo's workflow requires a tool that isn't installed on the MacBook, and the agent followed the rule to stop and ask. Here's the one command to install it, and I'll rerun once it's in.\"\n\nI can name the CLI, the model, and the thinking effort in chat, for example: \"implement with Codex, gpt-6-luna, medium.\"\n\nOr the plan itself carries that choice in a small header at the top of the file, in this format:\n\n```\n---\ncli: codex\nmodel: <optional>\neffort: high\n---\n```\n\nThat way the planner can recommend the right tool for the build: a cheaper model for an easy one, or a stronger one for a hard one.\n\nWhat I say in chat wins. If I don't say it, the launcher reads that header. If neither is set, the default is Codex.\n\nA model in the header only counts if its CLI is the one running.\n\nEach repo's own agent rules load exactly as they would if I opened the session myself: `AGENTS.md`, `CLAUDE.md`, skills, and harness workflows. Chat or plan choices are passed as flags on top of that.\n\nIf a repo has a human approval gate, for example spec approval before code, the agent stops there. The bot brings me the exact text to approve. Only then does it build.\n\nThe setup orchestrates. It does not bypass the harness. The work is harness engineering plus orchestration, with me in the loop where it matters.\n\nI considered a session viewer, including tools like Orca and t3.code, and I don't need one yet. What matters right now is that the bots can run a plan and open pull requests. A viewer can wait until/if I need to watch a run live.\n\nI wrote this because I wanted my bots' credits spent on planning, and the coding done on my own CLIs and machine. Leave your questions in the comments too, and I'll answer them.\n\nI'm Cristian Calabro, a software engineer with 15+ years of experience. More about my work at [ccalabro.dev](https://www.ccalabro.dev) and [how I help teams as a remote engineering and AI advisor](https://www.ccalabro.dev/remote-engineering-ai-advisor).\n\nFollow me on [X](https://x.com/c_calabro) for more.", "url": "https://wpnews.pro/news/how-i-use-my-bots-to-plan-and-a-dedicated-spare-macbook-to-write-the-code", "canonical_source": "https://dev.to/ccalabro/how-i-use-my-bots-to-plan-and-a-dedicated-spare-macbook-to-write-the-code-51hk", "published_at": "2026-11-19 17:08:54+00:00", "updated_at": "2026-11-19 17:14:55.888032+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Grok", "Codex", "Claude Code", "GitHub Copilot", "Tailscale", "GitHub", "MacBook"], "also_reported_by": [], "takeaway": "Running agent CLIs headless under a dedicated non-admin macOS user, with SSH limited to the bots' key and a fine-grained GitHub token restricted to contents and pull requests, keeps autonomous coding runs to draft branches only.", "recommendation": {"advice": "Run headless coding agents under a dedicated non-admin account with SSH restricted to the bot's key and a repo-scoped token that can only push branches and open draft PRs.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/how-i-use-my-bots-to-plan-and-a-dedicated-spare-macbook-to-write-the-code", "markdown": "https://wpnews.pro/news/how-i-use-my-bots-to-plan-and-a-dedicated-spare-macbook-to-write-the-code.md", "text": "https://wpnews.pro/news/how-i-use-my-bots-to-plan-and-a-dedicated-spare-macbook-to-write-the-code.txt", "jsonld": "https://wpnews.pro/news/how-i-use-my-bots-to-plan-and-a-dedicated-spare-macbook-to-write-the-code.jsonld"}}