The sandbox was built for one case: an agent that has to finish work after you stop watching it. This page is that case, end to end.
Start the agent on the sandbox
Get in and start it the way you would start it anywhere:
tnt box ssh-proxy ssh research
# on the sandbox
opencode serve --port 4096
Anything that keeps running works. A server, a worker, a script, a test suite in the background — the sandbox does not care what the process is, only that it is running.
Close the lid
This is the whole point. Disconnecting does not end the work and it does not kill the process you left running. The sandbox keeps running whether or not you are connected to it.
You can close the terminal, close the laptop, put it in a bag, or fly somewhere else with it. The agent keeps going.
Come back to the log
tnt box exec research -- tail -n 200 /var/log/agent.log
Or, without knowing where the agent wrote:
tnt box logs research --follow
The sandbox log covers what the platform observed — the lifecycle events, the state transitions, the command output that was captured. What the agent itself wrote is in the sandbox, and you can read it with the tools you already have.
Open a second shell while it runs
Nothing stops you from connecting more than once. This is what makes the sandbox useful when an agent is misbehaving:
tnt box ssh-proxy ssh research
# on the sandbox
ps aux | grep opencode
ls -la /var/log/
If the agent is looping, you can see it looping. If it is waiting on something, you can see what it is waiting on. You are not debugging a black box, because there is no black box — there is a machine you can walk into.
Diagnose the common failures
The agent stopped when you disconnected. It was not started with the process detached, or it was started from a shell that exited. Start it under a supervisor or with nohup/setsid so it survives the session, and check that it is not reading from the terminal.
The agent is running but not doing anything. It is probably blocked on input, or waiting on a network call that will never return. Open a second shell and look at what the process is doing.
It ran out of disk or memory. The sandbox’s disk is fixed when it is created, and its memory is bounded. tnt box describe research shows both. Recreate it with more, or make the agent write less.
You cannot connect at all. The sandbox may still be creating. A sandbox that nobody touches for the idle window is reclaimed automatically, and after that there is nothing to connect to.
When you are finished
Take what you need out, then destroy the sandbox:
tnt box exec research -- tar czf - ./results | tar xzf -
tnt box destroy research
Nothing is inherited by the next person or the next tenant. If the agent’s output is worth keeping, it is worth copying out first — destruction is not a soft delete.
What comes next
Managing the agent’s lifecycle by hand — restarting it, scheduling it, watching many at once — is what the agents platform is for. It is being designed. Until then, a sandbox and a shell is the whole story, and it is enough to get an agent through a long task.
Next: the sandbox documentation.