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
{{ message }}
Repository navigation
security-audits: void_loop hits 2M maxInputTokens cap (~250k tokens/turn) on ~194-file full scan, preventing initial lastSuccessfulScan #966
Scan model / engine:@cf/deepseek-ai/deepseek-v4.1-flash-1017 (void_loop)
App profile: Full scan of ~194 files (pnpm-lock.yaml present; ~99 server .ts/.tsx files + mapped modules)
Measurements on the Exact Same Deployment
maxInputTokens setting
Model calls
Input tokens
Output tokens
Metered USD
Result
lastSuccessfulScan
1,200,000 (default)
29
1,279,208
4,356
$0.0376
incomplete (token_cap), 0 findings
null
2,000,000 (server max ceiling)
32 (+3 turns for +800k cap)
2,034,125
6,931
$0.0571
incomplete (token_cap), 0 findings
null
Observations & Root Cause
By turns 29–32 of a ~194-file initial full scan, void_loop appears to resend the full accumulated tool-call history without compaction, reaching ~250k+ input tokens per turn — so raising maxInputTokens from 1.2M to the 2.0M server maximum (+800k tokens) only yields +3 model calls before hitting token_cap again.
Because incomplete (token_cap) never sets lastSuccessfulScan, subsequent deploys cannot transition to smaller incremental diff scans and continue repeating full scans that hit token_cap.
Related minor note: The very first standard-1 scanner container cold pull right after enabling security policy public exceeded the 120s start timeout (statusReason: infrastructure, failureCause: installation), whereas void platform security probe tests lite (~118ms). Once cached, subsequent standard-1 boots (~97s) succeeded.
Constructive Suggestions
Compact or prune older tool outputs / file contents in void_loop conversation history so token usage scales sub-linearly over multi-turn scans.
Support checkpointing or partitioning large initial full scans across resumable batches so an initial lastSuccessfulScan baseline can complete cleanly.
Expose --max-input-tokens (and --max-output-tokens / --model-calls-per-scan) on void platform security limits — currently /operator/v1/security/policy validates maxInputTokens up to 2,000,000, while the CLI only exposes --concurrency and --scan-timeout.
Thanks @hyfdev for the quick breakdown and for opening #978!
Counting cached input tokens at their cached rate (1/50) explains the 1.2M vs 2.0M numbers completely, and leaving the conversation history unpruned to keep those 93–94% cache hits makes total sense.
Once a Void release containing #978 ships, we'll upgrade, reset maxInputTokens back to the 1,200,000 default, and re-run a full scan on the same ~194-file app to verify how far it progresses within the 40-turn limit and whether lastSuccessfulScan completes, then report back here.
(Regarding the first standard-1 timeout: both subsequent rescans booted cleanly once cached, so that looks like a one-off first cold-pull exceeding 120s.)
Activity
hyfdev commentedon Nov 29, 2026
Thanks for the detailed numbers.
#978 should keep
maxInputTokensfrom stopping your scan this early, but another limit still could.By your costs, 93–94% of input came from the cache.
Void meters that at 1/50 of the full price, but counts it fully toward the limit.
With #978, the same calls would count as about 108,000 and 163,000 tokens.
If they were all in one session, its fixed 40-turn limit left about 11 and 8 turns.
You're right about the resent history, the baseline and the container sizes.
I left the history alone, because trimming it could lose cache hits and context the scan needs.
This issue stays open, since #978 doesn't cover resumable scans, the baseline or CLI flags.
I couldn't confirm why your first
standard-1start timed out.iPLAYCAFE-dev commentedon Nov 29, 2026
Thanks @hyfdev for the quick breakdown and for opening #978!
Counting cached input tokens at their cached rate (1/50) explains the 1.2M vs 2.0M numbers completely, and leaving the conversation history unpruned to keep those 93–94% cache hits makes total sense.
Once a Void release containing #978 ships, we'll upgrade, reset
maxInputTokensback to the1,200,000default, and re-run a full scan on the same ~194-file app to verify how far it progresses within the 40-turn limit and whetherlastSuccessfulScancompletes, then report back here.(Regarding the first
standard-1timeout: both subsequent rescans booted cleanly once cached, so that looks like a one-off first cold-pull exceeding 120s.)