Agentic Coding Guide
A coding agent is an AI model that can read your repository, run commands, edit files and check its own work. This guide is the setup we recommend if you are starting out: where to run agents, which operating system to use, which plans to buy, how to work with them each day and the rules that keep them safe.
You don’t need cedr for any of it. Where one of our tools helps, we say so.
The short version:
- Run your agents from T3 Code.
- Use Linux, and CachyOS if you are free to choose.
- For real work, buy the $100 plans from Anthropic and OpenAI, and add a third provider if you can. The $20 plans are for learning and testing.
- Give each job its own thread, say what done means and read the diff.
- Write down your global rules and each repo’s
AGENTS.md, then enforce what matters with hooks. - Commit often and review through GitHub.
Two words come up throughout. A provider is the company whose models and plan you pay for. A harness is the program that runs a model and gives it tools, and Harnesses explains how they differ.
Run Your Agents in T3 Code
Section titled “Run Your Agents in T3 Code”We highly recommend T3 Code as the place you work. It is free and open source, and it runs the agents you already have signed in on your own machine, on your own subscriptions. It doesn’t resell tokens or add limits of its own.

Jobs across several repositories, each in its own thread and branch, with the phone app asking to approve a command.
- One window for every agent. Claude, Codex, Gemini, Muse, Cursor, Grok and opencode threads sit side by side, and you can switch models partway through a thread.
- Parallel work without collisions. A thread can run in its own Git worktree and branch, so three agents can work on one repository at once.
- Review where you work. Read the diff, commit and open a pull request from the same window.
- Agents that can start agents. Your agent can hand a job to another agent, and each one gets a thread you can watch. Council uses this to run its reviews.
- Reach it from anywhere. The iOS and Android apps connect to your machine, so you can check on a long job away from your desk.
Install it, then start it:
curl -fsSL https://t3.codes/install.sh | sht3On Windows, run irm https://t3.codes/install.ps1 | iex in PowerShell. t3 service install keeps it running in the background, and t3 up makes it available to your other devices. There is also a desktop app.
T3 Code drives the harnesses on your machine, so install and sign in to at least one first. Harnesses lists the commands.
Use Linux
Section titled “Use Linux”We highly recommend Linux for agent work:
- Agents work through the shell. Their tools, examples and defaults assume a Unix shell, so you get fewer path and quoting surprises.
- It matches where your code runs. Most servers, containers and CI runners are Linux, so a command that works on your machine usually works there too.
- Sandboxes are built in. Agent sandboxes rely on features of the Linux kernel, with no virtual machine in between.
- It stays light. Each thread runs an agent, test runners and perhaps a dev server, and memory is what runs out first. A desktop that uses less of it leaves more for them.
- A small box can do the work. A mini PC can run your agents around the clock while your laptop sleeps, and T3 Code connects to it from any device.
Why CachyOS
Section titled “Why CachyOS”If you are free to choose a distribution, we highly recommend CachyOS.

