Workspace-hub sync blocked by concurrent writers
Use this when multi-repo sync is mostly done but workspace-hub root will not stay clean because other active AI sessions are still writing files, creating locks, or stashing changes.
Symptoms
./scripts/repository_sync status allshows subrepos clean, but rootgit statuskeeps changing between checks..git/index.lockappears intermittently.ps -ef | grep '[g]it'shows activegit status,git stash,git add, or commit processes from other sessions.- Strange transient untracked files appear, especially partial markdown-heading fragments like:
**Complexity:****Date:****Issue:****ReviewCompatibilityThisThese are a strong signal that another session is mid-write and the filesystem state is not stable.
Safe procedure
- Run
./scripts/repository_sync status allfrom workspace-hub and separate subrepo health from root health. - If listed repos are clean/up to date, treat subrepo sync as complete even if workspace-hub root is still dirty.
- Inspect concurrent activity before retrying root cleanup:
git status --short --branchps -ef | grep '[g]it'- optionally
stat .git/index.lockif a lock exists
- If active git/session writers are still present, stop chasing a final clean root claim.
- Report explicitly:
- subrepos are synced/clean
- workspace-hub root cleanup is blocked by concurrent writers
- a final catch-up commit should happen only after those sessions finish
- Only after active writers stop, do one final root cleanup pass:
git status --short --branchgit add -Agit commit -m "chore(sync): ..."git push origin main- rerun
./scripts/repository_sync status all
Do not
- Do not claim workspace-hub root is finally clean while active sessions are still writing.
- Do not repeatedly remove
index.lockwithout checking for live git processes. - Do not treat weird transient filenames as normal repo files to preserve without first confirming they are intentional.
Outcome pattern
The correct end-state may be:
- repo ecosystem sync: complete
- workspace-hub root: temporarily blocked by concurrent writers
That is better than a false claim of full cleanliness.