Skip to content

Filter injected system-reminder messages from session transcripts #51

@jcleira

Description

@jcleira

Description

When parsing AI agent session transcripts (Claude Code or others), detect and filter out messages that consist entirely of <system-reminder>...</system-reminder> content injected with the user role by tooling. For mixed messages, strip the system-reminder tags and preserve the real user content. These injected messages should not be counted as user prompts in attribution or checkpoint metadata.

Why

Tools that augment Claude Code sessions inject system-reminder blocks as user-role messages. Without filtering, these inflate user prompt counts and pollute checkpoint attribution data, misrepresenting what the human actually typed.

Source

Target Repos

  • cli

Acceptance Criteria

  • Messages consisting entirely of <system-reminder> content are excluded from extracted user prompts
  • Mixed messages (system-reminder + real content) have the reminder tags stripped before inclusion
  • Normal user messages without system-reminder tags are unaffected
  • Prompt count in checkpoint metadata reflects only genuine user prompts
  • Unit tests cover pure system-reminder, mixed, and normal message cases

Context Hints

  • cmd/
  • internal/

Comment /minion build or add the minion-approved label to begin implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions