Driver Shutdown
Stop a driver session by its token, without needing its terminal
bpsai-pair driver-shutdown stops a driver session that was started in its own session (--new-session). It works from any terminal, so you do not need the terminal the session was launched from.
How a session is addressed
Each session is registered with a private token. When a dispatch succeeds, PairCoder prints the path to your owner-only registry record for that session. The token itself is never printed, because dispatch output is often captured into logs. Read the token from that record, then give it to driver-shutdown in one of three ways:
| Method | How |
|---|---|
--token-file <path> | Read the token from a file that holds only the token (recommended) |
--token-stdin | Read the token from standard input |
BPSAI_DRIVER_TOKEN | Export the variable on its own line first, filling it without typing the token into your shell: read -rs BPSAI_DRIVER_TOKEN; export BPSAI_DRIVER_TOKEN. Typing VAR=value, inline or in an export line, is saved to shell history |
The command takes no token argument on purpose. Command-line arguments are visible to other processes on the machine, so a token passed that way would be exposed.
Stopping a session
bpsai-pair driver-shutdown --token-file ./driver.token
Or from standard input:
bpsai-pair driver-shutdown --token-stdin < ./driver.token
Options
| Flag or argument | Required | Description |
|---|---|---|
--token-file | One token source | Read the shutdown token from this file |
--token-stdin | One token source | Read the shutdown token from standard input |
session_id | No | The session's bare dispatch label. Accepted for this release only, and only when exactly one live session registered before the upgrade (without a token) matches it |
Sessions started before you upgraded to 3.0 have no token, so for this release they can still be stopped by their label. A session that has a token is never addressable by label. Use the token form going forward.
The command reports success only when the session is confirmed stopped. If the process's state cannot be verified, it keeps the registration and refuses rather than reporting a stop that did not happen. Refusals name a session only by its registry fingerprint, never the token. Native Windows is supported.