Skip to content

Sandbox placeholder dotfiles appear untracked in the worktree while a Claude stage runs #558

Backlog

Description

@datacas

Problem

While the #550 implement stage (Claude, sandboxed) was running in the linked worktree .worktree/issue-550, git status showed untracked home-directory files at the worktree root: .bash_profile, .bashrc, .claude/, .gitconfig, .gitmodules, .idea, .mcp.json, .profile, .ripgreprc, .vscode. They had disappeared after the stage ended; only an empty .claude/.cc-writes/ remained. They look like the sandbox's mount placeholders for protected paths created in the stage's working directory.

While they exist, a stage that stages broadly (git add -A, git add .) can commit them into the pull-request branch, and tools that scan the tree see files that are not part of the repository.

Expected

A stage's working tree contains only repository files and the stage's own changes. Sandbox placeholders never become candidates for a commit.

Acceptance criteria

  • The source of the placeholder files is identified (host sandbox or toolkit settings) and named in the PR, with the evidence.
  • If the toolkit can prevent them, it does; otherwise the stage's commit path refuses to stage them and a regression test covers a broad git add during a running stage.
  • The residual empty .claude/.cc-writes/ is either removed at stage end or documented as expected.
  • The owning docs/ page for stage sandboxing is updated.

Related

#550, #345, #348.

Activity

  1. added
    bug
    P2
    on Nov 30, 2026
  2. added a commit that references this issue on Nov 30, 2026
  3. datacas commented on Dec 1, 2026

    @datacas
    OwnerAuthor

    Escalation evidence (2026-12-01, #503 cycle, PR #554): a Claude resolve stage was killed by a host reboot at 2026-11-30 ~17:40 and left 23 empty, read-only placeholders in the worktree (21 untracked, including .bashrc, .gitconfig, .gitmodules and a .claude/ tree, plus 2 git-ignored ones). The next run_cycle.py --from resolve crashed before dispatching:

    stage_permissions.PolicyError: <worktree>/.claude/settings.local.json could not be read (JSONDecodeError)
    

    raised from reduced_guarantee_overrides → _read_settings, because the leftover placeholder is a 0-byte file. So the placeholders are not only cosmetic: after an interruption they block resumption until removed by hand, and the git-ignored ones are invisible in git status. Removing all of them restored the run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions