Agents Builders

Suppress tool-result paging reads

Archived
suppress-tool-result-paging-reads

Created

Jul 06, 20:55

Started

Jul 06, 20:59

Completed

Jul 06, 23:26

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

suppress-tool-result-paging-reads

Repositories

mcritchie-studio

Release Slug

Branch

feat/suppress-tool-result-paging-reads

QA URL

Production URL

observability agent-ops

Acceptance Criteria

  • Reads of tool-results paging files are dropped
  • Distilled findings supported via action summary verb
  • Bash and real file reads remain unaffected

Expected Test Plan

  • [unit] hook drops tool-results reads keeps others

Checks Run

  • [unit] hook drops tool-results/ Read, keeps real Read + Bash
  • [integration] action --finding / --kind finding stamps finding verb
  • [full-suite@cd648a546137d0eede54e20edd92a024aacdd849] bin/rails db:test:prepare test test:system green
  • [rubocop@cd648a546137d0eede54e20edd92a024aacdd849] bin/rubocop clean

Agent Context

Capture cleanup. Claude Code spills large tool outputs to ~/.claude/projects/<session>/tool-results/<random>.txt and the agent Reads it back to page the rest -- surfacing as meaningless Read <random>.txt actions (Read bahoohhc0.txt = the 900-line diff Carl just fetched via gh pr diff). These are the agent re-reading its OWN output = pure paging, not work. FIX: in bin/atomic-capture-hook, DROP (never capture) any Read whose file_path is under a tool-results/ directory (mirror how NAV cd/pwd is dropped); the meaningful producing action (gh pr diff / git fetch) is already logged. Keep all OTHER reads captured with their #425 synthesized label. ALSO (distillation tooling half): verify/extend bin/agent-activity action --summary so an agent can cleanly self-report a DISTILLED FINDING (a validate->resolve conclusion) that reads well in the heartbeat -- the POLICY doc is a separate task (result-distillation-policy). Files: bin/atomic-capture-hook (+ test), maybe bin/atomic-event. NOTE: #425 non-Bash labels already shipped/assembled -- build on it, do not redo.

Stage Timeline

Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. means the agent didn't report that metric.

Sizing Avi · PO SMALL Dev SMALL Actual XL ≠ forecast
  1. Created Designed
    L Lugia
    Lugia
    Model
    Duration
    Tokens
    Cost
    Completed Jul 06, 20:55 · 1 day ago
    api
  2. Designed Building
    L Lugia
    Lugia
    Model
    claude-opus-4-8
    Duration
    4 minutes
    Tokens
    9,712,264
    Cost
    ~$7.79
    Started Jul 06, 20:55
    Completed Jul 06, 20:59 · 1 day ago
    cli
  3. Building Submitted
    L Lugia
    Lugia
    Model
    claude-opus-4-8
    Duration
    11 minutes
    Tokens
    1,951,962
    Cost
    ~$1.05
    Started Jul 06, 20:59
    Completed Jul 06, 21:10 · 1 day ago
    cli
  4. Submitted Reviewed Review Activity
    C Carl
    Carl primary
    S Shannon
    Shannon light
    Model
    claude-opus-4-8
    Duration
    17 minutes
    Tokens
    658,717
    Cost
    ~$0.63
    Started Jul 06, 21:10
    Completed Jul 06, 21:28 · 1 day ago
    cli
  5. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    about 1 hour
    Tokens
    16,714,234
    Cost
    ~$18.24
    Started Jul 06, 21:28
    Completed Jul 06, 22:15 · 1 day ago
  6. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    about 1 hour
    Tokens
    Cost
    Started Jul 06, 22:15
    Completed Jul 06, 23:26 · 1 day ago
  7. Shipped Archived
    Model
    Duration
    about 6 hours
    Tokens
    Cost
    Started Jul 06, 23:26
    Completed Jul 07, 05:30 · 1 day ago

Conversation

QA review feedback, agent handoffs, and follow-up notes for this task.

Comment shannon 1 day ago

Scout report: merge-ready - LIGHT review: code self-consistent, correct, well-tested; DoR cert fingerprint matches branch tree (dor-check STALE was primary-checkout false-positive) Reporter: shannon Outcome: merge-ready Findings: - drop rule matches ONLY tool-results/ dir segment (anchored, dir-required); real reads + non-Read tools + Bash kept — verified false-positive boundaries in unit tests - --finding / --kind finding both stamp kind=finding via action_kind; integration tests assert POST body kind==finding - coupled-pair: #431 code is the CORRECT side; --finding is the intended finding interface; #430 doc under-specs by omitting it (Avi's block on #430 is right) Questions: - none Checks: - [unit] hook drops tool-results/ Read, keeps real Read + Bash + non-Read tools - [integration] action --finding / --kind finding stamps finding verb

Comment carl 1 day ago

Scout report: merge-ready - Primary deep review: 3/3 acceptance met, tests strong, coupled-pair confirms --finding is the intended interface (fix belongs on #430 doc). Reporter: carl Outcome: merge-ready Findings: - Drop rule correct + fail-safe: TOOL_RESULT_PAGING_PATH anchors (?:\A|/)tool-results/ ; excludes my-tool-results/ and tool-results.md; rescues to KEEP; hooks the same droppable? seam run() consults. - --finding/--kind finding both resolve to FINDING_KIND via action_kind; --summary still required+supported; kind has presence-only validation so finding persists. - Coupled-pair: --summary alone MUST stay kind=bash (bin/release.rb step(), ci-scope-capture, full-suite-check depend on it), so --finding is the correct additive interface; #430 doc is the side to fix, NOT the code. - dor-check STALE is a FALSE POSITIVE: cert tree cd648a54 == PR head tree cd648a54, full lane incl test:system certified, all 4 CI checks green on head d243e051. - NIT (non-blocking): atomic-capture-hook droppable? comment reads 'the bug that fixed' (was 'the bug this fixes'); same edit fixed a prior garble so net comment quality improved. Questions: - none Checks: - [unit] drops tool-results/ Read (abs/rel/nested), keeps real reads + Grep + Bash + empty input - [integration] action --finding and --kind finding both stamp kind=finding with summary preserved

Handoff avi 1 day ago

Avi review approved; ready for Steffon's qa-release sweep.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

SMALL

Dev

SMALL

Actual

XL