$npx -y skills add parcadei/Continuous-Claude-v3 --skill explicit-identityExplicit Identity Across Boundaries
| 1 | # Explicit Identity Across Boundaries |
| 2 | |
| 3 | Never rely on "latest" or "current" when crossing process or async boundaries. |
| 4 | |
| 5 | ## Pattern |
| 6 | |
| 7 | Pass explicit identifiers through the entire pipeline. "Most recent" is a race condition. |
| 8 | |
| 9 | ## DO |
| 10 | |
| 11 | - Pass `--session-id $ID` when spawning processes |
| 12 | - Store IDs in state files for later correlation |
| 13 | - Use full UUIDs, not partial matches |
| 14 | - Keep different ID types separate (don't collapse concepts) |
| 15 | |
| 16 | ## DON'T |
| 17 | |
| 18 | - Query for "most recent session" at execution time |
| 19 | - Assume the current context will still be current after await/spawn |
| 20 | - Collapse different ID types: |
| 21 | - `session_id` = Claude Code session (human-facing) |
| 22 | - `root_span_id` = Braintrust trace (query key) |
| 23 | - `turn_span_id` = Braintrust turn within session |
| 24 | |
| 25 | ## Example |
| 26 | |
| 27 | ```typescript |
| 28 | // BAD: race condition at session boundaries |
| 29 | spawn('analyzer', ['--learn']) // defaults to "most recent" |
| 30 | |
| 31 | // GOOD: explicit identity |
| 32 | spawn('analyzer', ['--learn', '--session-id', input.session_id]) |
| 33 | ``` |
| 34 | |
| 35 | ## Source Sessions |
| 36 | |
| 37 | - 1c21e6c8: Defined session_id vs root_span_id distinction |
| 38 | - 6a9f2d7a: Fixed wrong-session attribution via explicit passing |
| 39 | - a541f08a: Confirmed pattern prevents race at session boundaries |