Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

One tool layer for eleven AI coding CLIs: what we learned building SpaceApp

Description and use

SpaceApp unifies tool configuration and session management across multiple AI coding CLIs, eliminating configuration drift and idle processes, and decoupling UI from agent processes.

Problem

Managing disparate tool configurations and session lifecycles across multiple AI coding CLIs leads to configuration drift, idle processes, and fragile agent state.

Outcome

SpaceApp reduces configuration drift, idle MCP processes, and improves session resilience across multiple AI coding CLIs by centralizing tool management and decoupling UI from agent processes.

Workflow

  • 1. Identify runtime‑provided capabilities (shell, file editing, image input).
  • 2. Wrap only non‑native tools in MCP calls to avoid latency.
  • 3. For Codex and Claude Code, register no MCP server at startup; use on‑demand entrypoint space-capability to start a small worker per pane when needed.
  • 4. For other runtimes, declare a single dispatcher space-mcp-dispatcher from a shared registry and spawn servers only when called.
  • 5. Ensure each operation passes its own schema, role, approval, and broker gates; treat MCP as transport, not authorization.
  • 6. Separate UI server from agent processes: run each CLI in a terminal session owned by a pane host, attach API via socket, and allow reconnection without losing session state.
  • 7. Handle TUI differences: send appropriate interrupt key per CLI, manage model picker UI interactions, and detect ready screens correctly.
  • 8. Use contract suite to validate declared start, resume, and login commands against wrapper filters.
  • 9. Deploy SpaceApp with npx --yes run-spaceapp@latest install and configure rooms for each user or project.

Evidence

Every CLI wants its tools declared in its own file: one JSON shape for one, a TOML table for another, a command-line flag for a third.

Source

The first rule we settled on: use what the runtime already has.

Source

In SpaceApp each CLI runs in a terminal session owned by a separate pane host process, not by the API.

Source

SpaceApp is open source (MIT) and installs with: npx --yes run-spaceapp@latest install

Source

  • Record date: 2026-11-02T03:14:04.610Z