Skip to content

feat(search): add --tool-output to query and tool_output to MCP search_sessions - #81

Open
malihashar wants to merge 1 commit into
skillsynchq:mainfrom
malihashar:feature/tool-output-search
Open

malihashar wants to merge 1 commit into
skillsynchq:mainfrom
malihashar:feature/tool-output-search

Conversation

@malihashar

@malihashar malihashar commented Oct 11, 2026 •

Copy link
Copy Markdown

Closes #80.

Problem

txcript query and MCP's search_sessions never search tool output — command output, file contents a tool read, API responses. That content is indexed, but the default search scope (Origin::DEFAULT) excludes it, and there's no flag to opt in. A string that only appears inside a tool's output returns "no matches," even though txcript view shows it plainly.

$ txcript query ZEBRAQUUX_LINKER_FAULT
no matches for `ZEBRAQUUX_LINKER_FAULT`

$ txcript query ZEBRAQUUX_LINKER_FAULT --tool-output
claude_code  11111111-...  2026-01-02 03:04  demo
  [tool_result] error: ZEBRAQUUX_LINKER_FAULT in libfoo.a

Fix

Adds --tool-output to query and tool_output: true to search_sessions, both widening to Origin::ALL through the existing shared user_query path. The default stays unchanged (tool output is large and noisy — excluding it by default is intentional, per docs/usage.md). No changes to indexing, ranking, or output format.

Tests

New end-to-end tests drive the real CLI and MCP binaries and fail on main (unknown flag / field), passing after the fix. Library tests cover matches inside one of several tool outputs, mixed-origin sessions, Unicode/case parity with existing search, malformed tool-output shapes, and a ~96-session corpus.

This branch has not been deployed

No deployments
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.

query and search_sessions never search tool output

1 participant