Skip to content

callers/node silently truncate at default --limit 20 (no "…N more" indicator) #1674

Closed

Description

@azorlu80

Version: v1.6.0

codegraph callers <sym> and codegraph node <sym> cap the caller list at the default --limit 20 with no indication the result was truncated — the header shows the displayed count, never "…N more". impact (uncapped) and node's callee trail (+N more) don't have this; the callers list and the JSON / MCP output do.

Repro (a high-fan-in symbol, e.g. a widely-used hook):

  1. codegraph callers useAuth → 20 results
  2. codegraph callers useAuth --limit 500 → 174 results
  3. The output/header gives no hint that 154 were dropped.

Expected: when truncated, print something like …154 more (raise --limit), or don't cap silently.

Impact: consumers under-count and trust the result → wrong "who calls this / is this dead code?" conclusions. It's especially harmful when an AI agent drives the tool over MCP, since the tool output inherits the cap with no truncation signal.

Activity

  1. danusha2345 commented on Sep 4, 2026

    @danusha2345
    Contributor

    Same symptom as #1639. #1647 makes callers / callees / query report the cut (shown of total, plus total/limit/truncated in the callers/callees JSON), and its latest commit adds the same "showing N of M; pass limit to widen" note to the codegraph_callers / codegraph_callees MCP answers. node's caller trail already prints +N more on 1.6.0.

  2. colbymchenry commented on Sep 8, 2026

    @colbymchenry
    Owner

    Fixed in #1772 — lands the verified #1647 changes onto current main (that PR was conflicted after #1771).

    • CLI callers/callees: header shows N of M + widening hint; JSON adds total/limit/truncated
    • CLI query: truncation notice (stderr for --json)
    • MCP codegraph_callers/codegraph_callees: Showing N of M / … +N more
    • codegraph node already reported +N more on its caller trail; no change needed

    Verified fail→pass on Linux with __tests__/mcp-callers-truncation.test.ts and __tests__/cli-truncation.test.ts.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions