Sergey Kopanev: you sleep — agents ship

Go Back
Broker · Part 1

The Session That Would Not Open


Running AI coding tools across accounts and containers. Session history, shared state, and the failures between them.

A session was still there. Its history was intact. The box refused to open it.

Broker helps me run AI coding tools across accounts and boxes. A box is an isolated working environment. Each window keeps its own copy of the tool’s history.

That separation matters: changes inside a box should not change the history outside it. The session also needs to return to the main history, so I can continue it later.

Those two operations interfered with each other.

A Copy at the Wrong Moment

Returning a session happens in two stages. Between them, the tool briefly marks the session as archived.

A new box started during that interval. It copied the history while the session carried that temporary status.

The return then finished. In the main history, the session was available again.

The box had its own copy. Its session stayed archived. When I tried to open it there, the tool refused.

Nothing disappeared. The box kept an accurate copy of a moment that should have passed.

The Feature I Turned Off

I disabled the automatic return of box sessions to the main history. Ordinary sessions continued to record normally.

That removed the overlap. It also removed a useful feature. I wanted the work from a box to appear in the main history again.

The fix made the two operations take turns. While a session returns, a new box waits before copying the history. While copying runs, the return waits.

Both operations needed the same rule. Either could start independently.

That coordination let me enable the return again.

The Cost of Keeping It Convenient

Returning a session runs in the background. Finding it among thousands of saved sessions took several seconds. Waiting for that work delayed the terminal prompt.

There is also a deliberate limit to the protection. If the coordination mechanism fails, Broker still starts with the previous behavior. It favors availability over an unconditional guarantee.

The result is specific: box sessions can return to the main history again. Under normal operation, a new box waits until that return finishes.

The failure happened in the brief interval between two stages. That interval lasted long enough for another environment to copy it and keep it.


Next in Broker: An Account Is Part of a Session.