pub fn resolve_session_key() -> Option<(String, &'static str)>Expand description
v0.13: resolve a stable per-session key — host-agnostic, with a Claude Code adapter and the path left open for other hosts. Order:
WIRE_SESSION_ID— explicit universal override (any harness).CLAUDE_CODE_SESSION_ID— Claude Code adapter (stable per conversation; the same id the auto-memory system keys off).CODEX_SESSION_ID— OpenAI Codex CLI adapter. Stable per Codex thread (the same UUIDv7 emitted inthread.startedand used as the rollout-file suffix under$CODEX_HOME/sessions/). Codex does not yet forward this var to MCP children out of the box — operators must set it via[mcp_servers.<name>.env]in~/.codex/config.toml(or upstream Codex must add it to the MCP child env). Wiring the name in advance means once Codex ships the env, wire picks it up with zero further code change.COPILOT_AGENT_SESSION_ID— GitHub Copilot CLI (gh copilot/copilot) adapter. Set by the Copilot CLI host for every session; stable per conversation; UUID-shaped.VSCODE_GIT_REPOSITORY_ROOT— VS Code/GitHub Copilot workspace-based identity (stable per workspace).None— caller falls back to legacy cwd-detect (bare CLI / pre-v0.13 hosts). Future host adapters slot in before this.
Returns (key, source-label).