{ "mcpServers": { "session-orchestrator": { "command": "bash", "args": [ "-c", "# Tier order MIRRORS resolvePluginRoot() — see scripts/lib/plugin-root.mjs § TIER ORDER (the single source of truth). That list is the original, this is the mirror: change both together. The env list, the CODEX_HOME trim, the package.json{name} test and the newest-wins-by-mtime tiebreak are all mirrored EXACTLY; only tier 6 (walk up from import.meta.url) has no shell analogue.\nr=\"\"; ch=\"$CODEX_HOME\"; ch=\"${ch#\"${ch%%[![:space:]]*}\"}\"; ch=\"${ch%\"${ch##*[![:space:]]}\"}\"; [ -n \"$ch\" ] || ch=\"$HOME/.codex\"; for c in \"$PLUGIN_ROOT\" \"$CLAUDE_PLUGIN_ROOT\" \"$CODEX_PLUGIN_ROOT\" \"$CURSOR_RULES_DIR\" \"$PI_PLUGIN_ROOT\" \"$(git rev-parse --show-toplevel 2>/dev/null)\"; do if [ -n \"$c\" ] && [ -f \"$c/scripts/mcp-server.sh\" ]; then r=\"$c\"; break; fi; done; if [ -z \"$r\" ]; then r=\"$(NODE_PATH=\"$(npm root -g 2>/dev/null)\" node -e 'import(require(`node:url`).pathToFileURL(require.resolve(`session-orchestrator/scripts/lib/plugin-root.mjs`))).then(m=>process.stdout.write(m.resolvePluginRoot()))' 2>/dev/null)\"; fi; if [ -z \"$r\" ]; then for b in \"$ch\" \"$HOME/.claude\"; do for c in \"$b\"/plugins/cache/*/session-orchestrator/*; do if [ -f \"$c/scripts/mcp-server.sh\" ] && node -e 'process.exit(JSON.parse(require(\"fs\").readFileSync(process.argv[1],\"utf8\")).name===\"session-orchestrator\"?0:1)' \"$c/package.json\" 2>/dev/null && { [ -z \"$r\" ] || [ \"$c\" -nt \"$r\" ]; }; then r=\"$c\"; fi; done; done; fi; if [ -n \"$r\" ] && [ -f \"$r/scripts/mcp-server.sh\" ]; then exec bash \"$r/scripts/mcp-server.sh\"; fi; { echo \"session-orchestrator: cannot locate the plugin root — the MCP server did not start.\"; echo \" Tried: PLUGIN_ROOT=${PLUGIN_ROOT:-(unset)}, CLAUDE_PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT:-(unset)}, CODEX_PLUGIN_ROOT=${CODEX_PLUGIN_ROOT:-(unset)}, CURSOR_RULES_DIR=${CURSOR_RULES_DIR:-(unset)}, PI_PLUGIN_ROOT=${PI_PLUGIN_ROOT:-(unset)}, git rev-parse --show-toplevel (cwd=$PWD), node resolve of session-orchestrator/scripts/lib/plugin-root.mjs, plugin caches $ch/plugins/cache/*/session-orchestrator/* and $HOME/.claude/plugins/cache/*/session-orchestrator/*.\"; echo \" Fix: reinstall the plugin so its cached copy is refreshed (codex plugin marketplace add Kanevry/session-orchestrator), or set CLAUDE_PLUGIN_ROOT / CODEX_PLUGIN_ROOT to the plugin directory in this server's env block.\"; echo \" Note: CODEX_PLUGIN_ROOT is session-orchestrator's own compatibility export, not a variable Codex provides. See docs/codex-setup.md § Troubleshooting.\"; } >&2; exit 1" ] } } }