skills(running-tend): note cargo needs $HOME/.cargo/env in the tend sandbox#3361
skills(running-tend): note cargo needs $HOME/.cargo/env in the tend sandbox#3361worktrunk-bot wants to merge 2 commits into
Conversation
…andbox Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
worktrunk-bot
left a comment
There was a problem hiding this comment.
The core guidance is correct and matches what I see running in this same sandbox: cargo is a rustup shim at $HOME/.cargo/bin/cargo, that directory is absent from PATH, and $HOME/.cargo/env exists — so sourcing it before the first cargo call is the right fix.
One factual correction: the closing parenthetical claims rustc/clippy are already on PATH. They aren't. In the sandbox the entire toolchain (rustc, clippy-driver, cargo-clippy, rustfmt, cargo) lives in $HOME/.cargo/bin, and none of them are on PATH (verified: PATH contains no .cargo/bin, and command -v rustc returns nothing). Leaving the line as-is could send a future run down exactly the probe-and-retry path this note is meant to prevent — e.g. a bare rustc --version toolchain check would also fail. Sourcing the env fixes all of them at once, so the suggestion reflects that.
|
@worktrunk-bot review pls |
rustc/clippy/rustfmt/cargo all live in $HOME/.cargo/bin and none are on PATH in the sandbox (verified: command -v rustc returns nothing). The prior parenthetical claimed rustc/clippy were already on PATH, which would send a run down the probe-and-retry path this note prevents. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Reviewed. The core guidance is correct — I verified it in this same sandbox: One factual error remained from the earlier review pass: the closing parenthetical claimed Verification |
|
can we fix by setting this up better? |
|
Good instinct — and yes, this should be fixed at the source rather than papered over in the skill. But the source isn't in worktrunk; it's the tend sandbox, and worktrunk can't reach the lever. Here's what I found tracing it in this same sandbox: Root cause. The agent runs as a separate The toolchain is present in the sandbox home — Why worktrunk can't fix it locally. The sandbox env is rebuilt from scratch ( The proper fix is one line upstream in Recommendation: merge this note as the interim mitigation (it's accurate and cheap), and land the |
What
Adds a note to the
running-tendTest Commands section thatcargois installed at$HOME/.cargo/binbut not on the tend sandbox's defaultPATH, so the first barecargo …call in a run fails withcargo: command not found. The fix is to source$HOME/.cargo/env(or prepend$HOME/.cargo/bintoPATH) before the first cargo command instead of discovering the location after a failure.Why
This is a recurring, structural papercut: any tend run that compiles Rust in the sandbox hits it, and the model then spends a probe + retry recovering. It fired twice in the 24h window ending 2026-07-04, in two different workflow types:
cargo check --lib→cargo: command not found→ probe (command -v rustc; ls ~/.cargo/bin; … [ -f "$HOME/.cargo/env" ]) → retry with. "$HOME/.cargo/env".cargo check --lib→cargo: command not found→ probe ({ [ -f "$HOME/.cargo/env" ] && . …; }; which cargo …; export PATH="$HOME/.cargo/bin:$PATH") → retry.Plus two prior occurrences recorded in the review-runs tracking issue #3349 (the "cargo discovery dance" first logged 2026-06-29 and again 2026-07-01), where earlier runs deferred the note because the manifestations were preemptive probes rather than actual failures. This window both occurrences were real
cargo: command not foundfailures, and the pattern now spans nightly and mention — not just nightly — so the earlier watch's escalation condition is met.Gate assessment
PATH), 4 total occurrences across two weeks and two workflow types (2 this window + 2 historical). Passes Gate 1.Verification
The added command matches exactly what both recovering runs used to fix their
PATH(. "$HOME/.cargo/env"/export PATH="$HOME/.cargo/bin:$PATH"). The probe outputs confirm~/.cargo/bincontainscargoand$HOME/.cargo/envexists in the sandbox. Documentation-only change to a skill overlay — no code, no tests.