Skip to content

ANSI escape codes not stripped from structuredContent #12

@bananabot9000

Description

@bananabot9000

Description

ANSI escape codes are stripped from the content text blocks but not from structuredContent. When a program outputs coloured/formatted text (e.g. ls --color, test runners, linters), the structured output contains raw escape sequences like \x1b[32m.

Impact

  • Wastes tokens on invisible formatting codes
  • Could confuse model interpretation of structured results
  • Inconsistency between content and structuredContent for the same execution

Expected behaviour

Both content and structuredContent should have ANSI codes stripped. See #13 for the broader fix (unifying both output paths).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions