Skip to content

fix(mcp): make explore cross-context dedup opt-in - #1624

Open
danusha2345 wants to merge 1 commit into
colbymchenry:mainfrom
danusha2345:fix/1620-explore-context-dedup
Open

fix(mcp): make explore cross-context dedup opt-in#1624
danusha2345 wants to merge 1 commit into
colbymchenry:mainfrom
danusha2345:fix/1620-explore-context-dedup

Conversation

@danusha2345

Copy link
Copy Markdown
Contributor

Summary

Fixes #1620.

An MCP connection is not a reliable conversation boundary: hosts may reuse it for subagents or keep it alive across context compaction. Suppressing source by default can therefore point an agent at text that its current context never received.

  • default cross-call source deduplication to off
  • enable it only for explicit truthy CODEGRAPH_EXPLORE_DEDUP=1 style values
  • preserve the existing optimization for hosts that guarantee one durable agent context per connection
  • test both the safe default and explicit opt-in behavior

This is deliberately limited to the correctness fix and does not add installer hooks or host trust state.

Verification

  • npm run build:kernel
  • npm run build
  • focused dedup suite — 26 passed
  • npm test -- --reporter=dot — 194 files, 3231 passed, 10 skipped

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.

codegraph_explore tells a fresh subagent that source was "already sent" to a different context

1 participant