docs/docs/en/api/cli/session/index.md
Manage session mode for NB_SESSION_ID.
After session mode is enabled, nb env use and nb env current use the current shell or agent runtime context first, instead of directly sharing a single global current env.
nb session <command>
| Command | Description |
|---|---|
nb session setup | Install shell or runtime integration for NB_SESSION_ID |
nb session id | Show the current effective session id |
nb session remove | Remove shell or runtime integration for NB_SESSION_ID |
The default recommendation is to run nb session setup once when you first start using the CLI. With it enabled:
env1env2 at the same timeWithout session mode, different sessions fall back to sharing the global last env, which makes parallel work more likely to affect each other.