Repository navigation
Claude Code skills run their start step as they load, so it can't be skipped (GST-3157) - #4509
Merged
Merged
Conversation
…skipped (GST-3157) In Claude Code, each gstack skill now loads the shared preamble and the start command's output while the skill loads, through bin/gstack-skill-load, instead of asking the model to read a file and run a command. Other hosts keep the instruction text. Size caps are raised to the measured values per Garry, 2026-11-19, "Do it" on I1. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
The Claude Code render now shows the load-time start line and a short fallback sentence between the Preamble heading and the bash block, so the test finds the first bash block after the heading instead of expecting it on the next line. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…tart's output, and reads its timeout as decimal Review-Finding: p1/specialist-batched#1 reader=security Review-Finding: p1/specialist-batched#3 reader=testing Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/red-team#2 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…installs served from a render directory load it too Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ut and shared preamble Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 tasks done
capy-ai Bot
added a commit
that referenced
this pull request
Nov 19, 2026
…ll loaded (#4543) Since #4509, Claude Code skills run their start step as they load, so the paid /plan-ceo-review auto-decide check could miss a run that really did auto-decide. It now accepts the start output in the loaded skill text. Why: one of the five passing runs captured for that check was credited only through the session journal, and that path needed a start command in the tool calls. Nothing to do: this changes test code and the journal reader the tests use; no skill text changes. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
capy-ai Bot
added a commit
that referenced
this pull request
Nov 20, 2026
- Two /ship approval records stop needing workarounds. (#4549) - For contributors: the paid auto-decide check counts a start step that ran while the skill loaded. (#4543) - The destructive-command check closes three ways past its disk-wipe and force-push blocks. (#4534) - A green CI run still counts when the repository's artifact storage is full. (#4536) - `/cso` now audits repositories that track symlinks. (#4567) - A doc-sync eval stops failing when the audit child drops one field from its result line. (#4555) - The browse daemon no longer picks port 10080, which Chromium refuses to open. (#4554) - Opted-in telemetry now says why a skill run ended, which coding agent and model family ran it, and whether an upgrade worked. (#4542) - A preregistration with only its write-up and plain data now gets the write-up review: one reviewer, one round. (#4544) - When owner rulings don't clear a stopped review, `gstack-review-read` now says which findings are left. (#4553) - The prompt-routing hook now names your installed bug-fix skill on bug reports, alone, and never puts /verify ahead of it. (#4539) - Owner rulings now close a stopped review whose findings were logged in a findings file. (#4568) - /ship can finish after the owner accepts a stopped review's findings as open notes. (#4552) - /ship no longer starts the full test suite on your machine when CI's earlier run can't be reused (GST-3277). (#4565) - The prompt-routing hook no longer acts on words inside backticks. (#4566) - In Claude Code, a gstack skill's start step now runs when the skill loads, so the model can't skip it. (#4509) - gstack's telemetry backend only accepts writes through its own validated endpoint, and the community dashboard now counts real use. (#4537) - gstack now says what it's adding before it adds a background job or a browser extension. (#4538) - For contributors: every flaky pass in Free Tests is now recorded. (#4572) - For contributors: Free Tests on pull requests starts its test shards one round of small jobs sooner. (#4570) - Secret values written as `name=value` at the end of a path are now hidden. (#4571) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.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.
In Claude Code, every gstack skill now runs its start command and loads the shared preamble while the skill loads, so the model starts with their output instead of an instruction it can skip.
Why: in test runs, loaded skills' steps were followed in only 45% to 62% of sessions, and /autoplan's start command never ran in 5 of 10.
Nothing to do: other hosts keep today's instructions, and if Claude Code can't run the step, the skill says so and the model runs it as before.
What changed
People running a gstack skill in Claude Code saw the model skip its start step. The instruction to run it sat in the skill text, and in test runs it was followed in only 45% to 62% of sessions. Now Claude Code runs the step itself while the skill loads, so the model starts with the step's output already in front of it.
!\command`lines while it loads the skill and puts their output into the skill text. Each Claude Code skill now has two such lines: one prints the shared preamble file (sections/preamble.md), the other runsgstack-skill-start`. The plain start command stays right below as the fallback.bin/gstack-skill-load. Claude Code aborts the whole skill load when an injected command exits non-zero, so the helper always exits 0. It stops the start after 15 seconds (GSTACK_SKILL_LOAD_TIMEOUT), killing everything the start launched, keeps any output the start printed before the limit, and turns any failure into one line that tells the model to run the start itself. It closes stdin and sends the start's output to a temp file, so nothing left running can hold Claude Code's pipe open. It runs nothing beyond whatgstack-skill-startalready does, network included.# gstack shared preamble <id>), so it can't be pointed at another file. This works for every install layout, including installs served from a render directory.Bashinallowed-toolsdoesn't let an injected command run. The classifier or a prompt decides, and anything short of "allow" aborts the load. So each Claude Code skill'sallowed-toolsalso names the helper (Bash(~/.claude/skills/gstack/bin/gstack-skill-load:*)), which Claude Code allows in every mode.Why
"Loaded skills' steps were followed in only 45% to 62% of sessions, and /autoplan's start command never ran in 5 of 10." Running the start step at load means the model can't skip it, so every Claude Code skill begins with its session state, settings and preamble in context.
Blast radius
Only Claude Code skill files change, and the other hosts' generated skills are byte-identical, and of the four ship goldens only the Claude one changed (script ran:
gen:skill-docsfor every host plus the golden tests). The new helper can't break a load by exiting non-zero, because every path throughbin/gstack-skill-loadends inexit 0(walked failure path, covered bytest/gstack-skill-load.test.ts).Which hosts get which
disableSkillShellExecutionon, or any agent that reads a Claude skill file directly (Capy, for example): it sees the command or Claude Code's placeholder, and the text tells it to run the start command and read the preamble itself, as before.Known limits, queued for a follow-up
bin/gstack-skill-load, makes Claude Code abort the skill load instead of falling back to the plain instruction.gstack-skill-startBash call may miss the start, because it now runs at load and makes no tool call.Proof on the real claude binary ($0, local stub API)
The real
claudebinary ran/autoplanagainst a local stub that logs each request body, with this branch installed in a fresh HOME. In every run below, the first request already held the shared preamble (# gstack shared preamble d8804c5ab6bf) and the start's STATUS lines (SESSION_ID:and the rest), with no tool call.SKILL_START: failed at load (exit 127)line; the skill still loadeddisableSkillShellExecutionProbes with a dummy skill showed why the helper and the grant are needed. On both versions, a non-zero exit, a missing command or a deny rule aborted the skill load with no API call. In plan mode, a bare
Bashgrant aborted the load, and a specificBash(<path>:*)grant ran the command. A PreToolUse hook's "allow" did not help.Size caps raised (Garry, 2026-11-19, "Do it" on I1 (GST-3157))
Each Claude Code skill file grows by about 380 to 400 bytes, plus one 58-byte frontmatter line. Each cap is set to the value measured on this tree:
test/fixtures/context-budget.jsonalwaysOnTotal: 8,647 to 9,498 tokens. The counter includes every skill's whole frontmatter, so the grant line costs about 399 tokens there. Claude Code's skill list shows only names and descriptions.test/helpers/carve-guards.ts: 15 skeleton caps and 9 size-ratio caps (design-html gets its own ratio in place of the 1.05 default).test/size-ledger/ship: one +378-byte entry.Pre-Landing Review
No blocking issues. The final full review of this head found nothing that would fail a test, break production or lose data; its six notes are listed below and none is fixed here. Second-model review (GPT-6.1 Sol): clean.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
scripts/resolvers/load-injection.ts:271. A missing or uncallable helper now stops the skill from loading at all (scripts/resolvers/load-injection.ts:27,generate-preamble-bash.ts). The module's own header says a non-zero!command aborts the whole skill load. The rendered line calls the helper at a fixed path,~/.claude/skills/gstack/bin/gstack-skill-load, or an install-root rewrite of it. When that file is absent, the shell exits 127 and the skill no longer loads. That happens when an install outside the default path falls back to the committed render, for example when its first per-install render fails (setup keeps tscripts/resolvers/load-injection.ts:142. Sessions that deny Bash can no longer load any gstack skill (load-injection.ts:14-16, theaddLoadGrantgrant). The docstring says a!line whose permission check fails aborts the load. In Claude Code a deny rule outranks a skill'sallowed-toolsgrant. So a managed-settings deny on Bash, or--disallowedTools Bash, now turns every gstack skill into a load failure instead of a skill whose start step the model can't run. The changelog coversdisableSkillShellExecutionbut not deny rules. I did not run Claude Code to confirm this; the precedence is inferred from Claude Code's docbin/gstack-skill-load:573. The 15-second limit can kill the start mid-way through its daily brain pull and sync (bin/gstack-skill-load:57-75).gstack-skill-startruns a dailygit fetchplusmerge --ff-onlyin$GSTACK_HOMEandgstack-brain-sync --once. Both are network-bound (the low-speed limit alone allows 5 s of stall), and both are now inside the TERM-then-KILL of the whole process group. The brain lock clears locks whose pid is dead, and the drain treats an old.git/index.lockas abandoned, so I found no lasting corruption. The cost is a killed fetch on slow networks, no record of the pull, a 15-secondbin/gstack-skill-load:774. When the start fails at load, its own error message is dropped (bin/gstack-skill-load:77-80). On a non-zero exit the helper prints onlyfailed at load (exit N)and throws away$OUT, which holds the actionable text (for example "cannot resolve the gstack state root… reinstall with ./setup"). The model recovers by running the start again, but that costs a step. FIXABLE: print$OUT, or its last few lines, before the failure line. Severity: Low. Blocks: no.sf-df685ec1d8a7security finding, details recorded privatelytest/helpers/carve-guards.ts:7946. A trailing-whitespace line intest/helpers/carve-guards.ts:794(git diff --check). FIXABLE. Severity: Low. Blocks: no.Documentation
Status: updated (one factual edit, no blockers)
Scope: the branch skills-start-at-load-in-claude-code against base 5afef04, at a clean tree with head 7c87504. The change makes Claude Code skills run their start step and shared preamble at load time through
bin/gstack-skill-load. I audited the authored docs that describe the preamble, the generator and host behavior.Documentation health
Coverage debt: no user-facing troubleshooting entry covers the
SKILL_START: timed outorSHARED_PREAMBLE: not loadedlines. Diagram drift: none.Tests
test/gstack-skill-load.test.ts, hermetic skill runtime, exercised map, parity suite, preamble hoist, carve guards, skill size and context budgets): 83 passed, 0 failedNo paid eval: gstack-evals measures the effect after this lands.
Agent notes
Refs GST-3157
Approvals
Approved: yes (record r-6a68104214ad). The full approval record stays private.
Plan: approved (record r-0c0beb9d93c8)
Plan check: approved (record r-0c0beb9d93c8)
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=6 fixed=0 scope=frozen unbound=2 ledgers_read=3 dispatches=3
Ruled note: test/gstack-skill-load.test.ts:79:testing at af92614 ruled by Captain GStack Minder (GSTA-36) (relayed from GSTA-634:2026-11-19T21:25:04Z) at 2026-11-19T21:25:04.735Z: fixed by 7c87504 (30 s per-test timeout) under the one-round grant (approval a-9fab181d3bfb)