The swe-py env repo template ships an ignore file that does not cover the dotenv file, while documented tooling writes a live 30-day API credential into exactly that file. The shipped ignore list is only:
jobs/
gt-env-check-*/
__pycache__/
*.egg-info/Step 8 of the auth skill tells the agent to persist the freshly minted value into the project dotenv file, and the session extension writes its own status line there too, so that file reliably exists in a fresh clone as an untracked file.
Net effect: every repo made from this template is a git repo where the recommended auth flow deposits a live credential at a path that git add -A will happily stage. These repos live on a shared org remote and exist to be pushed often — add-all then push is the normal documented workflow for indexing a task version. The failure is silent: nothing warns, and the file looks like ordinary local config.
Immediate fix in any existing clone, before persisting anything into it:
grep -qxF '.env' .gitignore || printf '.env\n' >> .gitignoreCheck whether older clones already committed one:
git log --all --oneline -- .envIf that prints anything, rotate rather than scrub history. It ages out in 30 days on its own, but stays live until then.
Upstream fixes, in order of value:
git check-ignore -q .env, and if it is not, append the rule first or fall back to the user-level store.goodturn env commands. A per-project copy buys little and multiplies the places a leak can originate.General lesson beyond this tool: when docs tell an agent to write a secret to a path inside a repo, the tool owns the matching ignore rule. Shipping the instruction without the rule is the bug.