SA² Research & Engineering
Intercognitive Collaboration: Engineering a Native Go IDE for Multi-Model Human-AI Teamwork
Most AI coding tools built over the past two years share an implicit assumption: that software development is a conversation between one human and one model. Whether it is a chat sidebar bolted onto an Electron editor or an autonomous CLI agent running in a terminal pane, the underlying architecture is a single-agent loop.
At Strategic Agentic Acceleration (SA²), our research began from a different premise. When we studied how complex software actually gets designed, debugged, and verified, the failure modes of single-agent workflows fell into two predictable buckets:
- Single-model monoculture: Asking a model to generate code and then critique its own output reinforces the same architectural blind spots and training biases.
- Passive human rubber-stamping: When an agent dumps a 600-line multi-file diff into a chat window, human cognitive fatigue sets in. Engineers either micromanage every line (destroying speed) or approve everything blindly (destroying repository hygiene).
We call the alternative intercognitive collaboration—designing software systems where human engineers and multiple distinct AI reasoning architectures (Claude, Gemini, GPT, Grok) operate as complementary cognitive nodes under deterministic, runtime-enforced governance.
To test these principles on real production repositories, we realised a plugin or VS Code fork wouldn’t cut it. We ended up building Code Badger, a native macOS IDE written in Go. Here is what our research taught us about multi-model coordination—and the systems engineering required to make it run locally without bloat.
1. Why Single-Agent Loops Break Down
In our internal experiments testing multi-file refactors and concurrency bugs across real codebases, we observed a consistent pattern: frontier models have asymmetric strengths.
One model family might excel at decomposing a sprawling system requirement into clean module boundaries, while another is markedly sharper at spotting subtle race conditions, edge-case nil dereferences, or security regressions in the resulting patch. Yet existing tooling forces developers to either manually copy-paste diffs between browser tabs and CLI tools, or lock themselves into a single vendor’s ecosystem.
True intercognitive collaboration requires three runtime primitives that chat interfaces lack:
- Adversarial cross-examination: Model A drafts an implementation against an objective; Model B audits the staged diff against acceptance criteria before the human is ever interrupted.
- Persistent shared state: Agents and humans need a unified view of objectives, verified decisions, file diffs, and build outputs—not a scrolling chat transcript where context decays.
- Hard-coded authority boundaries: Human governance cannot rely on polite system prompts (“Please ask before deleting files”). It must be enforced by the execution runtime itself.
2. Why We Built the Runtime in Go Instead of Forking VS Code
Early on, we faced the classic devtools fork-in-the-road: fork VS Code (like almost every other AI IDE) to inherit a mature extension ecosystem, or build a native desktop runtime from scratch.
Forking VS Code makes sense when your primary workload is inline autocomplete. It becomes a bottleneck the moment you orchestrate three or four concurrent agents streaming responses, running local test suites, watching filesystem events, and staging diffs simultaneously. Electron’s multi-process Chromium architecture already consumes hundreds of megabytes of RAM at idle; layering parallel agent streams and terminal PTYs on top quickly degrades responsiveness on developer laptops.
We chose Go as the core runtime for macOS (supporting both Apple Silicon and Intel on macOS 12+) for four specific systems reasons:
- First-class concurrency for multi-model orchestration: Managing parallel token streams from Anthropic, Google Gemini, OpenAI, and xAI APIs—alongside local CLI runners like Claude Code, Codex, and Grok Build—maps naturally to Go’s goroutines, channels, and
context.Contextcancellation trees. When a developer aborts an agent run or hits a stop rule, every downstream subprocess and HTTP stream terminates in milliseconds. - Cold-start speed and lean memory footprint: A compiled Go binary launches directly into a native macOS window without spinning up a bundled browser engine, leaving system memory free for Docker containers, local compilers, and language servers.
- Zero-proxy local privacy: Because the desktop binary speaks directly to model endpoints and local CLI tools, user source code never passes through an SA² intermediary server. Credentials stay isolated inside the native macOS Keychain (Security.framework) rather than sitting in plaintext
.envor JSON config files. - Single-binary distribution: Shipping a notarised, self-contained
.appbundle with zero runtime dependencies eliminates the Node/Python environment drift that plagues many agentic developer tools.
Honest Engineering Tradeoffs
Building natively in Go on macOS is not free of friction. You give up the long tail of third-party VS Code extensions, and bridging Go to native macOS system APIs (Keychain access, FSEvents file watching, menu bars, and WebKit/native windowing) requires disciplined CGo boundaries and careful memory management across the Go/Objective-C runtime divide. We also had to build our diff staging, integrated terminal PTY management, and Git state tracking from the ground up rather than inheriting them from Monaco/VS Code. For a governance-first control room, that tradeoff was worth making—we own every byte between the model and the disk.
3. Translating Governance Theory into Runtime Mechanics
The hardest engineering problem in intercognitive collaboration is balancing autonomous velocity against human authority. If an agent asks permission before reading every file, it is useless. If it can run arbitrary shell commands unsupervised, it is dangerous.
We solved this by placing a deterministic policy layer—powered by our deterministic execution engine—between the agent layer and the local OS/filesystem.
Text version of the diagram
[ Human Engineer ] <---> [ Control Room & Diff Staging ]
|
(Deterministic Policy & Stop Rules)
|
+---------------------------+---------------------------+
| | |
[ Frontier APIs ] [ Local CLI Agents ] [ Local OS / PTY ]
(Claude, Gemini, (Claude Code, Codex, (Staged Patch FS,
GPT, Grok) Grok Build) Builds & Git)In practice, this separates execution into two distinct modes:
Supervised Diff & Command Staging (Default)
By default, agents do not write directly to your working tree or execute unvetted terminal commands. Proposed file edits are captured as structured patches, cross-reviewed if multi-model verification is enabled, and presented alongside an explicit command list. Nothing touches disk or runs in your shell until you approve it.
Timed, Per-Project Autonomy Mode
When a developer wants speed—such as scaffolding a feature, iterating on a failing test suite, or refactoring a module—switching on a timed, per-project autonomy mode grants the agent team autonomous execution strictly within user-defined boundaries:
- Permitted autonomous loop: Agents can read files, apply staged edits, run local builds and unit tests, inspect compiler errors, and create local commits iteratively until acceptance criteria pass.
- Hard-blocked runtime gates: High-risk actions—including
git push, branch merges, file deletions, modifying repository permissions, or accessing sensitive paths (.env, SSH keys, credential stores)—remain enforced at the runtime level, halting execution for human sign-off regardless of what a model outputs. - Snapshots for batch undo: Before each file is first changed during a run, Code Badger saves its original contents. One Undo restores the files the run edited (up to 16 MB), and leaves anything you changed afterwards alone. It can’t undo changes made by build or test commands.
4. Three Empirical Lessons from Our Research
Running intercognitive workflows daily across our own Go and systems codebases surfaced a few counterintuitive findings:
- Cross-model review shines on interfaces and edge cases, not formatting: Having GPT or Gemini review a Claude-generated patch catches subtle API contract mismatches and unhandled error paths far more reliably than a second pass from the same model. However, running cross-model critique on trivial boilerplate just adds latency—selective routing matters.
- Traceable decisions beat chat logs: Developers rarely re-read a 4,000-word agent chat transcript, but they will audit a structured Control Room log showing: Objective → Proposed Plan → Model B Critique → Verification Check Passed → Diff Ready. Structuring agent output around verifiable state transitions dramatically lowers review fatigue.
- BYO subscriptions eliminate adoption friction: Developers already pay for Anthropic, OpenAI, Google, or xAI plans—or run Claude Code and Codex CLIs locally. Letting engineers plug existing API keys and CLI subscriptions directly into a unified Control Room without token markups removes the economic friction of multi-model teamwork.
What’s Next
We are continuing to research formal verification hooks, multi-agent task decomposition patterns, and deterministic sandboxing for local developer environments.
If you develop on macOS and want to test this architecture on your own repositories, Code Badger 1.0.1 is the commercial release built directly from this research. It is available now at codebadger.ai as a one-time Founder’s Edition (US$49, capped at 1,500 licences, with zero recurring subscription and no SA² server in the loop for your code or prompts).