Skip to content

Agent Flow: shell searches light the probes on the files they found (#457) - #460

Merged
aMonteSl merged 1 commit into
v1.3.0from
claude/project-thread-osaa2w-grep
Dec 3, 2026
Merged

aMonteSl merged 1 commit into
v1.3.0from
claude/project-thread-osaa2w-grep

Conversation

@aMonteSl

@aMonteSl aMonteSl commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Requested by Adrián · project thread

Closes #457 (bug from Adrián's manual test of #323, epic #319).

Cause

A search the agent ran through the shell (grep -n "backend\.utils\.valida..." via Bash) showed the radar rings but no beacons, and the legend said search: 0 matches: only the Grep/Glob tools' filenames were read as hits, and the dotted pattern was taken for a file operand.

What

  • shellCommandClassifier.ts: searchHitsFromOutput reads the hits a shell search printed: grep -rn / rg / git grep (path:line:text), -l and find/fd (one path per line), a grep over one file (only the lines). Handles cd x && and Windows drives; counts (-c) and searches piped into something else add none. A grep's pattern is no longer a file operand.
  • Claude Code: a Bash search's stdout names its hits; the Grep tool in content mode too (it lists no filenames).
  • Codex: a shell search's output names its hits.
  • Shared core (src/core/agent-flow), so the VS Code extension and the IDE both get it; the runtime already draws a beacon per matched building.

Tests

  • npm test green. New cases in test/analysis/agentFlowCore.test.cjs: output parsing per command, the pattern-not-a-path rule, a Claude Code Bash grep, Grep content mode and a Codex rg.

Docs

Test guide (search row), CHANGELOG.


Generated by Claude Code

…457)

Adrián's IDE test of #323: a grep the agent ran through Bash showed the
radar rings but no beacons, and the legend said "search: 0 matches".
Only the Grep/Glob tools' `filenames` were read as hits.

- shellCommandClassifier: searchHitsFromOutput reads the hits a shell
  search printed (grep -rn / rg / git grep `path:line:text`, -l and
  find/fd one path per line, a grep over one file), with `cd x &&`
  and Windows drives; counts and searches piped into something else
  add none. A grep's pattern is no longer taken for a file operand.
- Claude Code: a Bash search's stdout names its hits; the Grep tool in
  content mode too (it lists no filenames).
- Codex: a shell search's output names its hits.
- Tests in agentFlowCore.test.cjs; test guide and CHANGELOG.
@aMonteSl aMonteSl self-assigned this Dec 3, 2026
@aMonteSl
aMonteSl merged commit 71673d2 into v1.3.0 Dec 3, 2026
11 checks passed
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.

2 participants