isolate-parallel-worklisted
Install: claude install-skill haiggoh/local-agents
# isolate-parallel-work — prevent clobbering and contention
When multiple agents (local sessions, cloud subagents, or manual edits) work on the same repo or share a server, isolation is mandatory.
## Detect other running sessions
"Look for other sessions" is not actionable. Use signals, not intuition:
1. **Servers and their owners:** list what is actually listening before assuming a port is yours.
```bash
# narrow the grep to whatever port range your launcher scans, not a guessed one
lsof -nP -iTCP -sTCP:LISTEN | grep -E ':80[0-9][0-9]'
```
2. **Which agent sessions are live, and where they point.** Read each candidate process's environment: the
endpoint variable is the only reliable local-vs-remote tell, because a "this is local" shell flag **leaks**
into any later process started from the same shell.
```bash
ps eww <pid> | tr ' ' '\n' | grep -m1 '^ANTHROPIC_BASE_URL='
lsof -a -p <pid> -d cwd -Fn # what that session is working on
```
3. **Catch sessions whose process you mis-matched:** recently-modified transcript files reveal activity your
process grep missed.
```bash
# <transcripts-dir> = wherever the harness writes per-session transcripts
# (for Claude Code: ~/.claude/projects/<cwd-slug>/)
find <transcripts-dir> -name '*.jsonl' -mmin -20
```
4. **Check the queue-admission setting** before sharing a single-slot server: with admission set to wait,
concurrent requests queue instead of erroring; without it, the seco