From Terminal to Team: When Agent Workflows Outgrow One Laptop
For the first few months, I used Claude Code alone in my terminal. Big productivity boost. But I hit a wall: when I closed my laptop, the agent stopped. Anything I needed had to happen while I was sitting in front of the keyboard.
If your usage is “only when I’m around”, Claude Code is plenty. But once you start thinking — can this code review run automatically? can this dependency update run every Monday? — you need it to work when you’re not there.
Step one: script the repeatable work
The simplest way is wrapping common agent tasks into scripts. For example, I update project dependencies every two weeks:
claude -p "bump all deps to latest minor, run tests, fix any breaks"
Use --output-format json for structured output, or stream-json for real-time streaming — one JSON object per line.
Then drop these scripts into CI or crontab:
# In GitHub Actions or crontab
claude -p "review recent changes for security issues" \
--output-format json --allowedTools "Edit,Bash(git *)"
--allowedTools restricts what Claude can do — critical for unattended runs.
Fan-out across files
For large migrations — like updating API calls across hundreds of files — generate a file list and loop claude -p over each one:
for file in $(cat files.txt); do
claude -p "migrate $file from axios to fetch" \
--allowedTools "Edit,Bash(git commit *)"
done
Test your prompt on 2-3 files first, then run the full set. --allowedTools keeps things safe when running unattended.
Step two: share configs across the team
A solo CLAUDE.md and solo settings.json won’t cut it at team scale.
Teams need shared agent rules — not everyone maintaining their own copy. What I’ve seen work:
- Put CLAUDE.md in the project repo, everyone uses the same one
- Team-level permission templates that mandate human approval for certain operations
- A shared skill directory — anyone can PR a useful skill into it
With unified rules, everyone’s agent behaves consistently. No more one person’s agent deploying to prod while another can’t even run tests.
Step three: event-driven automation
Cron jobs are just the start. The real value comes from event-triggered workflows — something happens, and the agent responds.
Common triggers and responses:
- PR opened → agent runs code review
- Build fails → agent analyzes logs, attempts a fix
- Dependency has a CVE → agent upgrades, opens a PR
- Monday midnight → agent runs a global code health check
Put these triggers and executors on a unified platform, and they stop depending on anyone’s local terminal.
Side note: Worktrees solve parallel conflict
When running large migrations, a common headache: one Claude is editing code while another Claude edits the same code. Conflict.
Claude Code supports Worktrees — each session works in an isolated git checkout:
claude --worktree "migrate report component to new API"
Each worktree is a separate directory. Edits don’t collide.
Going further: Agent Teams
For complex tasks — a new feature touching frontend, backend, database, and tests — multiple Claude sessions can coordinate. A lead agent assigns tasks, worker agents execute in isolated contexts, the lead merges results.
This is still experimental and off by default. For most practical work, the fan-out pattern above handles it well enough.
Step five: the control layer catches up
When your team has dozens of agents running different things simultaneously, you need answers to:
- Who started this agent run?
- What files did it touch?
- How much did it cost?
- How do we trace back if something goes wrong?
That’s what the control layer handles — permissions, audit, cost, visibility. At this stage it’s no longer a configuration problem. It’s a platform problem.
Most teams only need to get to step two. Get the personal habits right first, then expand. Don’t try to build the platform from day one.