Skip to content

bm find/ls --plain omit the paging footer, so truncation is invisible outside a TTY #1457

Closed

Description

@phernandez

What happens

In a TTY, bm find and bm ls end with a footer like page 1 • total 10 • more available (--page). With --plain the rows print and the output stops; there is no footer at all. Piped output without --plain is JSON, which carries has_more and total.

Repro on the Moby Dick project:

bm find --meta 'note_type=chapter' --page-size 3 --project moby-dick --plain   # 3 rows, nothing else
bm find --meta 'note_type=chapter' --page-size 3 --project moby-dick | tail -2   # … "has_more": true }

Why it matters

--plain is the mode an agent picks for readable output in a non-TTY. It is the one mode with no truncation signal: 10 rows of 138 look like the answer. The literary-analysis skill tells readers to watch the footer; in this mode there is none to watch.

Expected

--plain prints the same one-line footer (page, total, more available) after the rows, or at least a trailing more available line when has_more is true.

Found during the #1398 Moby Dick qualitative run.

🤖 Generated with Claude Code

https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp

Activity

  1. added
    bug
    on Sep 3, 2026
  2. claude commented on Sep 3, 2026

    @claude
    Contributor

    Claude finished @phernandez's task in 29s —— View job


    Triage

    Type: Bug (labeled bug)
    Component: CLI commands — bm find / bm ls plain-text output in src/basic_memory/cli/commands/posix.py (_plain_find, _plain_ls). No cloud dimension, so the cloud label was not applied.
    Priority: Medium — no data loss or crash, but it's a real correctness gap for the primary consumer of --plain: a non-TTY agent silently sees a partial result set with no signal that more rows exist.
    Complexity: Simple — posix.py already has precedent for this exact pattern. bm cat's _write_slice_footer (posix.py:129) prints a dim footer in rich mode and routes an undecorated footer to stderr in --plain mode (posix.py:155, 185) specifically so plain-mode piping stays clean on stdout while still surfacing pagination/truncation info. _plain_find/_plain_ls (posix.py:227, 263) don't currently call anything equivalent after printing rows, even though the JSON path already carries has_more/total. Fix looks like: reuse or mirror _write_slice_footer's stderr approach for _plain_find/_plain_ls when has_more is true.

    No duplicate found via issue search. Reproduction steps are already included and clear, so no follow-up needed there.

    This is a triage-only pass — no code changes made.

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

    bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions