Skip to main content

resolve_session_key

Function resolve_session_key 

Source
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:

  1. WIRE_SESSION_ID — explicit universal override (any harness).
  2. CLAUDE_CODE_SESSION_ID — Claude Code adapter (stable per conversation; the same id the auto-memory system keys off).
  3. 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).