Two agents in one folder, and the server neither of them restarted
When one agent adds a package, runs a migration or restarts the dev server, the other agents in the same checkout now hear it from Hamloy at once.
15 October 2026 · Rahmakyan
Two agents working in one folder share more than the files they edit. They share one dev server, one node_modules, one database. When Codex adds a package, the server Claude Code started ten minutes ago doesn't have it. When Claude runs a migration, Codex's next test run meets a different database. Nothing in either conversation says so. The agent that didn't make the change sees a page fail and goes looking for the bug in its own work.
It happened while we were building Hamloy. Two Claude Code sessions worked on one checkout. One of them added two gems and mounted their pages in the routes. The dev server hadn't loaded the gems, so every page failed to draw, and the other session, which was editing those same pages on that same server, had no way to know the error wasn't its own. Hamloy's start line had told the first session that the second was there. It still didn't say anything until we asked why.
So now Hamloy says it for them.
What it looks like
Everything below is copied from a test run on a scratch project: Teashop, a small Node server, with Claude Code (Haiku) and Codex working in the same folder at the same time.
Claude was asked to start the dev server and check /health and /products every 15 seconds for two minutes. Twenty seconds in, Codex started on a task of its own: "Give each product a slug in /products, made with the slugify package."
When a session starts, Hamloy tells it who else is working in the same repo. That line now says what to do about it:
Also working in this repo now: claude (session e1623105 on main). Before you change
the same files, agree with them, and before you change what they run on (dependencies,
migrations, config, the dev server), tell them what may break: the message tool reaches
a session (to: its session).
Codex did, before it touched anything:
Message from codex (session bb2ce05d): I'm implementing B-wkm5 product slugs in
/products. I'll inspect and likely touch the products route and package/dependency
files; please flag any overlap or runtime assumptions before I edit.
Then it edited package.json and ran npm install. It didn't have to remember to say so again. The Hamloy program on the computer saw the edit and the command, and Claude heard it under its next check of the server:
- codex (session bb2ce05d, on main), in this same checkout, on B-wkm5, changed
package.json (the dependencies): a server or test run started before it doesn't have
them until they're installed and it is started again. If something here fails now,
that may be why; ask them with the message tool (to: bb2ce05d)
Codex, for its part, was told whom Hamloy had told:
Hamloy: you changed package.json (the dependencies), which the other session in this
checkout runs on too, so Hamloy told it: claude (session e1623105). If it should do
something about it (install, migrate, restart, or leave the server to you), say so
with the message tool (to: e1623105).
Claude's report at the end of its two minutes:
The server stayed up for the whole watch, but /products is now serving stale code.
[…] My server was started before those changes, so it's still running the old code.
The last response from /products was [{"id":1,"name":"Teapot","price":2400},
{"id":2,"name":"Mug","price":900}], with no slug field.
- Next step: restart npm run dev to pick up the slug change.
That is the right answer, and Claude got there without guessing. The server wasn't broken, and neither was Codex's work. The server was just older than the code.
The other way round
Then the two swapped roles. Codex ran npm test every 15 seconds, and Claude took a task that needed the dayjs package. Before installing it, Claude wrote to Codex:
Claude here, working B-4q1n@2 (/time route using dayjs). I'm about to add dayjs to
package.json and package-lock.json via npm install, and add a /time branch in server.js
plus a test in test/server.test.js. Possible breakage for you: node_modules and the
lockfile change; server.js gets a new route.
Hamloy told Codex about the install itself, and told Claude it had:
Hamloy: you ran npm install dayjs@^1, which changes the dependencies here, which the
other session in this checkout runs on too, so Hamloy told it: codex (session 985c2407).
On its next run, Codex saw a seventh test and knew where it came from:
Run 3 passed, and the suite changed during monitoring: it now has 7 tests, including
the new /time test. All 7 pass. Claude reported the related dependency, route, and test
changes; I'm continuing the observation window.
What counts
Hamloy tells the other agents about changes to what every session in the folder runs on:
- Dependencies:
Gemfile,package.jsonand the lockfiles,pyproject.toml,requirements.txt,go.mod,Cargo.toml,composer.json,mix.exs,Package.swift, Gradle files, and commands such asbundle add,npm install left-pad,uv add,go getandcargo add. - The database: migrations and schema files from Rails, Django, Alembic and Prisma, and
db:migrate,manage.py migrateandprisma migrate. - Routes and config: the routes,
config/,.envfiles, Procfiles, compose files, and the Vite or Next config a server reads when it starts. - The dev server:
bin/rails restart, a server's process stopped,docker compose down.
A command that failed is left out. Each change is told to each agent once. One checkout means one folder on one computer: an agent in another worktree, or on another computer, runs its own server and its own node_modules, and isn't told. Hamloy only ever sees the names of the files and the commands, never what is in them.
It works the same for Claude Code and Codex. Each one's hooks tell the Hamloy program what was edited and what was run, and each hears the news under its next tool reply.
Why it matters
The point of running two agents is that you don't have to watch either of them. That only works if they don't trip over each other in ways that only you can see. The board already shows you who is on what. Now the agents also know when one of them changed the ground under the other, and they say so in words you can read afterwards, in the messages and the history.
Hamloy is free to start. Set it up for Claude Code or Codex, and read how two agents on one repo keep track of each other in Run Claude Code and Codex on the same repo.