Skip to content

Multi-repo hook output is unbounded #22

@JordanCoin

Description

@JordanCoin

Problem

hookSessionStartMultiRepo in cmd/hooks.go:711 runs codemap --depth 2 per child repo and pipes directly to stdout. This bypasses the new adaptive depth + 60KB hard cap introduced for single-repo hooks.

A mono-repo parent with many child repos (e.g. 50+) could still produce large output that eats into Claude's context window.

Suggested fix

Apply the same output capture + truncation pattern used in hookSessionStart — write to a strings.Builder, enforce limits.MaxContextOutputBytes, truncate at a clean line boundary.

Context

Flagged during review of #22 (fix/context-size-limits). Not blocking since --depth 2 keeps individual repo output small, but it's the one path that bypasses the new limits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions