Skip to content

Agent speed guards: batch hint, poll-loop guard, read-size guard, short t3-capacity #1150

Done

Description

@scuttletoby

Problem

A study of 4,682 past agent sessions (10-07 to 11-27, both accounts plus Codex) shows where agent time and context go. Each turn costs about 10 s and re-sends about 105k tokens, so fewer turns and smaller results are the main levers:

  • 93% of tool turns make one call; up to 89 h and 3.4 G tokens went on turns that could have been merged with the one before.
  • Waits took 401 h (39% of tool time); re-polling after a poll cost 0.96 G tokens.
  • Results over 20k characters carried 3.2 G tokens; 2,073 whole-file Reads were over 20k characters.
  • Of 1,051 guard refusals, 606 were capacity-pipe-guard; t3-capacity --help crashes.

Change (fork-kit/agent-guards, fork files only)

  1. batch-nudge (advisory, never refuses): after a turn with a single read-only call, add a short hint to batch independent reads into one call.
  2. poll-loop-guard: refuse a Bash command that sleeps in a loop to wait for CI, a PR or a background job; the message points to the T3 wait tools ("push and stop").
  3. read-size-guard: refuse a whole-file Read of a file over a size limit (config, default 20k characters) without offset/limit; the message names the line count and suggests a range or grep.
  4. t3-capacity: one short line of output (OK/NOT OK, free MB) so agents don't need to pipe it; fix --help.

Each guard: config in the machine file (on/off, limits), tests (refuses / lets through / bad input), and an agent-guards check line. Off-switch per guard.

Done when

Kit tests pass, the guards are in a ci-release, and the facts row is updated. A rerun of the agent-history report a few days after install shows the effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions