Skip to content

Preserve command titles for non-exploratory first shell segments - #5849

Merged
SawyerHood merged 2 commits into
mainfrom
slopcop/issue-5847
Oct 20, 2026
Merged

SawyerHood merged 2 commits into
mainfrom
slopcop/issue-5847

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

Shell intent parsing skipped unrecognized initial commands and promoted a later grep segment to the search title for the whole command. Both timeline titles and CLI headings therefore hid the identity of a non-search-first command. Reproduced on trusted main in two clean checkouts: root-cause report.

What changed

  • Stop exploratory-intent derivation when the first nonempty segment is not recognized as exploratory; retain the generic title and full command text.
  • A bare cd segment passes through, so the next segment decides: cd dir && rg foo stays "Searched for foo", and cd dir && node build.mjs | grep warning stays "Ran …".
  • Preserve genuine search-first pipelines and existing later-write disqualification.
  • Add an event-to-title regression table covering pipes, AND-lists, semicolon-lists, cd-prefixed search and build commands, and a search-first control. Correct the fixtures that relied on promoting later searches, including the server shell-summaries test.
  • No expansion preference, public API, server/daemon wire, storage, dependency, packaging, or generated-file changes.

How you verified

  • Added the regression before changing production code: on main, the three setup-first cases and the cd … && node … | grep case fail, and the search-first and cd … && grep cases pass. Before cd passed through, the cd … && grep case failed against this branch's first commit.
  • pnpm exec turbo run test typecheck --filter=@bb/thread-view: 504 tests across 31 files pass; typecheck passes.
  • pnpm exec turbo run test --filter=@bb/server -- test/public/public-thread-shell-command-summaries.test.ts: 2/2 pass; @bb/server typecheck passes.
  • Replayed main's and this branch's parsers over 75,127 real recorded agent commands from the last 30 days, without executing them. No cd dir && <search/read> command changes classification. The 11,128 commands that change all start with a non-exploratory command (for example git, gh, or cd … && cp …), so they now show as "Ran …".
  • Search-first commands with a later destructive non-redirect step (ls x && rm -rf x, grep -l … | xargs rm) still show the explore summary, as on main; this PR does not change that.
  • macOS desktop/browser verification was not run.

Fixes #5847

AGENT GENERATED

SawyerHood and others added 2 commits October 20, 2026 10:42
A bare cd segment now passes through intent parsing, so the next
segment decides the title: `cd dir && rg foo` stays "Searched for foo",
while `cd dir && node build.mjs | grep warning` stays "Ran ...".

The server shell-summaries test still used the `until ... | grep` poll
fixture that this branch intentionally stops summarizing; switch it to a
search-first command.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@SawyerHood
SawyerHood merged commit af04848 into main Oct 20, 2026
80 of 81 checks passed
@SawyerHood
SawyerHood deleted the slopcop/issue-5847 branch October 20, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeline labels a piped Bash command as "Searched for <grep pattern>", hiding the command that actually ran

1 participant