Background
history.jsonl is the single shared, append-only file at the master root and the only real concurrency exposure when two profiles are live at once (PRD §15). All other shared state (sessions/, projects/, tasks/) is keyed by path/id and does not collide across different repositories.
Phase 2 treats history.jsonl as an ordinary shared symlink (decision #7). Whether that is safe under two concurrent Claude daemons is unvalidated.
Task (PRD §11.4)
Run the focused append test:
- Two profiles live in different repositories.
- Drive rapid interleaved activity so both append to the shared
history.jsonl.
- Verify every line parses as JSON, no line is torn/interleaved, and entry counts from both sessions are all present.
- Repeat under scripted bursts to stress the append path.
Decision it feeds (PRD §15)
- Clean → keep
history.jsonl fully shared. No code change. (Desired outcome.)
- Torn/interleaved → mitigate only this one file, without disturbing the rest of the shared model:
- Preferred: Recif-daemon-mediated advisory lock (
flock) serializing appends to the master file.
- Fallback: make
history.jsonl alone per-profile (add to denylist), accepting loss of global history search while keeping sessions/projects/tasks shared and resumable.
Full sharing / resume-anywhere is a hard requirement either way — no partial-sharing fallback.
Notes
- Any mitigation should ship behind a feature flag so it is off until the test forces it on.
- Priority: this is the one open design question; it can change behavior of one file only.
Background
history.jsonlis the single shared, append-only file at the master root and the only real concurrency exposure when two profiles are live at once (PRD §15). All other shared state (sessions/,projects/,tasks/) is keyed by path/id and does not collide across different repositories.Phase 2 treats
history.jsonlas an ordinary shared symlink (decision #7). Whether that is safe under two concurrent Claude daemons is unvalidated.Task (PRD §11.4)
Run the focused append test:
history.jsonl.Decision it feeds (PRD §15)
history.jsonlfully shared. No code change. (Desired outcome.)flock) serializing appends to the master file.history.jsonlalone per-profile (add to denylist), accepting loss of global history search while keeping sessions/projects/tasks shared and resumable.Full sharing / resume-anywhere is a hard requirement either way — no partial-sharing fallback.
Notes