📚 Encyclopedia

Tools & Workflow · updated 2026-10-13

Running several AI coding sessions on one repo (worktrees, locks, fresh memory)

gitworktreeclaude-codeconcurrencyflockmemoryworkflow

Justin regularly has several Claude sessions working on the TLDR repo at once: interactive terminals plus headless ProcrastinAI runs. On a shared checkout they clobber each other's uncommitted files, the shared build/ directory and pushes. Since July 2026 the repo enforces one git worktree per session, a lock around deploys, and a habit of re-reading project memory right before acting.

Per-session worktrees

Code is fresh, memory is not

Worktrees start from origin/main, so code freshness is automatic. Notes are not: on 2026-07-10 an entire release shipped from another session between one session's start and its first edit, changing the deploy rules. So: - Re-read the project's MEMORY.md (and topic files you will touch) from disk at the moment work begins, especially after a long pause or /clear. - Also skim the project's headless activity log (ai-activity.jsonl) for changes made by unattended runs since your last look.

Parallel agents inside one session

Splitting work across subagents works when they own disjoint files (one on a screen layout, one on server PHP, one on the router). Commit after each task, split commits by category, and run a review pass (architect plus pedant) before deploying. More in Multi-agent development workflows with Claude Code.

See also

Linked from

Sources: tldr memory (workflow-per-session-worktree, feedback_reread_memory_stale_sessions, bug-draft-restored-after-post, release-v1.31.0-audit, infra-claude-service-activity-log, workflow), posts #1618, #1631