fix(#3557): accept claude code session id in the workstream session probe (#3570)

* test(#3557): failing-first regression for claude code session key probe

* test(#3557): assert adapter source vocabulary in session probe test

* fix(#3557): accept claude code session id in the workstream session probe

* test(#3557): pin the new session key against both immediate neighbors

* chore(#3557): backfill changeset pr number

---------

Co-authored-by: sim <sim@local>
This commit is contained in:
Tom Boucher
2026-08-16 02:09:39 -04:00
committed by GitHub
parent 9448736872
commit 2b9713a6b2
5 changed files with 147 additions and 3 deletions

View File

@@ -20,6 +20,15 @@ const WORKSTREAM_SESSION_ENV_KEYS: ReadonlyArray<string> = [
'GSD_SESSION_KEY',
'CODEX_THREAD_ID',
'CLAUDE_SESSION_ID',
// #3557 — Claude Code (≥ 2.1.132) exports its session id to Bash-tool
// subprocesses as CLAUDE_CODE_SESSION_ID. Without it the probe returned
// null on Claude Code, so every concurrent session in a working tree
// shared the single .planning/active-workstream pointer and cross-
// workstream STATE.md writes landed silently in the wrong file. Inserted
// beside the other runtime keys without reordering any existing entry;
// ahead of CLAUDE_CODE_SSE_PORT so the canonical id wins when both are
// present (runtime identity outranks terminal identity in this list).
'CLAUDE_CODE_SESSION_ID',
'CLAUDE_CODE_SSE_PORT',
'OPENCODE_SESSION_ID',
'GEMINI_SESSION_ID',