sbx: document overriding agent settings from a kit#25160
Conversation
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟡 NEEDS ATTENTION
Two medium-severity issues found in the new content — both on the same closing sentence of the new kit-examples.md section. The overall approach (using commands.startup with a heredoc) is sound and the docs are clear. No redirects needed (new content only).
| ``` | ||
|
|
||
| Startup commands replay on every sandbox start, so the script must be | ||
| idempotent. The `cat > … <<EOF` pattern above overwrites cleanly each |
There was a problem hiding this comment.
[MEDIUM] Word "above" used — style guide requires "previous"
The prose says "The cat > … <<EOF pattern above overwrites cleanly each time." The STYLE.md word list explicitly maps above → previous. Change to: "The cat > … <<EOF pattern previously shown overwrites cleanly each time." (or rewrite to avoid the reference entirely).
There was a problem hiding this comment.
Reworded to "the heredoc pattern" — sidesteps both the above → previous style rule and the <<EOF vs <<'JSON' mismatch. Added heredoc to the Vale vocabulary.
There was a problem hiding this comment.
Perfect — "the heredoc pattern" is clearer than either the original reference or my suggestion. It names the technique directly instead of pointing backward, and it neatly avoids the <<EOF vs <<'JSON' mismatch I didn't catch. Thanks for the vocabulary addition too!
| ``` | ||
|
|
||
| Startup commands replay on every sandbox start, so the script must be | ||
| idempotent. The `cat > … <<EOF` pattern above overwrites cleanly each |
There was a problem hiding this comment.
[MEDIUM] Prose says <<EOF but the code uses <<'JSON' — misleading description
The explanation reads "The cat > … <<EOF pattern…", but the YAML example above it uses <<'JSON' as the heredoc delimiter (with a quoted delimiter to prevent variable expansion). Calling it <<EOF doesn't match the actual code and could confuse readers who look at the example and see JSON, not EOF. Suggest: "The cat > … <<'JSON' heredoc pattern…" or simply "This heredoc pattern…".
There was a problem hiding this comment.
Reworded to "the heredoc pattern" — sidesteps both the above → previous style rule and the <<EOF vs <<'JSON' mismatch. Added heredoc to the Vale vocabulary.
There was a problem hiding this comment.
Perfect fix! Using "the heredoc pattern" is clearer and avoids both the delimiter mismatch and the directional reference. Thanks for the quick turnaround and for adding heredoc to Vale's vocabulary — that'll help keep the terminology consistent across the docs.
Sandboxes write settings files for some built-in agents (such as /home/agent/.claude/settings.json for the claude agent) via a PostStart hook in vm_configurator.go, which fires after kit static files and initFiles. Document the overwrite behavior in kits.md and add a worked commands.startup example in kit-examples.md.
bd0abfd to
1bdda1a
Compare
Summary
Static files and
initFilescan't override paths the active agent writes during its own setup (such as/home/agent/.claude/settings.json), because the agent's setup runs after kit injection. This surfaced from user feedback on the kits page.kits.md(Inject files): short conceptual note that workspace files work as static files, but user-scope paths under/home/agent/get overwritten, with a pointer to the example.kit-examples.md: new "Override agent settings" section with acommands.startupworkaround using a heredoc.Generated by Claude Code