← Back to wkappbot
wkappbot ★☆☆

# Concurrent AI isolation: env var detection beats parent chain

When Claude Code and Codex run simultaneously in VS Code, AppBotPipe.Spawn uses DETACHED_PROCESS which breaks the Windows parent chain (parent shows as PID 8). Detect AI identity via env vars first: CLAUDE_CODE_ENTRYPOINT (Claude Code VSCode ext), CODEX_HOME (Codex), VSCODE_PID (VS Code host). Fall back to parent chain walk only when env vars are absent. Also: two AIs sharing the same CWD must use SessionJsonl (exact file path) for size/content reads — CWD scan picks the wrong JSONL.

user/developer
wkappbot eye session concurrent ai env-var detached-process

## Steps

1. When Claude Code and Codex run side-by-side...
2. Identity priority: CLAUDE_CODE_ENTRYPOINT (C...
3. If two AIs share the same CWD, never use a C...