Skip to content

Detect and skip binary files in checkpoint tree writes #191

@jcleira

Description

@jcleira

Summary

Add binary file detection to prevent large binary blobs from being written into checkpoint tree objects on the orphan branch.

What to implement

  • Binary detection — check file content for NUL bytes in the first 8KB before writing via git plumbing (hash-object, mktree)
  • Skip and record — exclude binary files from checkpoint trees and log skipped paths in metadata
  • Configurable allowlist — let users configure file extensions to always include or exclude

Why this matters

When agent sessions modify binary files (images, compiled artifacts, databases), these get written into checkpoint trees unnecessarily. Binary content provides no useful context for understanding reasoning behind code changes, but it inflates the git object database and slows push operations.

Context hints

  • internal/checkpoint/ — checkpoint storage using git plumbing
  • internal/git/ — git operations
  • internal/config/ — configuration for allowlist settings

Source

Inspired by entireio/cli changelog 0.5.4: "Binary file detection in PR diffs" and PR #897

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions