Skip to content

perf(read): claude task .out logs pass through unfiltered (0% savings, frequent) #11

Closed

Description

@thehoff

Summary

Plain-text Claude subagent output files under /private/tmp/claude-*/tasks/*.out are read often during multi-agent runs and consistently produce 0% savings. ~20K tokens of unrealized savings across observed history.

Reproduction

sqlite3 ~/Library/Application\ Support/rtk/history.db \
  "SELECT original_cmd, input_tokens, savings_pct FROM commands
   WHERE original_cmd LIKE '%claude-%/tasks/%.out%'; "

Fix (proposed)

Either:

  • (a) Detect *.out path under /private/tmp/claude-*/tasks/ (or any claude-* task dir) and route through the rtk log filter (dedup + truncate)
  • (b) Treat .out extension as a log file by default with head/tail truncation above N tokens

Option (a) is more targeted; option (b) covers more cases but risks over-truncating legitimate uses.

Dependency

Should land after #12 (unknown-extension token cap) — that fix would already cap these files automatically; this issue then becomes a refinement to route them through the smarter log filter instead of generic head/tail.

Test plan

  • Snapshot test on a fixture .out log with repeated lines, verify dedup applies
  • Verify regular .out files outside the claude path are unaffected

Activity

  1. thehoff commented on May 18, 2026

    @thehoff
    OwnerAuthor

    Closing as superseded + design rejected on reflection.

    Superseded by #12: the unknown-extension cap that landed (5K token threshold, symmetric 80/80 head/tail, 2-line marker with contextcrawler proxy cat <path> escape hatch) already protects against accidental cat of these .out files. They no longer pass through verbatim — they get capped automatically when oversized.

    The original proposal (route through rtk log for dedup) is actively wrong:

    • These files are unique sequential subagent transcripts (tool calls, reasoning, decisions, results), not repetitive log noise
    • The log filter would collapse legitimately distinct lines and lose meaningful agent decisions
    • The harness explicitly warns against full-reading these files anyway ("reading it will overflow your context" per the SessionStart reminders), so aggressive truncation by the cap is desirable, not lossy

    If a specific transcript genuinely needs full content, the escape hatch in #12's marker line tells the reader how to recover it. No further special-casing of claude-*/tasks/*.out paths needed.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions