deliver: a first push from the sandbox errors and sets no upstream #219
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Defect
A branch's first push from Claude Code's sandbox ends with a git error
and leaves the branch without an upstream, although
delivertreats itas a success to walk past.
Location
.agents/skills/deliver/land.md, first item, "Push a branch the first time withgit push -u <remote> <branch>", as seeded atb04e778.Evidence
Seen twice on 2026-11-11, in a repository seeded from
b04e778, withgit 2.53.0, pushing a new branch from its worktree under
.worktrees/:git ls-remote origin refs/heads/<branch>shows the pushed commit.
git config --local --get-regexp '^branch\.<branch>'prints nothingafterwards, so the branch has no upstream.
land.mdforeseesunable to write upstream branch configurationand says to go on, but names neither the first line,
could not lock config file … File exists, nor the missing upstream..git/config.lockis on disk as an empty file of mode 0444, andshows from outside the sandbox too. Whether the sandbox puts it there
on purpose, and whether it outlives the session, was not checked; if
it does, the user's own
git config,git push -uandgit branch -uin that checkout fail the same way until it is gone.Scenario
An agent delivers a branch through a pull request. The push prints two
errors that read as a failure, so the agent has to confirm the push by
other means before going on, and the user who later works in that
worktree finds a branch whose
git statusandgit pullknow noupstream.
Smallest fix
In
land.md, push a branch the first time without-uwhen thesandbox is on,
git push <remote> <branch>, which writes noconfiguration and prints no error; the later folds already find the
remote from
refs/remotes/*/<branch>, not from the upstream. Then saythat such a branch has no upstream, with the command the user runs
outside the sandbox to set it. Or keep
-uand quote both error lines,so that an agent recognises them.
Worth settling in the same work: whether the leftover
.git/config.lockis the sandbox's own guard, and what the skillsshould tell the user when it stays behind.