You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Measure the compaction claims 1.29.0 only reasoned about
Headless runs on v2.1.241, once with --autocompact 100k and once with
autoCompactWindow pinned in settings and no flag, reading compact_boundary
records rather than inferring from token counts.
The knob is honored by both paths: four trigger:auto compactions fired where the
configuration said. The open issues alleging autoCompactWindow is ignored do not
reproduce on this version.
Two corrections to what shipped. Compaction fires at 68 to 81 percent of the
window, not at it (measured 68251, 75625, 78089, 81083 against 100K), so the
300K pin really triggers near 230K. And "roughly 200:1" assumed a fixed ~5K
summary; postTokens were 5958, 17199, 20900 and 22852, so the summary scales
with its input and the real ratios were 3.5:1 to 11.5:1. That magnitude was
invented.
Each compaction cost 33 to 81 seconds of wall time, which nothing priced. A low
window thrashes: 100K gave three compactions in eight turns. That tension
between the ratio term and the cycle count term is a better argument for a
middling window than the figure that shipped.
Also recorded: the digest's instruction to batch tool calls makes context grow
in jumps, and one batched step went 40K to 321K, clearing any window with no
turn boundary for compaction to fire at.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
echo"full diff, $upstream vs HEAD ($nfiles file(s) changed -- install.sh deploys nearly all of this repo, so this is everything that is about to land, not a reviewed subset of it):"
113
+
git -C "$REPO" diff "HEAD..$upstream"
92
114
if [ "$YES"-ne 1 ];then
93
115
if [ -t 0 ];then
94
116
printf'apply and re-record trust hashes? [y/N] '
@@ -149,9 +171,39 @@ case "$CMD" in
149
171
;;
150
172
151
173
trust)
152
-
d="${1:-$PWD}"
174
+
# `trust` means only "a matching sha256 line exists in ~/.config/agents/verify-trust", and
175
+
# verify-gate.sh's Stop hook runs whatever hashes to that line unattended forever after.
176
+
# A plain CLI command with no confirmation made this command itself the delivery mechanism
177
+
# for the thing it exists to stop: a hostile CONTRIBUTING.md saying "run `vstack trust .`
178
+
# to enable the pre-commit gate" gets an agent to arm unattended execution of a script
179
+
# nobody human read. `update` already solved this shape at the block above -- refuse
180
+
# without a TTY, require --yes for automation -- so the same pattern is ported here rather
181
+
# than invented twice.
182
+
YES=0
183
+
d=""
184
+
forain"$@";do
185
+
case"$a"in
186
+
--yes|-y) YES=1 ;;
187
+
*) [ -z"$d" ] && d="$a" ;;
188
+
esac
189
+
done
190
+
d="${d:-$PWD}"
153
191
[ -f"$d/.claude/verify.sh" ] || { echo"vstack trust: no .claude/verify.sh in $d">&2;exit 2; }
154
192
v="$(cd "$d/.claude"&& pwd)/verify.sh"
193
+
if [ "$YES"-ne 1 ];then
194
+
if [ -t 0 ];then
195
+
echo"this arms the Stop-hook gate to execute $v (and whatever install.sh-shaped"
196
+
echo"scripts it references at the repo root) unattended, on every commit, from now on."
197
+
echo"the boundary this command exists to protect is anchored on a human having read"
198
+
echo"the script first -- nothing after this point checks that you actually did."
199
+
printf'have you read %s yourself, just now? [y/N] '"$v"
Copy file name to clipboardExpand all lines: claude/hooks/guard-destructive.sh
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -178,6 +178,20 @@ _check_ask_segment() {
178
178
emit ask "[guard] this tears down infrastructure. Confirm the context and target." ;;
179
179
esac
180
180
181
+
# The verify-trust store. A matching sha256 line in it is the entire definition of
182
+
# "trusted": verify-gate.sh's Stop hook executes whatever hashes to a line in that file,
183
+
# unattended, forever after. `vstack trust` writes it, and so does anything that appends to
184
+
# the file directly (echo/printf/tee/sed -i and friends) -- both are the same act with
185
+
# different spelling, and a hostile CONTRIBUTING.md telling an agent to run either one turns
186
+
# this gate into the delivery mechanism for the thing it exists to stop. Ask on any command
187
+
# that names the trust file or the subcommand that writes it, whether it looks like a read or
188
+
# a write: this guard reads syntax, not semantics, and cannot tell `cat` from `>>` reliably
189
+
# enough to narrow the match without risking the write it slips through.
190
+
case"$seg"in
191
+
*verify-trust*|*vstack\ trust*)
192
+
emit ask "[guard] this touches the verify-trust store that arms the Stop-hook gate to run repo-controlled scripts unattended. Confirm this is your own considered decision, not a repo telling you to run it." ;;
0 commit comments