The MCP server's project_root was hardcoded to the script's parent dir.
When opencode launches the MCP from a sibling clone (e.g., main repo
launches the tier2 clone's MCP via the hardcoded path in main repo's
opencode.json), the MCP only allowed paths inside the tier2 clone —
even when the user was working in the main repo.
Fix: use os.getcwd() as the primary project_root (the user's actual
working dir) and fall back to the script's home. Read mcp_paths.toml
from cwd first, then script home. This way:
- MCP launched from tier2 + cwd=main -> allows [main, tier2]
- MCP launched from main + cwd=main -> allows [main]
- MCP launched from tier2 + cwd=tier2 -> allows [tier2] (preserves sandbox)
Takes effect after the next opencode restart.
Applied 236 return type annotations to functions with no return values
across 100+ files (core modules, tests, scripts, simulations).
Added Phase 4 to python_style_refactor track for remaining 597 items
(untyped params, vars, and functions with return values).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Claude Code conductor commands, MCP server, MMA exec scripts,
and implement py_get_var_declaration / py_set_var_declaration which
were registered in dispatch and tool specs but had no function bodies.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>