Skip to content

fix: prevent futile retries after empty or deferred results - #269

Merged
jlitola merged 4 commits into
mainfrom
jlitola/fix-agent-looping-ux
Aug 11, 2026
Merged

fix: prevent futile retries after empty or deferred results#269
jlitola merged 4 commits into
mainfrom
jlitola/fix-agent-looping-ux

Conversation

@jlitola

@jlitola jlitola commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace empty search and grep dead ends with compact, bounded next actions and explicit unchanged-retry prevention
  • expose bounded search-status waiting through MCP wait_timeout_ms and CLI --wait, defaulting to 20 seconds
  • stop FAILED and TIMEOUT session polling consistently across text, JSON, MCP, and CLI
  • preserve backend indexing, not-found, freshness, filter, estimate, and alternative-target diagnostics across MCP and CLI output
  • humanize real producer-normalized grep truncation reasons and keep surface-specific recovery syntax accurate
  • document the public text-v1 behavior and MCP/CLI parity contract

Release follow-up (required)

This PR deliberately does not bump package versions. A separate release PR must bump both the root githits package and @githits/mcp; the MCP package must move off the already-published 0.6.4 or the MCP release workflow will skip publishing these changes. After publication, the hosted remote MCP must consume the new @githits/mcp version and be redeployed before remote users receive the new guidance and search_status.wait_timeout_ms behavior.

Validation

  • bun test: 2627 passed
  • bun run typecheck
  • bun run format:check
  • bun run lint
  • bun run build
  • bun run smoke:cli authenticated
  • bun run smoke:mcp authenticated
  • targeted Claude and Codex agent E2E workloads for unified search; both succeeded with high confidence and reported GitHits helped
  • GitHub CI, MCP package validation, and runtime compatibility matrix pass

Add bounded empty-result guidance, explicit deferred-search continuation, and shared indexing error details across MCP and CLI output. Preserve backend diagnostics and structured JSON while preventing identical retry loops.
@jlitola jlitola added the bug Something isn't working label Aug 11, 2026
Stop polling terminal search sessions and keep empty grep pivots accurate for case sensitivity and each command surface. Standardize continuation copy and compact scan context.
Expose backend progress waiting through MCP and CLI with the shared bounded default. Keep terminal-session recovery consistent across text and JSON, and align grep truncation guidance with normalized producer values.
Use explicit undefined types with defaults for public error metadata constructor parameters so the standalone MCP declaration build succeeds without changing call-site behavior.
@jlitola
jlitola merged commit 5cace89 into main Aug 11, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant