The shell did not become background noise.
VS Code 1.141 adds a Background Shells pill to Copilot harness sessions. The pill lists commands still running, shows how long each command has run, and can open the available output stream. A shell leaves the list when its command finishes.[1]
That is useful visibility. It is not a lifecycle policy. A build, test watcher, development server, migration, or tunnel can keep changing the workspace or the network while the agent works on another step.
Put a stop route beside every start route.
The window is no longer the lifetime.
Microsoft's Agent Host documentation says the host owns sessions independently of the clients that display them. An active turn can continue without a connected editor window while the host remains running. Commands execute in the environment that contains the host, which can be local, remote, or inside a development container.[2]
Closing a panel is therefore weak evidence. Record the execution host and working directory. Keep the command's durable identifier when the runner exposes one. After a reconnect, read fresh state from the host instead of trusting the last screen you saw.
A process is wider than its label.
Bash groups every pipeline into a job and gives the processes in that pipeline one process-group identity. Background processes do not receive the terminal's keyboard signals in the same way as the foreground process. Bash can stop, resume, foreground, or terminate the job through its job-control commands.[3]
Runtime details also matter. Node's child-process documentation warns that stopping a shell parent on Linux may leave descendants running. It distinguishes a signal being sent from a process actually terminating, and notes that a reused process ID can target the wrong process later.[4]
The practical rule is narrow. Use the runner's own cancellation path first. Confirm the intended job stopped. Check the port, file, or output that proves shutdown. Do not turn an old process ID into a blind kill command.
Write the card before dispatch.
For each background command, record the exact command, execution host, working directory, expected completion condition, output location, timeout, stop action, and cleanup check. A watcher may have no planned exit, but it still needs a lease and owner.
JOB=[HUMAN-READABLE NAME] COMMAND=[EXACT COMMAND] HOST=[EXECUTION ENVIRONMENT] WORKDIR=[PATH] DONE_WHEN=[EXIT / MARKER / MANUAL STOP] STOP_WITH=[RUNNER ACTION] VERIFY_STOP=[PORT / PROCESS / FILE CHECK] OUTPUT=[LOG OR ARTIFACT] OWNER=[PERSON OR SESSION]
Do not mark the job complete because it vanished from one client. Completion needs an exit status or another named witness. Cancellation needs a confirmed stop. Lost visibility is its own state and should block dependent work.