oliver-zehentleitner / maity
runner: a placed Claude Code session leaves .git/glab-cli (and .git/worktrees) in its clone, and the clone check then refuses maity checkpoint/report and the next start
tsk-ydxv7x37fg08 Done Maity Coder Claude 004
Found on vm-aigents01 on 2026-11-13. vknm's report is 124178; the clone restore by ur6p is 124154.
What happens
- Both runner clones (maity-coder-claude-001 and -003) got a
.git/glab-clidirectory, and 003 also.git/worktrees. The runner refused the start withworkspace_in_useandmaity checkpointrefused with "not a plain clone: .git/glab-cli is not a plain clone's" (clonecheck: not in GIT_DIRS;worktreesis in UNSUPPORTED). - After a restore with both moved aside, the placement started at 18:17Z. Within the same minute
.git/glab-cli,.git/worktreesand.git/infowere there again, with the same mtime as.git/maity. The CLI source has no reference to glab, so most likely the harness's sandbox creates them (empty, as mount points or guards for paths it protects), like.claude-sandbox-noreplaceand the emptyremotes/that SANDBOX_DIR / SANDBOX_EMPTY_DIRS already accept. - Consequence: every placed Claude Code session breaks its own clone for
maity checkpoint/reportand for the runner's next start. The runner agents can't work at all.
To do
- Reproduce: start a supervised or interactive Claude Code session through the runner on a clean clone, then list
.gitwith types, sizes and mounts (findmntinside the sandbox if possible). Name exactly what createsglab-cliandworktrees(the Claude Code sandbox config, bwrap binds,adapters.pydeny lists?). - Fix at the source if maity causes it (a deny or bind path in adapters that makes bwrap create the directory). Otherwise accept exactly these as empty placeholders in clonecheck (SANDBOX_EMPTY_DIRS), and only when empty; a non-empty
worktrees/must still be refused. - Tests: clonecheck accepts the empty placeholders and refuses them with content; a supervisor test where a session start leaves them and the next start succeeds.
- Changelog fragment (fix) and a Keep the Why entry next to the existing SANDBOX_* entry.
Priority: high. It blocks both runner agents. It should go into the same CLI release as #1735.
Notes
An agent · Nov 13, 2026, 18:22 UTC
Root cause, from the runner VM (ur6p, 2026-11-13).
- What appears:
.git/glab-cliand.git/worktrees, both as empty directories owned by the agents' user. They appear in both claude-code clones (maity-coder-claude-001, -003) in the same second as the session start: 18:17:09Z after the restart at generation 12. The backed-up.gitfolders from the earlier start carryworktrees/dated 09:02, the previous start's time, andglab-cliwas there too. - Source: not maity and not the runner's generated claude-settings.json, which has no glab or worktrees entry. The Claude Code binary, 2.1.319 and 2.1.323 alike, lists
/.git/glab-cliand.git/worktreesamong its protected paths. Its sandbox (bwrap) creates them as mount targets when a session starts. On the VM, Claude Code is 2.1.323;maity runner checkwarns that the sandbox was checked with 2.1.318. - Effect: clonecheck refuses the clone, with "not a plain clone: .git/glab-cli".
glab-cliis in no accepted set, andworktreesis in UNSUPPORTED. Somaity checkpointfails in every claude-code placement. Moving the dirs aside doesn't hold, since the next start recreates them, and they must not be moved while a session runs, since they are mount targets. - Fix direction: accept both when empty, like
remotesin SANDBOX_EMPTY_DIRS. With content, keep refusing them,worktreesas not_a_plain_clone. Add a clonecheck test for each, empty vs non-empty.
- What appears: