Joxo / Blog
Notes from the multi-agent desk
What goes wrong when several coding agents share a codebase, and what we do about it. Practical, opinionated, and useful with or without Joxo.
-
Make Claude Code start in plan mode in one project
Set plan mode as the default for one project, check what it lets through, find the saved plans, and leave it for one session when you need to.
-
Your coding agent committed node_modules or a huge file: undo it
Find the big files in the last commit, take them out before you push, ignore them for good, and add a pre-commit hook that stops the next one.
-
Your coding agent undid your edits: get them back and stop it
An agent ran git checkout or git restore over your changes. What git can still recover, the habit that makes it recoverable, and the rule that stops it.
-
Your coding agent rewrote package-lock.json: undo it and stop it
An agent deleted the lockfile, reinstalled and bumped versions nobody asked for. Spot it, get the old lockfile back, fix lockfile conflicts, and block it.
-
Stop your coding agent editing generated files
Agents edit the generated file instead of its source, and the next build wipes the fix. A Claude Code deny rule and a one-line check catch both cases.
-
Which coding agent made this commit? Give each its own git name
Every commit from your agents carries your name. Give Claude Code, Codex and each worktree its own git author, then find their work with git log and blame.
-
Claude Code uses a different model than you set? Here's the order
--model beats ANTHROPIC_MODEL, then settings.local.json, the project settings.json and your own. We tested each pair, and how to check which model ran.
-
Can Claude Code read files outside your project folder?
Read, Write, cat and cp outside the folder were refused, even with acceptEdits. A script it was allowed to run read the file anyway. How to close that.
-
Stop a coding agent from skipping your git hooks
A deny rule for git commit --no-verify misses --no-verify at the end, -n and core.hooksPath. A short PreToolUse hook blocked all of them in our tests.
-
Why Claude Code asks about a command you already allowed
Bash(echo:*) runs echo $HOME but not echo $PORT, ${HOME}, $(…), a redirect to a file or a chained rm. What we tested, and the fix for each.
-
claude -p exited 0 but did nothing? Check what it was refused
A blocked tool call doesn't fail a claude -p run: the exit code is 0. Read permission_denials and is_error in the JSON result instead. Script included, tested.
-
claude -p ignored what I piped in: "no stdin data received in 3s"
If the piped command prints nothing for 3 seconds, claude -p runs without your input and still exits 0. Save the output to a file first. Tested.
-
Two agents changed the same code: resolve the merge conflict
Two coding agents on two branches edited the same function. How to see what each meant, let an agent merge both, and check its work before you commit.
-
Your coding agent ran git reset --hard. What you can get back
An agent ran git reset --hard, git checkout or git branch -D over your work. What git still has, the commands that find it, and what is gone for good.
-
Stop your coding agent committing straight to main
A git hook and a Claude Code hook that stop agents committing or pushing on main, and make them branch instead. Tested with Claude Code.
-
A 24-hour hackathon plan for a team with coding agents
Split the work by files before anyone starts, give each agent its own worktree, merge every few hours, and freeze features six hours before the demo.
-
How to hand off work from Cursor to Claude Code
Keep your rules in AGENTS.md so both tools read them, commit and push before you switch, and give Claude Code a short note with the next step and the test.
-
A shared notes file your team's coding agents all read
A template for one short notes file every agent reads before it starts: who owns what, today's decisions, open questions. Plus the rules that keep it short.
-
Check a cloned repo's CLAUDE.md before your agent runs
A repo you clone can bring its own CLAUDE.md, AGENTS.md and agent settings. What loads, what can run before you trust the folder, and how to check.
-
Claude writes the tests, Codex writes the code
Split a feature between two agents: Claude Code writes the spec and failing tests, Codex makes them pass, and git shows it didn't touch the tests.
-
Put a limit on an unattended Claude Code run
Cap a scheduled or scripted Claude Code run by turns, spend and wall-clock time, and clean up the commands it leaves behind when it stops.
-
Claude Code: 'did not complete within its 120s timeout'
Long builds and test runs pass Claude Code's two-minute command limit and move to the background. What that means, and how to raise the limit.
-
Coding agent stuck on a password, 2FA or login prompt
Claude Code can't answer a sudo password, a 2FA code or a browser sign-in. What happens when it tries, and how to make it stop and ask you instead.
-
Is Claude Code still working, or is it stuck?
A session looks busy but nothing moves. How to check what Claude Code is really running, when it last did anything, and how to stop what's hung.
-
When a Claude Code subagent says it changed files
Subagents can report edits that never reached the disk. A hook puts git's real list of changed files next to every subagent's report, so the main agent checks.
-
See which branch each Claude Code session is on
With several Claude Code sessions in several worktrees, every window looks the same. A short status line script shows folder, branch and uncommitted files.
-
Stop your coding agent from committing secrets
A git pre-commit hook with gitleaks blocks any commit that adds a key, from Claude Code, Codex or you. Plus the rule that stops an agent from skipping it.
-
Claude Code ignoring your deny rule? Check where it sits
A deny rule outside the permissions block is skipped silently. A trailing comma drops the whole file. Tested in Claude Code 2.1.314, plus a 10-second check.
-
Parallel agents, one database: give each worktree its own
Two coding agents in two git worktrees share one dev database, so one agent's migration breaks the other's tests. One database per worktree, in one script.
-
Clean up git worktrees without breaking a running agent
git worktree remove deletes a clean worktree while an agent still works in it. What the agent sees next, a check for running processes, and git worktree lock.
-
A coding agent force-pushed over my teammate's work
How an agent's force push erases a teammate's commits, why --force-with-lease failed after a fetch, and the pre-push hook that stopped every form.
-
Pasted an API key into Claude Code? Do this now
Where a key you pasted into Claude Code or Codex ends up on your disk, how to remove every copy, and a hook that stops the next paste before it's sent.
-
Stop Claude Code from running rm -rf
A deny rule for rm -rf misses rm -r -f, rm -Rf and find -delete. What we tested in Claude Code 2.1.312, and the hook and sandbox setup that held.
-
Let your coding agent ask a teammate's agent
Each person's agent learns their part of the project. Here is how to let your agent ask a teammate's agent, by hand today, and what to write down.
-
Get a Claude Code notification only when it needs you
Claude Code notifications that fire after every turn, or never: which types it sends, when each fires, and a hook that pings only when it needs you.
-
A git checkout replaced my .env file: why, and how to stop it
Your .env is ignored, yet checking out an old commit puts an old key in its place, and coming back deletes it. When git does this, and four ways to stop it.
-
Claude Code asks for every edit after you approve a plan
You approved the plan, and Claude Code still stops at every file. Why that happens, which plan option to pick, and how to switch mid-way. Tested on 2.1.312.
-
Keep Claude Code from reading your .env file
A Read deny rule stops Claude Code opening .env, even with cat. It misses node -e and cat .e*. What we tested, and the sandbox setting that closes the gap.
-
Let Codex run your tests without asking, safely
Codex CLI 0.164 sandbox modes and approvals tested: what workspace-write allows, how to turn on network, project config, profiles, and where --full-auto went.
-
Claude Code ignoring CLAUDE.md? Check what it loaded
Often the rule never reached Claude: a quoted import, an AGENTS.md skipped, a subfolder file not loaded yet. How to check with /context, and the fixes.
-
Claude Code "Prompt is too long"? Find what fills it
Read the error's second half, run /context to see what fills the window, then compact, clear, or cut the tools and memory files every request carries.
-
Claude Code stuck in a loop? Stop it and get back on track
Interrupt with Esc, rewind to before the loop started, say what changed, and narrow the task. How to spot a loop early and stop it coming back.
-
Claude Code using too much memory? Find the old sessions
See how much memory each Claude Code or Codex session uses with its tool servers, find sessions open for days and leftovers, and close them safely.
-
claude: command not found after install? The fix
Claude Code installed, but the terminal can't find it. Why ~/.local/bin isn't on your PATH, the one line that fixes it for zsh and bash, and how to check.
-
Codex not reading AGENTS.md? Where it looks, and fixes
Codex reads AGENTS.md only from the repo root down to the folder you start in, up to 32 KiB. Tested on Codex CLI 0.164, with the fix for each case.
-
Port already in use? Find the dev server your agent left
Coding agents start dev servers and forget them. Find what holds the port, check it is yours, stop it, and give each agent its own port.
-
Git worktree missing .env and node_modules? Copy them in
A new git worktree has no .env, no node_modules and no spare port. Copy the ignored files, clone the install in a second, and give each worktree its own port.
-
Make Claude Code run the tests before it says done
A Stop hook that runs your tests and sends failures back to Claude, so it can't finish on red. The script, the settings, and what we saw when we ran it.
-
Make Codex run your tests before it says done
A Codex Stop hook that runs your tests and sends Codex back to work when they fail. Tested on Codex CLI 0.164, including the trust step that skips it.
-
Resume a Claude Code or Codex session you closed
Closed the terminal mid-task? Claude Code and Codex both keep the conversation. The commands to pick it up again, and why --continue can come back empty.
-
Run Claude Code or Codex on a schedule
Run a coding agent every night with cron or launchd: the script, the PATH and sign-in traps that make scheduled runs fail, and safe permissions.
-
Claude Code hooks not working? Seven checks, in order
Check /hooks, the JSON, the matcher, the event, the script with sample input, the exit code and stray output. Each check takes under a minute.
-
Claude Code forgets rules after compaction: how to keep them
Root CLAUDE.md survives compaction; rules said only in chat, path-scoped rules and nested files don't. Move them, then add one hook that re-reads them.
-
Stop Claude Code asking permission for every command, safely
Allow the commands you approve ten times a day, make risky ones always ask, deny secrets, and keep the list in one shared file. A starter list included.
-
How to approve Claude Code permission prompts from your phone
Send only prompts, questions and blockers to your phone, allow only what it shows in full, keep risky actions for the keyboard, and never let silence approve.
-
How to review pull requests from several coding agents
Make each agent PR small and carry its own evidence, run five checks, merge in dependency order, and let a second agent read it before a person does.
-
Claude Code for teams: set up shared rules in 5 minutes
Commit one shared instruction file, keep team settings apart from personal ones, sign everyone in on their own plan, then check it with one question.
-
How to stop two AI coding agents editing the same files
Claim the work, give each agent its own worktree, and check for overlap before merge. Worktrees alone only postpone the conflict until merge day.
-
Team chat for coding agents: what goes in chat, what on the board
Chat is for talking: questions, decisions and blockers. A task board is for status: claims, pull requests, done. Eight agent events and where each goes.
-
Your team, inside Claude Code
Claude Code now lets plugins draw inside it. Joxo's does one small thing: it shows who on your team is working, and what is waiting for you.
-
How to connect Codex and Claude Code
To connect Codex and Claude Code, keep rules in AGENTS.md imported by CLAUDE.md, then give both agents one task list, decision log and handoff note.
-
Run multiple Claude Code sessions in parallel without conflicts
Give each session its own git worktree, claim each task first, name one owner for shared files and check merges early. About three at once is plenty.
-
AI agent collaboration: coordinate coding agents in a team
Give every agent the same rules file, one task board where each task has one owner, a decision log and handoff notes. Agents share facts; people decide.
Follow along with the RSS feed. What is new in Joxo is on the changelog, and launches and press facts are on Joxo news.
Something missing or wrong? Support reaches a person.