From d0f42254eee2c907ddbba3b8407bc66d906a8390 Mon Sep 17 00:00:00 2001 From: nntrivi2001 Date: Wed, 5 Aug 2026 17:46:42 +0700 Subject: [PATCH] docs(lanes): document ccam lanes gc (E, F3c) --- docs/LANES.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/LANES.md b/docs/LANES.md index 45f22b6..4594cf5 100644 --- a/docs/LANES.md +++ b/docs/LANES.md @@ -810,6 +810,21 @@ Set the environment variable to change when a watcher is considered dead: export LANE_DEAD_SEC=600 # 10 minutes instead of 5 ``` +## Housekeeping: ccam lanes gc + +Runs machine-wide, not against one lane — safe to run any time, running lanes and live sessions are unaffected: + +```bash +ccam lanes gc [--dry-run] +``` + +Two things, both scoped to what's actually stale: + +- **Reaps orphaned Playwright MCP processes.** A `.playwright-mcp`-scoped process whose owning Claude Code session died gets reparented to pid 1 — a live session's MCP keeps its real parent and is left alone. Kills the whole process tree so a spawned browser doesn't leak too. +- **Caps oversized hook logs.** Any `LANES_ROOT/.state/lane/logs/*.log` over 10MB is truncated in place to its last 2MB (same inode — a concurrent writer's file descriptor stays valid). + +`--dry-run` prints what would happen without doing it. This is a deliberately narrower port of Shipyard's `lane-gc.sh` — it does NOT auto-remove stale worktrees by age (that would violate this repo's own never-automatic-destroy rule; use `ccam lanes reset|remove|purge` explicitly instead), archive feature state (CCAM's lane/feature state lives in the database, not flat files), or sweep scratch debris (CCAM doesn't generate the files Shipyard's own scripts did). See `docs/superpowers/specs/2026-08-05-lane-gc-design.md` for the full scoping rationale. + ## Lane actions The web UI and CLI provide these actions on a lane: