<environment> is a name like linux-build-3f2a or an ID like env_…. Everything after -- runs in the environment, in the template’s working directory (/work for linux-build) unless you pass --dir.
What happens
1
Sync first
Your sandbox syncs every share it writes and waits for each receiver’s acknowledgement, so the command sees your latest edits. If the environment was just created, a sync waits a few seconds for the tailnet path to form. Skip this with
--no-sync.2
Run and stream
The command runs over the tailnet. Standard output and error stream back as they happen, and Ctrl-C stops it.
3
Results come back
Before it reports the exit code, the environment syncs its out shares and waits for your sandbox to acknowledge. Files written to
/work/out are on your machine when exec returns.4
Exit
envctl exits with the command’s exit code.Shell features
The command isn’t run through a shell. For pipes,&& or cd, wrap it:
Timeouts
124. Without --timeout, a command runs until it finishes or the environment reaches its hard limit.