A practical workflow lets coding agents like Claude, Codex, and Gemini interact via CLI resume modes or tmux without API fees, enabling multi-agent experimentation while raising questions about whether increased interaction improves output quality or just refines hallucinations.
Developers seeking to run multi-agent AI workflows without incurring additional API costs have adopted a lightweight pattern leveraging existing agent subscriptions and CLI tools. The approach centers on making agents invoke each other through command-line interfaces in a way that preserves conversation context, avoiding the need for paid API usage or complex integrations.
The core technique uses resume modes available in agents like Codex and Gemini. Instead of initiating a fresh session each time, an agent commands another to continue the most recent interaction using flags such as codex exec resume --last "prompt" or gemini -r latest -p "prompt". This allows sequential critique and revision—for example, having Claude generate a draft, then invoking Codex to review it in resume mode, with Claude refining the draft based on the feedback. The pattern relies on a shared convention file (stored in the agent's memory) defining invocation rules so all participants know how to sustain the interaction.
For better visibility during experimentation, some developers supplement this with tmux. By creating isolated tmux sessions via custom sockets, agents can operate in parallel panes where their output is directly observable. Commands like tmux -S "$SOCKET" send-keys -t target -l -- "cmd" followed by Enter send prompts, while capture-pane retrieves recent output for logging or debugging. This variant requires tmux installation but offers real-time monitoring of agent exchanges.
The method appeals to those prioritizing rapid, low-friction testing over production-grade observability. As one developer noted, it enables useful practices like extending a Claude session by delegating review to Gemini or using different vendors' models to challenge a single draft—mitigating reliance on any one provider's internal subagent systems. However, the approach trades transparency for simplicity; tracking interaction history or diagnosing workflow issues becomes more cumbersome without dedicated tooling.
Critically, the author questions whether increased agent-to-agent interaction inherently improves outcomes. While models readily reach consensus through iterative dialogue, there's concern that prolonged exchanges may merely polish initial hallucinations rather than correct them. This skepticism positions the workflow as a tool for exploration—not a guaranteed path to superior results—emphasizing its role in testing whether multi-agent perspectives yield meaningful gains over single-model refinement.
The pattern requires no new dependencies beyond standard agent CLIs and optional tmux, fitting within existing subscription tiers. For developers curious about agent collaboration but wary of API expenses or framework overhead, it offers an accessible starting point to vet concepts like adversarial review or cross-model validation before investing in more complex orchestration layers.
Comments
Please log in or register to join the discussion