Skip to content

security-audits: void_loop hits 2M maxInputTokens cap (~250k tokens/turn) on ~194-file full scan, preventing initial lastSuccessfulScan #966

Backlog

Description

@iPLAYCAFE-dev

Environment

  • Void version: void@1.12.2 (stock self-hosted platform on Cloudflare Workers + Containers, --security-audits, security policy public)
  • 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

  1. 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.
  2. 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.
  3. 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.

Activity

  1. hyfdev commented on Nov 29, 2026

    @hyfdev
    Contributor

    Thanks for the detailed numbers.

    #978 should keep maxInputTokens from 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-1 start timed out.

  2. iPLAYCAFE-dev commented on Nov 29, 2026

    @iPLAYCAFE-dev
    ContributorAuthor

    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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions