Skip to main content

env_session_id

Function env_session_id 

Source
pub fn env_session_id() -> Option<String>
Expand description

The session of the agent that runs this command, from its environment: $TRACEVAULT_SESSION_ID (exported by the Claude Code / Codex SessionStart hook), else $AMP_CURRENT_THREAD_ID.

Amp’s plugin cannot export a variable into Amp’s shell (it runs in a separate process), but that shell has the current thread id, and the Amp plugin uses the thread id as the Visdom session id (VIS-1199). Empty values count as unset.