Skip to content

fix(cli): align search limit with ctx_search cap#82

Open
barry166 wants to merge 1 commit into
agentctxhq:mainfrom
barry166:codex/issue-77-search-limit
Open

fix(cli): align search limit with ctx_search cap#82
barry166 wants to merge 1 commit into
agentctxhq:mainfrom
barry166:codex/issue-77-search-limit

Conversation

@barry166

Copy link
Copy Markdown
Contributor

Summary

  • source CLI search defaults and max limit from the shared MCP constants
  • update the help text and validation error to match the documented 15-result cap
  • add CLI coverage for the accepted max and the first rejected value above it

Closes #77

Testing

  • npm run typecheck --workspace @agentctxhq/agentctx
  • npm run build --workspace @agentctxhq/agentctx
  • npx biome check packages/agentctx/src/cli/search.ts packages/agentctx/test/cli/commands.test.ts
  • npx vitest run test/cli/commands.test.ts

Disclosure

  • AI-assisted: Yes
  • Human reviewed: Yes

The CLI advertised and accepted more results than the MCP surface and SPEC\nallow. Reusing the shared cap removes the silent divergence and adds an\nintegration test on the 15-result boundary so the two interfaces stay in lockstep.\n\nConstraint: CLI and MCP retrieval rules need one consistent documented cap\nRejected: Keep a larger CLI-only limit and document an exception | unnecessary contract split for a simple query surface\nConfidence: high\nScope-risk: narrow\nReversibility: clean\nDirective: Keep CLI search limits sourced from the shared MCP constants unless the SPEC changes first\nTested: npm run typecheck --workspace @agentctxhq/agentctx\nTested: npm run build --workspace @agentctxhq/agentctx\nTested: npx biome check packages/agentctx/src/cli/search.ts packages/agentctx/test/cli/commands.test.ts\nTested: npx vitest run test/cli/commands.test.ts\nNot-tested: Full workspace test suite
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.

CLI agentctx search --limit caps at 50, but SPEC §5/§9 and the MCP ctx_search tool cap results at 15 — the two retrieval surfaces diverge

1 participant