Description
isInitialized() in mempalace-cli.ts always returns false because it passes --palace after the status subcommand:
await executeMempalace(['status', '--palace', palacePath]);
// Produces: mempalace status --palace /path/to/palace
However, --palace is a global flag in the mempalace CLI's argparse and must precede the subcommand:
mempalace --palace /path/to/palace status # ✅ works
mempalace status --palace /path/to/palace # ❌ argparse error
Impact
Since isInitialized() always returns false:
- The plugin thinks the palace doesn't exist
- It triggers
initialize(dir) which runs mempalace init --yes <workspace_dir>
- For large workspace dirs (e.g. home directory), this times out at 5s
- The plugin stays stuck in
initializing state
- Wake-up injection never fires — users get
[MemPalace]: The memory system is being built asynchronously forever
Suggested Fix
Drop --palace entirely from the isInitialized() call. The mempalace CLI resolves the palace path automatically from ~/.mempalace/config.json or the MEMPALACE_PALACE_PATH env var:
await executeMempalace(['status']);
I've submitted a PR with this fix: see #linked PR.
Reproduction
# This is what the plugin does — fails
mempalace status --palace ~/.mempalace/palace
# error: unrecognized arguments: --palace ~/.mempalace/palace
# This works
mempalace status
Environment
- mempalace 3.1.0
- opencode-plugin-mempalace 1.2.1
- Python 3.13.13
- macOS
Description
isInitialized()inmempalace-cli.tsalways returnsfalsebecause it passes--palaceafter thestatussubcommand:However,
--palaceis a global flag in the mempalace CLI's argparse and must precede the subcommand:Impact
Since
isInitialized()always returnsfalse:initialize(dir)which runsmempalace init --yes <workspace_dir>initializingstate[MemPalace]: The memory system is being built asynchronouslyforeverSuggested Fix
Drop
--palaceentirely from theisInitialized()call. The mempalace CLI resolves the palace path automatically from~/.mempalace/config.jsonor theMEMPALACE_PALACE_PATHenv var:I've submitted a PR with this fix: see #linked PR.
Reproduction
Environment