You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin cbm-augment.ts reads ctx.directory once at server() init
(~line 42) and only hooks tool.execute.after + experimental.session.compacting
— nothing observes a directory change. OpenCode's plugin API also exposes directory only as a static load-time value and has no directory-change event.
Suggested direction
Detect session-directory changes (via the plugin or the MCP server) and re-root
auto_index/auto_watch + index_repository for the new root.
The root-cause hypothesis here ("/cd doesn't restart the MCP process, so cbm never re-roots") is incorrect: /cd DOES spawn a new MCP connection (new initialize handshake → new cbm server process), so auto_index/auto_watch follow the new directory. Verified after /cd into klume and tds-connector: both were auto-indexed and watched=true.
The actual not_session_project symptom is $HOME sensitive-path protection:
daemon.workspace.skipped operation=watch/auto_index_discovery
detail=/Users/cycle:_path_is_a_home,_credential,_system,_or_application-install_directory.
Starting OpenCode from $HOME skips auto_index/watch for the home dir by design (not a /cd bug).
Activity
cycle2zhou commentedon Oct 28, 2026
Closing after verifying on cbm 0.12.1 + OpenCode.
The root-cause hypothesis here ("/cd doesn't restart the MCP process, so cbm never re-roots") is incorrect: /cd DOES spawn a new MCP connection (new
initializehandshake → new cbm server process), so auto_index/auto_watch follow the new directory. Verified after /cd into klume and tds-connector: both were auto-indexed and watched=true.The actual
not_session_projectsymptom is$HOMEsensitive-path protection:daemon.workspace.skipped operation=watch/auto_index_discovery
detail=/Users/cycle:_path_is_a_home,_credential,_system,_or_application-install_directory.
Starting OpenCode from $HOME skips auto_index/watch for the home dir by design (not a /cd bug).