Skip to content

fix(mcp): persist request-level index options for sync#360

Merged
zc277584121 merged 1 commit intozilliztech:masterfrom
Showiix:fix/persist-request-index-options
Apr 29, 2026
Merged

fix(mcp): persist request-level index options for sync#360
zc277584121 merged 1 commit intozilliztech:masterfrom
Showiix:fix/persist-request-index-options

Conversation

@Showiix
Copy link
Copy Markdown
Contributor

@Showiix Showiix commented Apr 29, 2026

Summary

Fixes #359.

MCP index_codebase request-level options such as customExtensions and ignorePatterns affect the file set used for indexing, but they were not persisted in the MCP codebase snapshot. After an MCP restart, background sync could rebuild a FileSynchronizer without those original options, causing custom-extension files to stop being tracked or request-ignored files to be considered again.

This PR:

  • stores request-level customExtensions and ignorePatterns on the codebase snapshot entry
  • preserves those options across indexing progress, indexed, failed, and interrupted-indexing state transitions
  • restores those options when MCP background sync calls reindexByChange() after restart
  • keeps the options request/codebase-scoped and does not mutate global Context extension or ignore-pattern state

Tests

  • pnpm --filter @zilliz/claude-context-core test
  • pnpm --filter @zilliz/claude-context-mcp test
  • pnpm --filter @zilliz/claude-context-core build
  • pnpm typecheck
  • pnpm --filter @zilliz/claude-context-mcp build
  • git diff --check

@zc277584121 zc277584121 merged commit d2ef81c into zilliztech:master Apr 29, 2026
6 checks passed
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.

MCP sync loses request-level index options after restart

2 participants