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
{{ message }}
Repository navigation
Isolate Kimi runs: no cross-project threads, memory, or workspaces #671
Kimi threads in one Solenta project can see and act on other projects (files, memory, and thread tools). A run must stay inside its own project.
Why
Kimi has no per-invocation MCP config. Solenta merges coder-memory and coder-threads into the user-global ~/.kimi-code/mcp.json, and the CLI also keeps a global workspaces.json of every directory it has ever opened (including $HOME and /). Combined with:
Memory MCP treating an omitted project as "all projects"
One workspace-wide bearer token with no caller identity
a Kimi agent can list foreign threads, search foreign memory, and drive tools registered for other workspaces.
Claude/Codex already get a Solenta-owned MCP file per launch. Kimi (and Grok) do not. Kimi 0.38 honors KIMI_CODE_HOME, which is the per-run overlay.
Plan
Isolated KIMI_CODE_HOME per Solenta Kimi run — copy config.toml, symlink credentials/sessions, write a fresh mcp.json with only Solenta servers, write workspaces.json containing only this cwd. Do not inherit the user's other MCP servers or workspaces. Do not copy AGENTS.md.
Bind MCP URLs to the run — coder-threads?projectId= and coder-memory?project= so the server, not the model, owns the scope.
threads_list is per-project — required projectId, returns only that project. Bound sessions ignore a claimed foreign id.
Memory MCP honors the bind — search/bootstrap/store/recent scoped to the bound project; a claimed other project is rejected.
Grok still uses user-global grok mcp add -s user (same class of hole). Out of scope here.
Check
Isolated home's mcp.json has only Solenta servers and scoped URLs; workspaces.json has only the run cwd; source AGENTS.md is absent.
threads_list without projectId errors; with p1 omits p2 threads.
Bound ?projectId=p1 rejects thread_fork of a p2 thread even when args claim p2.
Bound memory search does not return another project's entries; claiming a foreign project throws.
Kimi Solenta runs now get a per-thread KIMI_CODE_HOME overlay: only Solenta MCP servers (URLs bound with ?project= / ?projectId=), a workspaces.json containing only the run cwd, no inherited AGENTS.md or foreign MCP. threads_list is per-project; a bound session cannot name another project. Memory MCP honors ?project= the same way.
Still open after this:
Grok user-global MCP has the same class of hole
ssh/WSL kimi turns skip the overlay
Kimi has no OS sandbox, so bash can still cd elsewhere
Interactive kimi outside Solenta still gets unscoped servers merged into ~/.kimi-code/mcp.json
Activity
currentbits commentedon Aug 22, 2026
Implemented on this branch.
Kimi Solenta runs now get a per-thread
KIMI_CODE_HOMEoverlay: only Solenta MCP servers (URLs bound with?project=/?projectId=), aworkspaces.jsoncontaining only the run cwd, no inheritedAGENTS.mdor foreign MCP.threads_listis per-project; a bound session cannot name another project. Memory MCP honors?project=the same way.Still open after this:
cdelsewherekimioutside Solenta still gets unscoped servers merged into~/.kimi-code/mcp.json