CachyOS with its stock KDE Plasma setup.
- Current tools. It is based on Arch Linux and updates continuously, so compilers, runtimes and CLIs are new soon after they ship.
- Tuned for speed. Packages are built for modern CPUs with link-time and profile-guided optimization, and it ships its own tuned kernel. Builds and test runs benefit directly.
- Easy to install. It has a graphical installer and a choice of desktops, including KDE Plasma, GNOME, COSMIC and Hyprland.
Download CachyOS, then install the tools this guide uses:
sudo pacman -S --needed git github-cli base-develAlready on a Mac? Everything here works on macOS too. On Windows, keep your repositories inside WSL so your agents get a real Linux shell.
Choose Your First Agents and Plans
Section titled “Choose Your First Agents and Plans”For real work, we recommend Claude and Codex on their $100 plans, for $200 a month. The least we would recommend is Claude at $100 and Codex at $20. With more than one provider, one can take over when another hits a limit, and each can review the other’s work. Different vendors miss different things.
Buy plans rather than API keys for everyday work. A flat monthly price is usually far cheaper than paying per token for the same use, and Monitor shows what your usage would have cost at API prices so you can judge for yourself. Keep API keys for CI and automation.
Ideally, add a third provider for more room and another opinion. Gemini and Muse are both good choices.
| Provider | Plan | Per month | Approximate usage |
|---|---|---|---|
| Claude | Pro | $20 | The base limit, every 5 hours and every week. Independent estimates put it near 45 prompts every 5 hours. |
| Max | $100 | 5x Pro, every 5 hours and every week. | |
| Ultra | $200 | 10x Pro each week, with no 5-hour limit on verified accounts. | |
| Codex (ChatGPT) | Plus | $20 | Messages every 5 hours: 5-45 on Astra, 15-160 on Sol, 35-285 on Terra, 350-3,000 on Luna. Weekly limits may also apply. |
| Pro | $100, $200 or $500 | No 5-hour limit, and more weekly usage at each price. | |
| Gemini (Google AI) | Pro | $20 | An entry-level allowance. |
| Ultra | $100 or $200 | 5x or 20x Pro. | |
| Muse | Everyday | $5 | 10-50 prompts every 5 hours. |
| High, Power, Maximum | $15, $50, $200 | 5x, 20x and 80x Everyday. | |
| Grok | Plus, Premium, Super, Ultra | $8, $30, $100, $200 | One weekly pool shared with Grok’s other products. Premium, Super and Ultra get 4x, 15x and 50x Plus. |
US dollars before tax, checked 2026-11-03. Vendors change prices and limits often, so check their pages before you buy. Anthropic publishes multiples rather than counts, and OpenAI and Meta give their numbers as ranges because the real figure depends on the work. Grok is sold through The X Subscription, and its prices and multiples come from independent reporting.
ChatGPT’s Free and Go ($8) plans also include Codex for quick tasks, which is a cheap way to try it. Cursor and GitHub Copilot sell their own plans, and opencode works with the provider you choose. If you already pay for one, keep using it.
How Much Do You Need?
Section titled “How Much Do You Need?”These are our recommendations, not vendor figures.
| How you work | What to buy | Per month |
|---|---|---|
| Learning or testing | One $20 plan | $20 |
| Real work, at the least | Claude Max ($100) and ChatGPT Plus ($20) | $120 |
| Real work, recommended | Claude Max ($100) and ChatGPT Pro ($100) | $200 |
| Real work, ideally | Both $100 plans and a third provider | $200 plus the third plan |
| All day with many threads, or long unattended runs | The $200 plans from both | $400 |
What Uses Your Limits
Section titled “What Uses Your Limits”Most plans have two limits at once: a rolling 5-hour window and a weekly allowance. When you reach one, you can wait, switch to your other agent, or on some plans buy extra credits.
These use your allowance fastest:
- The top models at high effort. Use them for hard problems, and use the small models (Haiku, Luna) for reading and simple edits.
- Long threads. The whole conversation goes back to the model on each turn, so start a new thread for each job.
- MCP servers. Each one adds to every message, so connect only the ones you use.
- Fast modes and parallel agents. Codex charges 2.5x or 8x for its fast modes on Astra and Sol, and every extra agent draws on the same plan.
Monitor shows every plan’s usage and limits in one place, and Route sends each job to the plan with the most room left.
Basic Coding Workflows
Section titled “Basic Coding Workflows”The Everyday Loop
Section titled “The Everyday Loop”- Have it read first. Point the agent at the code that matters and let it look before it edits.
- Ask for a plan when the change is bigger than a few lines, and correct the plan rather than the code.
- Say what done means. Name the behaviour you want, the checks that must pass and anything it should leave alone.
- Let it run the checks. An agent that can run tests can find and fix its own mistakes.
- Read the diff. You own what ships, so read it as you would a colleague’s change.
- Commit the finished step, then start the next one.
A good first message covers most of that:
Add rate limiting to POST /login. Read the auth middleware firstand tell me your plan before you edit anything.
Done means: six failed attempts in a minute returns 429, a new testcovers it, and npm test passes. Leave the session code alone.Stop and ask if this needs a new dependency.Fix a Bug
Section titled “Fix a Bug”Ask for a failing test before the fix. The test proves the agent understood the bug, and it stops the bug coming back.
Customers see a total of 0.30000000000000004 on some invoices.Write a test that reproduces it and show me it failing, then fixthe cause and run the full test suite.Work in Parallel
Section titled “Work in Parallel”Give each job its own thread and its own worktree, because two agents editing one checkout will overwrite each other. Start with two or three threads: your attention to review their work runs out before your plan does.
Get a Second Opinion
Section titled “Get a Second Opinion”Before you merge anything risky, have an agent from a different vendor review the change in a new thread, without the first agent’s reasoning to lean on. Council runs several reviewers on their own and merges their reports into a single pass, block or incomplete.
Keep Threads Short
Section titled “Keep Threads Short”Start a new thread for each job. Long threads cost more and lose track of early decisions. When a thread has gone wrong, ask for a summary of what it learned and start again from that, rather than arguing with it. If you correct the same mistake twice, add a rule to AGENTS.md.
Governance and Global Rules
Section titled “Governance and Global Rules”An agent has your access: your files, your shell and your Git credentials. Decide what it may do before it runs, in three layers:
- Rules tell it what you want. It reads them each session and usually follows them.
- Hooks check each action and can refuse it, whatever the agent decided.
- Permissions and sandboxes limit what it is able to reach at all.
Write Your Global Rules
Section titled “Write Your Global Rules”Global rules apply to every repository on your machine, so this is where your standards live. Each harness looks for its file in its own place:
| Agent | Global rules file |
|---|---|
| Claude | ~/.claude/CLAUDE.md |
| Codex | ~/.codex/AGENTS.md |
| Gemini | ~/.gemini/GEMINI.md |
| Muse | ~/.config/muse/AGENTS.md |
| Grok | ~/.grok/AGENTS.md |
Write one file and link it into each place, so every agent follows the same rules:
mkdir -p ~/.agents ~/.claude ~/.codexln -s ~/.agents/AGENTS.md ~/.claude/CLAUDE.mdln -s ~/.agents/AGENTS.md ~/.codex/AGENTS.mdKeep it short and specific. This is a good start:
# Global Rules
## Git- Read your full diff before committing, and stage files by name.- Never force-push or skip hooks with --no-verify.
## Safety- Never print .env files, tokens or credentials.- Don't deploy, publish or delete anything unless I asked in this conversation.- Work inside the repository. Tell me before changing anything outside it.
## Code- Match the file you are editing. Don't reformat code you didn't change.- A bug fix comes with a test that fails without the fix.- No new dependency without saying why.
## Finishing- Run the formatter, linter, type checker and tests before you say you are done.- Report failures and anything you skipped. Never hide them.Enforce What Matters With Hooks
Section titled “Enforce What Matters With Hooks”Rules are read, not enforced. A hook is your own code that runs before an action and can refuse it, so use one for anything that must never happen. For Claude, add this to ~/.claude/settings.json:
{ "hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [{ "type": "command", "command": "~/.agents/hooks/gate.py" }] } ] }}Then write the check. The agent sees your message and has to find another way:
#!/usr/bin/env python3# Refuses a shell command by exiting with status 2.import jsonimport reimport sys
command = json.load(sys.stdin).get("tool_input", {}).get("command", "")if re.search(r"git\s+push\b.*(--force|\s-f\b)|--no-verify|rm\s+-rf\s+[/~]|\.env\b", command): print("Blocked by policy. Ask a person to run this.", file=sys.stderr) sys.exit(2)Make it executable with chmod +x. A pattern like this catches accidents, but it isn’t a security boundary, because a determined agent can phrase a command another way. Other harnesses have their own hook formats, and Sync writes them from one definition.
Permissions and Sandboxes
Section titled “Permissions and Sandboxes”Start with the agent asking before it runs commands or edits outside the repository, and allow more as you learn what it does. Keep full access for a machine or virtual machine with nothing on it you can’t lose. Give agents tokens limited to the repositories they need, and never paste a secret into a prompt.
Skills and MCP servers are code your agent will run, so treat them like dependencies: install them from sources you trust and pin the version. Guard pins them and tells you when one changes.
Working as a Team
Section titled “Working as a Team”When several people run agents, shared rules matter more than anyone’s own setup. Keep a person responsible for every merge, require review on risky changes and watch the spend.
- Sync applies your organization’s rules to every repository and reports the ones that break them.
- Council gives risky changes a review gate.
- Monitor shows the team’s usage and budgets, counting tokens only, never your prompts or code.
AGENTS.md
Section titled “AGENTS.md”AGENTS.md is a plain Markdown file at the root of your repository that tells agents how to work in it. Think of it as onboarding notes for a new colleague who reads them at the start of every session. Global rules say how you work everywhere; AGENTS.md says what is specific to this repository.
# AGENTS.md - Northwind API
Billing API for Northwind Labs: Node, TypeScript and PostgreSQL.
## Commands- `npm ci`: install- `npm run check`: types and lint- `npm test`: unit tests on a scratch database
## Guardrails- Never run migrations against production. `npm run db:scratch` makes a local copy.- Money is in integer cents, never floats.- A change to the public API updates openapi.yaml in the same commit.
## Where to Look- docs/billing.md: read before changing invoices or refunds.Your agent can write the first draft: ask it to read the repository and propose one, then cut it down.
- Keep it short. Every line is read in every session, and long files are followed less closely. Claude’s documentation suggests under 200 lines. Move detail into
docs/and say when to read it. - Write what an agent can’t work out. Exact commands, things that must never happen and decisions that look wrong but aren’t. Leave out what the code already shows.
- Fix it when you correct a mistake. If you tell an agent the same thing twice, add a line. Delete rules when they stop being true.
- Use one file. Claude reads
AGENTS.mdwhen there is noCLAUDE.mdin the repository, and onlyCLAUDE.mdwhen there is one, so don’t keep both unlessCLAUDE.mdimports the other with@AGENTS.md. Grok ignores a repository’s instructions until you trust the folder withgrok --trust.
Sync keeps AGENTS.md and every agent’s own files in step from one .cedr/ folder.
Git and GitHub
Section titled “Git and GitHub”Git is what makes agents safe to try: anything committed can be restored. Set it up before your first job.
git config --global user.name "Your Name"git config --global user.email "you@example.com"gh auth loginGit Habits
Section titled “Git Habits”-
Commit each finished step. Small commits are checkpoints, so
git restoredrops bad work andgit reflogfinds what you thought you had lost. -
Read before you commit. Have the agent stage files by name and read its own diff, so stray files don’t slip in.
-
One job, one branch. In T3 Code, start the thread in a new worktree. By hand:
Terminal window git worktree add ../northwind-rate-limit -b feat/rate-limit -
Write commits for people. Conventional Commits such as
fix(auth): stop counting successful loginsmake a history you can scan. -
Keep secrets out. Add
.envand similar files to.gitignorebefore the first commit, and treat any secret that gets committed as leaked.
GitHub
Section titled “GitHub”With gh signed in, your agent can do most of this for you:
- Pull requests are where you review.
gh pr createopens one, and the diff is easier to read there than in a terminal. - Issues give an agent the full story. “Fix issue 42” works, because
gh issue view 42brings in the report and the discussion. - CI failures come back to the agent.
gh run view --log-failedgives it the error to fix.
Then protect your default branch with a ruleset: require a pull request and passing checks, and block force-pushes. That way a confused agent can’t damage main, whatever its rules say. Turn on secret scanning and push protection as well.
Run your checks locally before you push. Agents push often, and CI minutes run out faster than you expect.
Harnesses
Section titled “Harnesses”A harness is the program around the model. It reads files, runs commands under your permissions, manages the conversation, and loads your rules, skills and hooks. The same model can behave quite differently in two harnesses.
Start with each provider’s own harness, because that is what its plan pays for. T3 Code isn’t a harness itself. It controls the ones you have installed, which is why your subscriptions work through it.
| Agent | Made by | Sign in with | Uses |
|---|---|---|---|
| Claude | Anthropic | claude auth login |
Claude plan |
| Codex | OpenAI | codex login |
ChatGPT plan |
| Gemini | Enable it in T3 Code’s settings, then Sign in with Google | Google AI plan | |
| Muse | Meta | muse login |
Muse plan |
| Grok | SpaceXAI | grok login |
The X Subscription |
| Cursor | Anysphere | agent login |
Cursor plan |
| opencode | SST | opencode auth login |
The provider you choose |
| Copilot CLI | GitHub | copilot |
GitHub Copilot plan |
Most harnesses give you the same four ways to extend them, though each stores them differently:
- Skills are instructions an agent loads when a job calls for them, such as how to cut a release. They are usually a folder with a
SKILL.md. - MCP servers give an agent new tools, such as your issue tracker or a database. See MCP for cedr’s.
- Hooks run your own code at set points, as in the example above.
- Subagents are agents started by an agent for a bounded job, such as reading a large codebase and reporting back.
Because each harness keeps these in its own files, running several means keeping several copies in step. Sync writes them all from one place.
Next Steps
Section titled “Next Steps”- Let your agent set up cedr, and choose only the tools you want.
- See your usage and limits with Monitor, then balance your plans with Route.
- Add a cross-vendor review gate with Council.