fix(hooks): quote plugin-root paths with spaces (#1076)#1077
Merged
igorls merged 1 commit intoMemPalace:developfrom May 3, 2026
Merged
fix(hooks): quote plugin-root paths with spaces (#1076)#1077igorls merged 1 commit intoMemPalace:developfrom
igorls merged 1 commit intoMemPalace:developfrom
Conversation
MemPalace#1076) Shell splits hook command on whitespace after variable expansion, breaking paths with spaces (e.g. C:\Users\Richard M on Windows). Wrapping the path in double quotes preserves the token boundary. Fixes the reported Stop/PreCompact pair in .claude-plugin/hooks/hooks.json and applies the same fix to .codex-plugin/hooks.json (SessionStart/Stop/ PreCompact), which carries the identical bug.
68f64cd to
372cca3
Compare
xcarbo
added a commit
to xcarbo/mempalace
that referenced
this pull request
May 4, 2026
Catches up on a month of upstream work. Highlights pulled in: - MemPalace#1306 searcher: hybrid candidate union (vector ∪ BM25 reranking pool) - MemPalace#1325 mcp security: omit absolute paths from tool_get_drawer / tool_status - MemPalace#1322 chroma: wire quarantine_stale_hnsw to prevent SIGSEGV on stale HNSW - MemPalace#1320 mcp: forward valid_to / source params in kg_add / kg_invalidate - MemPalace#1321 cli: honor --palace flag in cmd_init - MemPalace#1314 kg temporal params fix - MemPalace#1244 cli: cmd_compress writes to mempalace_closets so palace can read - MemPalace#1243 mcp: case-insensitive agent name in diary_write/diary_read - MemPalace#1303 mcp_server: pass embedding_function= on collection reopen - MemPalace#1076/MemPalace#1077 hooks: quote CLAUDE_PLUGIN_ROOT / CODEX_PLUGIN_ROOT in hooks.json - Various ruff format passes on touched files Conflict resolution (CHANGELOG.md only — code files all auto-merged): - 3.3.5 unreleased section header from upstream kept above 3.3.4 - 3.3.4 section: kept our 2026-04-30 release date; merged upstream's new MemPalace#1299 SIGSEGV-on-default-EF entry in alongside our existing topic-tunnels (MemPalace#1194/MemPalace#1195/MemPalace#1197), HNSW-bloat (MemPalace#1191), max_seq_id (MemPalace#1135), and auto-ingest (MemPalace#1230/MemPalace#1231) entries. Kept our richer topic-tunnels detail (upstream's version was a strict subset). xdev patches preserved (still on this branch, untouched by merge): - 6ef44cb fix(hooks): route CC transcripts via convo_miner with cwd-based wings - 3fad61d fix(config): allow leading dash in wing names Not pushed to origin — run tests locally and decide when to push. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
4 tasks
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
Hook commands in
.claude-plugin/hooks/hooks.jsonand.codex-plugin/hooks.jsonexpand${CLAUDE_PLUGIN_ROOT}/${CODEX_PLUGIN_ROOT}without quoting. When the user profile path contains a space (e.g.C:\Users\Richard Mon Windows), the shell splits the command on the space and the hook fails:Fix
Wrap the path variable in double quotes so shell word-splitting preserves the token boundary.
.claude-plugin/hooks/hooks.json(Stop + PreCompact):.codex-plugin/hooks.json(SessionStart + Stop + PreCompact):On the Codex variant the argument stays outside the quotes so it remains a separate token after shell parsing. Same pattern used by the superpowers plugin reference in issue #1076.
Scope check
plugin.json/.mcp.json: MCP command is themempalace-mcpentry point with no path arg, not affected.hooks/*.sh(legacy): standalone scripts whose path the user writes intosettings.local.json, out of scope for the plugin-shipped configs..shbodies already quote all path variables.Test plan
jq emptypasses on both).bash: /c/Users/Richard: No such file or directoryshape reported on Windows.Fixes #1076.