Commit 3eb9516
fix(guardrails): count only nested segments against the reading budget
The 900-sibling substitution pin tripped the 2,048 budget: the tokenizer splits on parens, so that legitimate command holds about 2,700 top-level and body segments. Top-level segments are bounded by the command length, so only nested segments (a launcher, child shell, eval or resolved walk re-entering) are counted now, against 1,024; runuser -u x -s env -- nested 25 deep refuses in about 2.5 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent c59300b commit 3eb9516
3 files changed
Lines changed: 14 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments