!
This article is a repost from Claude Code 始めました.
I released aiterm-mcp as a tool to "let an AI hold a persistent terminal and cut down on tokens." But as I used it, I realized the real value of a persistent terminal lies elsewhere: it lets you run interactive commands as-is.
Being able to run interactive commands means the parent Claude can launch codex inside it and talk to it directly. Claude can control the Codex CLI. This is quietly effective.
I was just building rpgdev (a tool that turns AI work into an RPG in the corner of your screen), and I needed music, hero and monster art, sound effects, backgrounds, and effects. While writing the logic with Claude, I wanted to outsource only the creative parts to Codex. It's a well-known fact that Claude isn't strong with visuals and audio, so I wanted to honestly delegate those to a different tool.

The actual rpgdev overlay. Hero, spirit, monster, dungeon background, and quest log 'Build the API' animate in the corner. The art, music, and sound effects were all produced by Codex.
The real snag wasn't that. If I had Codex create art while Claude was writing logic and tried to integrate it into the same project, they'd conflict—because both were touching the same files. It was a minor annoyance, but that friction disappeared once I made Codex a subordinate via aiterm.
Side-by-side feels wrong
If I just wanted another brain, I could run Codex alongside Claude. That was my initial thought.
But actually doing it felt a bit off. With two AIs touching the same repo, I'd have to pause one while the other worked, saying, "Wait while I write here." Commits would split too. When I looked at the history, it had branched left and right, and I was like, "Whoa."
To be honest, there wasn't any real harm from this. It didn't break anything. But thinking ahead, if I left both unsupervised, they'd inevitably fight over the same lines and create chaos. That uncomfortable feeling was a precursor.
With aiterm, Codex becomes a "subordinate"
If side-by-side causes collisions, stack them vertically instead.
The parent Claude grabs the terminal via aiterm and launches Codex inside it. Then the parent just throws tasks like "make this song" or "draw this enemy" at Codex, and Codex returns only the assets. The parent receives them and continues with the main task (the game logic).

Side-by-side: two AIs fight over the same repo, causing divergent commits. Parent-child: parent Claude controls Codex via aiterm, serializing tasks to avoid conflicts.
The key is that the parent controls all ordering. In parallel, two AIs randomly hit the same files, but in a parent-child setup, the parent serializes like "You're next," "Now me," creating a single path for who touches what and when. That makes conflicts impossible by design.
And it worked almost effortlessly. The Codex CLI sometimes asks for approval mid-task, but through aiterm, which can handle interactive sessions, the parent can wait and manage that too. Almost no special tricks were needed.
I'm out of the coordination game
The best part is that I can step away.
When running two AIs in parallel, every time a conflict was near, I'd have to jump in and say, "That's Codex's job," or "Switch that back to Claude." Essentially, I was a traffic controller.
The moment I switched to a parent-child setup, that role disappeared. The parent Claude handles the orchestration, from assigning tasks to Codex to integrating the returned assets—all within the parent. All I had to say was "Build rpgdev," and then I could just watch the main storyline unfold.
The music for rpgdev, the hero and monster graphics, sound effects, backgrounds, and various effects—all came out through this flow. I never once had to assign which file belonged to whom.

The boss sprite returned from 'Draw this enemy.' A Magma Golem with cracked obsidian body and lava veins. Transparent background, ready for the game.
Parent-child is determined by who holds the terminal
I also noticed that this parent-child relationship isn't fixed.
The one holding the terminal is the parent, and the one being held is the child. That's it. So conversely, you could give aiterm to Codex and have Codex call Claude as a subordinate. I haven't tried it, but I suspect it would work fine. After all, both are just CLIs.
You can freely decide which one sits at the top. In this case, I happened to be developing with Claude, so Claude became the parent.
Another use for aiterm
This isn't about productivity; it's about feeling.
You can hand over an entire domain you're weak in to another brain, fully under your control. And since the parent even takes care of that brain's needs, I'm freed from coordination. It feels like I'm having AI take care of another AI, and honestly, it feels great.
aiterm was meant to be a "hold the terminal and cut tokens" tool. But since it can handle interactive commands directly, it turns out it can also control other CLIs running inside. All I did was give it a terminal. The rest just ran on its own, parent and child.
Top comments (0)