feat(hooks): hooks.ignore_paths config to exempt project dirs from capture#1994
Open
JasonAiassist wants to merge 2 commits into
Open
feat(hooks): hooks.ignore_paths config to exempt project dirs from capture#1994JasonAiassist wants to merge 2 commits into
JasonAiassist wants to merge 2 commits into
Conversation
…alace#1888) The per-palace writer lease (MemPalace#1818/MemPalace#1823) is held for the whole MCP process lifetime, so a single interactive session starves every other writer on the palace — hook and manual mines exit with MineAlreadyRunning, daemon jobs fail, and a second session's mutating tools are refused — for hours at a time. Release the lease once no mutating tool has run for MEMPALACE_MCP_WRITER_LEASE_IDLE_S seconds (default 300; 0 restores the legacy hold-until-exit behavior). The release also runs _force_chroma_cache_reset() so the next mutating call reopens the palace from disk: a re-acquire is only safe when no stale in-memory HNSW state survives, which is the reason the lease was lifetime-scoped in the first place. Re-acquisition rides the existing self-heal retry path, so the first mutating tool after a release transparently wins the lease back. The idle-exit watchdog thread drives the release check and now also starts when only the lease release is enabled. The atexit hook is registered once and reads the current lease, replacing the per-acquire lambda that would go stale across release/re-acquire cycles. Part of the MemPalace#1963 concurrent-writer cluster. Co-Authored-By: Claude Fable 5 <[email protected]>
…pture Ephemeral worker sessions (objective-loop agents spawning dozens of nested harness sessions per hour) each fire session-start/stop/session-end ingests; on this store that meant hundreds of ingest writes per hour, several of which died mid-write (segfault in the HNSW add path) and re-diverged the index hours after a repair. ignore_paths lets an operator exempt those project dirs from capture entirely: matched by cwd path-prefix with a transcript_path dash-encoded fallback; hook still returns valid JSON. Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Ephemeral worker sessions (objective-loop agents spawning dozens of nested harness sessions per hour) each fire session-start/stop/session-end ingests. On my store that meant hundreds of ingest writes per hour, several of which died mid-write (segfault in the HNSW add path) and re-diverged the index within hours of a repair (same failure family as #1888 / #1966).
Change
A new
hooks.ignore_pathsconfig lets an operator exempt listed project directories from capture entirely:transcript_pathdash-encoded fallback for hooks that receive no cwd.Running live on my instance since 2026-07-10 — the agent-farm directories no longer generate ingests, and the store has stayed convergent since.
Note
Stacked on #1966 — this branch includes that PR's commit (
327c28e) because it was cut from the same local build; once #1966 merges todevelop, this PR reduces to the singlefeat(hooks)commit. Happy to rebase instead if you'd prefer.🤖 Generated with Claude Code