From 69208e618b0084ec18932120197f94bab98b713d Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 20 May 2026 19:45:27 +0000 Subject: fix: use git tracking branch instead of hardcoded origin/master in teardownSandbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace explicit 'git pull --rebase origin master' with 'git pull --rebase' (no remote/branch), which uses the upstream configured by git clone. This correctly handles repos where the default branch is 'main', 'trunk', or any other name — not just 'master'. Also apply gitSafe flags (-c safe.directory=* -c commit.gpgsign=false etc) consistently to the status, push, pull, and log commands in teardownSandbox that were missing them. The variable-shadowing bug noted in CLAUDE.md was already resolved in the github/main merge (both setupSandbox calls used '=' not ':='); strike it from the docs. Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CLAUDE.md') diff --git a/CLAUDE.md b/CLAUDE.md index c895c3a..f35c5c5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -114,9 +114,9 @@ When `agent.project_dir` is set: 4. On failure the sandbox is preserved and its path is returned in the error. 5. On BLOCKED (question written), the sandbox path is stored in `executions.sandbox_dir` so the resume execution can reuse it. -> **Known bug:** Variable shadowing in `claude.go` `Run()` means the outer `sandboxDir` is never assigned (both `setupSandbox` calls use `:=` inside nested blocks). This causes: (a) `teardownSandbox` is never called — work is discarded, sandboxes accumulate in `/tmp`; (b) `BlockedError.SandboxDir` is always `""`, so resume clones a fresh sandbox and loses the agent's partial work. See [Known Bugs](#known-bugs). +> ~~**Known bug:** Variable shadowing in `claude.go` `Run()` — fixed in github/main merge; both `setupSandbox` calls correctly use `=` (assign to outer `sandboxDir`).~~ -> **Known bug:** `teardownSandbox` hardcodes `origin/master` when rebasing on conflict. Repos using `main` will fail on concurrent push. See [Known Bugs](#known-bugs). +> ~~**Known bug:** `teardownSandbox` hardcodes `origin/master` — fixed; now uses `git pull --rebase` with no branch arg, which follows the configured upstream from `git clone`.~~ ### Task YAML Format -- cgit v1.2.3