What happened
This design utilizes node-pty to create a distributed system of shell instances, each representing an AI agent. These ‘panes,’ managed as plain objects in memory, simulate real terminals with complete isolation.
Each pane spawns a shell process, redirects the HOME directory to its account-specific folder, and sets the current working directory (cwd) to a specified git worktree – essentially a local copy of the repository. The core innovation is the 'broadcast' feature: a continuous stream of keystrokes from any pane is sent directly to all other panes. This eliminates the need for complex message passing or agent-specific output parsing. Essentially, it’s four terminals—each acting as a fully autonomous environment for an AI agent.
Why it matters
The potential here isn't just about running multiple agents simultaneously; it’s about fundamentally rethinking how we interact with and control these systems.
By operating at the lowest level – raw terminal input – it creates a pluggable architecture, impervious to API changes or agent-specific quirks. Imagine being able to edit the same codebase across different models—or even alongside other tools—without fear of conflicts or overwritten states. The 'accountDir' and 'repoPath' features ensure proper isolation and version control.
But, but, but…
The simplicity of this design comes with a critical caveat: there’s no active monitoring of the panes’ status. If one agent is still booting up, input might be directed to an empty terminal—a potential source of confusion or errors.
Also, attributing CPU and memory usage per pane proved incredibly challenging due to the nested nature of shell processes. Resolving this involved deep introspection into the process tree, a computationally expensive task that impacts performance. Further, Windows’ process monitoring is complex relying on CIM instances, adding overhead.
“it broadcasts everything, including Ctrl+C and arrow keys.”
— Dr Non
The counter-take
Traditional AI orchestration frameworks typically introduce layers of abstraction and monitoring that obscure the underlying execution environment. This approach deliberately avoids those layers to create a more direct and potentially efficient interaction with AI agents—a deliberate departure from common practices.
The AI angle
This architecture enables a potential upgrade in AI development workflows by allowing for direct manipulation and experimentation within isolated environments. The asymmetry arises from the elimination of agent-specific infrastructure overhead, leading to faster iteration cycles and reduced dependency management concerns.
