Skip to content

[Feature]: Remove query echo from search_code output #37

@iamvirul

Description

@iamvirul

Problem Statement

Every search_code response starts with:

Top 8 results for: 'your query here'

The query is already present in Claude's context (it was just passed as an argument). Echoing it back in the output is redundant and wastes tokens on every single search call.

Proposed Solution

Remove the header line from the search_code output in server.py:

# Before
lines = [f"Top {len(results)} results for: '{query}'\n"]

# After
lines = []

Results are still clearly structured with [1], [2] prefixes and file:line (score) references, so removing the header does not reduce readability.

Alternatives Considered

  • Shorten the header instead of removing it: saves fewer tokens and still redundant
  • Keep it for human-readable logs: VecGrep output is consumed by Claude, not read by humans directly

Additional Context

  • Zero quality risk
  • Small but cumulative saving — every search_code call across a session benefits

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions