Bug
When a project's IDE MCP config (.vscode/mcp.json) has a datamate stdio entry written by the VS Code extension, launching an Altimate Code session on a desktop editor can suddenly open dist/datamate-cli.js as an editor tab, and the datamate MCP server fails with MCP error -32000: Connection closed. Once it starts happening, it repeats on every session launch.
Root cause
On desktop editors the IDE entry's command is the editor's Electron binary, and the entry's env block carries ELECTRON_RUN_AS_NODE=1 so the binary runs as Node. datamate_manager add reuses the entry's command + args but drops the env block — both in the immediate spawn and in the entry it persists to .altimate-code/altimate-code.json. Spawned without the flag, Electron boots the editor GUI and opens the script path as a document instead of executing it. The healing sync that would repair the persisted entry only runs on altimate serve boot, never in the TUI or run, so the broken entry never self-repairs for terminal users.
Steps to reproduce
- In a project where the VS Code extension has written a
datamate stdio entry to .vscode/mcp.json (desktop editor, so command is the Electron binary with env: {"ELECTRON_RUN_AS_NODE": "1"}), run Altimate Code in the terminal.
- Use
datamate_manager operation add to connect a datamate.
- The CLI file opens as an editor tab and the tool reports
MCP error -32000: Connection closed; .altimate-code/altimate-code.json now has a datamate entry with no environment block.
- Any later session launch in that project re-spawns the broken entry and pops the file again.
Bug
When a project's IDE MCP config (
.vscode/mcp.json) has adatamatestdio entry written by the VS Code extension, launching an Altimate Code session on a desktop editor can suddenly opendist/datamate-cli.jsas an editor tab, and the datamate MCP server fails withMCP error -32000: Connection closed. Once it starts happening, it repeats on every session launch.Root cause
On desktop editors the IDE entry's
commandis the editor's Electron binary, and the entry'senvblock carriesELECTRON_RUN_AS_NODE=1so the binary runs as Node.datamate_manager addreuses the entry's command + args but drops theenvblock — both in the immediate spawn and in the entry it persists to.altimate-code/altimate-code.json. Spawned without the flag, Electron boots the editor GUI and opens the script path as a document instead of executing it. The healing sync that would repair the persisted entry only runs onaltimate serveboot, never in the TUI orrun, so the broken entry never self-repairs for terminal users.Steps to reproduce
datamatestdio entry to.vscode/mcp.json(desktop editor, socommandis the Electron binary withenv: {"ELECTRON_RUN_AS_NODE": "1"}), run Altimate Code in the terminal.datamate_manageroperationaddto connect a datamate.MCP error -32000: Connection closed;.altimate-code/altimate-code.jsonnow has adatamateentry with noenvironmentblock.