Repository navigation
fix(skills): hard-code /tmp instead of $TMPDIR in worktree recipes - #559
Merged
Merged
Conversation
GitHub Actions runners leave $TMPDIR unset, so the nightly, running-in-ci, and review-runs worktree recipes expand "$TMPDIR/foo" to "/foo" and fail at `git worktree add` with `Permission denied`. Hard-code /tmp and explain the trap inline so a future maintainer doesn't reintroduce $TMPDIR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
max-sixty
added a commit
that referenced
this pull request
May 19, 2026
## Summary Release 0.0.25. 8 PRs since 0.0.24: - #566 review: push fixes to bot PRs by default, even when the fix needs a judgment call - #563 skills(running-tend): drop stale session-log count - #562 skills: drop dollar-amount cost asides corrupted by arg substitution - #526 fix(list-recent-runs): anchor completion window to the intended cron tick - #559 fix(skills): hard-code /tmp instead of $TMPDIR in worktree recipes - #560 fix(enrich-tend-outage-issues): batch into one comment per issue - #557 config: switch review-reviewers back to claude, demote codex-auth-refresh to reference - #556 config: switch tend's own harness back to claude #566 is the reason for cutting now: it flips the bot-PR review default from "push only mechanical fixes" to "push the fix whenever the review can articulate it, defer only when no defensible default exists." The behavior is release-gated, so it only reaches tend's own dogfooded workflows (and adopters like PRQL) once 0.0.25 is published and the nightly regen repins the action ref. No new breaking changes since 0.0.24. ## Test plan - [ ] CI green (test, test-worker, lint) - [ ] After merge: tag `0.0.25`, PyPI publish (`pypi-release.yaml` on the tag push), `uvx tend@0.0.25 --help` works - [ ] Regenerate tend's own workflows to `@0.0.25` (separate `chore: regenerate` PR, after the tag exists) Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
nightly,running-in-ci, andreview-runsskills tell the bot to do work in a worktree under$TMPDIR. GitHub Actions runners leave$TMPDIRunset, so the recipe expands"$TMPDIR/tend-update-workflows"to"/tend-update-workflows", whichgit worktree addrejects withfatal: could not create leading directories of '/tend-update-workflows/.git': Permission denied. Hard-code/tmpinstead, with a one-line explanation in each skill so a future maintainer doesn't reintroduce$TMPDIR.Why
cargo-affected-bothit this twice on consecutive nights running the bundlednightlyskill:git worktree add "$TMPDIR/tend-update-workflows"failed; the subsequentcdfailed;uvx tend@latest initran in the main checkout and wrote workflow changes that the bot then had togit checkout -- .github/workflowsto revert.export TMPDIR=/tmpand rerunning the recipe.Both runs eventually produced the correct PR, but each one burned bash cycles and tokens on the recovery dance, and the first one polluted the main checkout in passing. The fallback "succeeded" only because nothing was committed before the revert — a slightly different recipe ordering would have shipped a broken workflows update.
The same
$TMPDIRpattern inrunning-in-ciandreview-runsis unexercised so far this month but would fail identically the first time a bot tries to update a.claude/skills/file under those recipes.$TMPDIRwas introduced as "the tempdir env var" in #216, #219, and #328, apparently from local shells where it was set. GHA'subuntu-latestdoes not set it.Evidence gist: https://gist.github.com/da54a63f2b2042b0c3db2fd971a90a87
What changes
plugins/tend-ci-runner/skills/nightly/SKILL.md— workflow-regen recipe writes to/tmp/tend-update-workflows,/tmp/tend-old-ver,/tmp/tend-update-body.md. Updated prose links the worktree to/tmpand notes why$TMPDIRis not used.plugins/tend-ci-runner/skills/running-in-ci/SKILL.md— skill-PR recipe writes to/tmp/skill-fix. Same prose update.plugins/tend-ci-runner/skills/review-runs/SKILL.md— skill-edit recipe writes to/tmp/review-runs-fix. Same prose update.Only the three skill recipes change. No script or workflow changes.
Test plan
/tmp/tend-update-workflowswithout thePermission deniedstumble or thegit checkout -- .github/workflowsrecovery step.