Skip to content

Output filtering causes AI agents (Claude Code) to burn extra tokens on retry loops #831

Open

Description

@BadassBison

#791 (fix)
#871 (doc updates)

Activity

  1. added
    bug
    filter-quality
    on Mar 26, 2026
  2. pszymkowiak commented on Mar 26, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟡 Priority medium
    🎯 Confidence 76%

    Summary

    Output filtering is too aggressive, causing AI agents (e.g., Claude Code) to miss error signals and enter retry loops that waste tokens; fix PRs already merged/in-progress, and a new opt-out PR #1848 is open.


    Triaged automatically by wshm · This is an automated analysis, not a human review.

  3. BadassBison commented on Mar 30, 2026

    @BadassBison
    ContributorAuthor

    @pszymkowiak - This work is still open. Is there anything else needed to get this in?

  4. BadassBison commented on Apr 2, 2026

    @BadassBison
    ContributorAuthor

    @pszymkowiak What is the time line for getting this work in? We are trying to get it moved off our board, and promote more usage of this tool at our company

  5. bb1 commented on May 12, 2026

    @bb1

    Related: #1848 adds a skill file that teaches agents about the RTK_DISABLED=1 env prefix, so they can self-bypass rtk when compressed output causes retry loops — rather than repeating the same command with minor variations until a human intervenes.

  6. Keesan12 commented on Jun 4, 2026

    @Keesan12

    The failure mode here sounds less like "filtering is expensive" and more like "the system keeps paying to rediscover the same state."

    If output filtering can cause another full retry, I would want one cheap fingerprint before the next attempt starts: same tool path, same target, same normalized failure, same output class. If that fingerprint matches the recent history, the default should be stop or downgrade, not try again at full price.

    A lot of agent cost bugs are really admission bugs. The expensive part is not the first bad turn. It's that the next nearly-identical turn was allowed in at all.

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

    area:clibugfilter-qualityhelp wantedpriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions