AI Coding Assistants Calling Each Other: Architecture, Security, and Cross-Review

    This article examines the shift from single-assistant chat to tool-based collaboration, where one AI coding assistant can invoke another through plugins and local process communication. It breaks down the two-channel technical foundation (local CLI and a persistent app server), a four-step installation and readiness-check pattern, and a command-space taxonomy covering read-only review, adversarial review, task delegation, and background subagents. It also assesses the real benefits and limits of cross-model review, outlines security and compliance boundaries for same-machine, same-privilege runtimes, and gives a phased rollout plan for enterprise teams.

    When AI Coding Assistants Start Calling Each Other

    From Single-Assistant Chat to Multi-Assistant Collaboration

    Over the past two years, intelligent coding tools have evolved through three stages. First came code completion, which pushed suggestions down to the editor cursor. Then came conversational generation, where developers describe intent in natural language and the model produces blocks of code. The third stage is tool-based collaboration: a coding assistant no longer just answers questions, but can invoke external processes, external services, and even another assistant to complete a closed-loop task.

    A recent signal worth noting: a cloud vendor released a plugin for its own coding assistant that targets a “competitor assistant,” under a permissive open-source license, and it picked up thousands of stars within half a day of release. The technical meaning of this move matters far more than its marketing meaning: the boundary between assistants is shifting from “mutually exclusive” to “interoperable,” and the vehicle for that interoperability is a plugin mechanism plus a local process communication protocol.

    For developers, what matters is not “who built a plugin for whom,” but three general questions:

    • How can two independent AI coding runtimes safely handshake on the same machine?
    • Once things are plugin-based, how should the command space (slash commands) and subagents be organized so they do not pollute each other’s context?
    • Is cross-review (one model reviewing code written by another) genuinely valuable in engineering, and where are its limits?

    This article takes a neutral view of the mechanism, replacing all product and command names with descriptions of general capabilities.

    The technical skeleton of these interoperability schemes is usually plain and not mysterious. It can be abstracted into two channels:

    1. Local command-line channel: The host assistant launches the other party’s CLI as a child process, passes in a one-shot task description, and reads standard output and structured results. The advantage is zero dependencies and easy debugging; the drawback is that it is stateless, so context must be reloaded on every call.
    2. Persistent service channel (app server mode): The other party runs as a long-lived process listening on a local port. The host sends session requests in an agreed message format, and the server maintains session state and returns an incremental event stream. This suits long tasks, multi-turn iteration, and background execution.

    Both run on the same machine under the same user privileges, so the security boundary relies entirely on the operating system’s process and file permissions, not on network isolation. This determines that the security recommendations later in this article are not optional.

    From an engineering perspective, this design has three direct consequences:

    • No shared context: Each assistant maintains its own session and memory. The host passes only the task description and necessary file paths, so there is no “implicit cross-talk,” but it also means background must be supplied explicitly.
    • Graceful degradation: When the external runtime is unavailable, the host assistant can still complete the work on its own. The plugin is an incremental capability, not a hard dependency.
    • More complex observability: A single user request may span the logs of two runtimes, and a unified tracking identifier (such as a request ID that runs through the whole call chain) is needed to locate problems.

    Installation and Readiness Checks: A Four-Step Pattern and Prerequisites

    Installing this kind of plugin usually converges on a four-step pattern, which is worth remembering as a general template:

    1. 1. Add a plugin marketplace source → register a repository address where plugins can be discovered
    2. 2. Install the specified plugin → place it in the local plugin directory and write the configuration
    3. 3. Reload plugins → make the host rescan command and subagent definitions
    4. 4. Run a readiness self-check → verify the external runtime exists and the version matches

    The prerequisite is generally Node.js 18.18 or later (modern CLI tools commonly depend on runtime features of that LTS version). The readiness self-check is the step most likely to be skipped, yet it is the most critical: it checks whether the external runtime is installed, and if it is missing and the machine has a package-management environment, it prompts to install it automatically; manual global installation is also allowed.

    First use requires one-time authentication. The industry generally supports two approaches: account-authorized login (a browser authorization-code flow, with the token stored locally) and an API key (injected via environment variables or a configuration file). The engineering recommendation is to use a key in CI, account authorization for local development, and never write tokens into the repository or shared dotfiles.

    The pseudocode logic of the self-check script is roughly as follows and can serve as a reference when building your own plugin:

    1. async function ensureRuntime() {
    2. const bin = await which('external-agent-cli');
    3. if (!bin) return await promptAutoInstall(); // prompt to install if a package manager exists
    4. const version = await run(`${bin} --version`);
    5. if (!satisfies(version, '>=1.0.0')) return fail('version too low');
    6. const authed = await run(`${bin} whoami`);
    7. if (!authed.ok) return fail('not logged in; run the login command');
    8. return ok();
    9. }

    Command Space Design: Review, Adversarial Review, Delegation, and Background Tasks

    Once the plugin is loaded, the host gains a set of slash commands and a dedicated subagent. Abstracting away the specific naming, they fall into four capability categories, which also serve as a general taxonomy for designing a multi-assistant command space:

    (1) Standard read-only review
    Review the current uncommitted changes, or the full diff of the current branch against a baseline branch, read-only with no modifications. Typical parameterization includes specifying a baseline (--base main) and background execution (--background). It fits pre-commit self-checks and an overall checkup before merging a branch. Its value is a “second pair of eyes,” and such commands usually do not accept a custom review direction, in order to keep output stable and comparable.

    (2) Adversarial review
    This is the more interesting category. It is not satisfied with finding bugs; it questions the design itself: Does this premise hold? Is this trade-off worth it? Is there a safer or simpler alternative implementation? What are the failure and rollback paths? It fits pre-release stress testing, with emphasis on key areas such as authentication and authorization, data-loss risk, race conditions, and rollback strategy. The engineering recommendation is to treat it as an automated precursor to a review meeting, not a mandatory CI gate, because what it produces is a judgment call, not a true/false answer.

    (3) Task delegation
    Break a large task off to the external runtime for execution, with the host responsible for aggregation. The key design is contractualization: define the inputs (file scope, constraints, acceptance criteria), the outputs (patch, report, tests), and the areas that must not be touched. Delegation without a contract is equivalent to handing the repository to an uncontrolled writer.

    (4) Background tasks and subagent management
    Put long tasks in the background to avoid blocking interaction; run subagents in an independent context to prevent the main session from being flooded with logs. The implementation essentials are that task status is queryable, cancellable, and re-entrant, plus a concurrency limit, since running three rewrite-type tasks at once creates far more conflict probability than benefit.

    Is Cross-Review Actually Useful: Benefits, Bias, and Engineering Constraints

    The benefits of multi-assistant mutual review are real and come mainly from differences in training distribution and prompt bias: different models place their attention differently on the same code, and a boundary one model tends to overlook may be spotted at a glance by another. But three constraints must be acknowledged:

    • Correlation is not correctness: Two models may share the same class of wrong intuition, and unanimous approval does not mean the absence of defects.
    • Noise cost: Adversarial review produces a large number of “could be better” suggestions, and if they are not graded (blocking / suggestion / optional), the team will quickly learn to ignore it.
    • Context cost: Passing context across runtimes creates dual pressure of length and redaction, and sensitive information should be filtered before it enters the external runtime.

    The recommended division of roles is therefore: the host assistant handles implementation and local modifications, the external runtime handles independent review and design interrogation, and the human handles final adjudication and prioritization.

    Security and Compliance: Drawing the Boundary Outside the Process

    Because the two runtimes share the same machine and privileges, security design must be explicit:

    1. Least privilege: Run the external runtime under a restricted account, with the repository directory mounted read-only outside it.
    2. Key isolation: Tokens go through environment variables or the system keyring, and are barred from logs and command-line history.
    3. Read-only reviewers: Review-type commands should be unable to write at the filesystem level, rather than relying on prompt constraints.
    4. Full-chain auditing: Record the task summary, file scope, and duration of every cross-runtime call for traceability.
    5. Data-egress assessment: If the external runtime may send code to a remote inference service, evaluate it against enterprise compliance requirements, and switch to a locally deployed model or private inference capability if necessary.

    Recommendations for Enterprise Adoption

    To replicate this pattern within a team, proceed in four steps: first pilot read-only review on non-core repositories and accumulate false-positive data; then introduce adversarial review and establish a grading standard for suggestions; next open up controlled task delegation, with contract templates and concurrency limits in place; finally connect a unified observability system that brings cross-runtime calls into monitoring, alerting, and logging services. At the infrastructure level, code hosting, build pipelines, container platforms, and object storage can all keep their existing solutions unchanged; the plugin mechanism only adds a layer of orchestration and requires no refactoring.

    Conclusion

    “One assistant building a plugin for another assistant” is essentially about orchestrating model capability as a pluggable process. For developers, the real takeaway is not one more command, but one more architectural habit: wrapping uncertain intelligent output into callable units with clear input/output contracts, read-only boundaries, and audit records. Whoever draws this boundary clearly will gain the initiative in the next stage of intelligent coding collaboration.