Product Introduction
- Definition: infaiw is an open-source, daemon-first AI agent harness designed specifically for the terminal environment on macOS and Linux. Built as a single Go binary weighing under 100 MiB, it operates locally as a background user service, managing durable session timelines, sidecar subagent loops, Model Context Protocol (MCP) servers, and human-in-the-loop approvals.
- Core Value Proposition: infaiw exists to give developers absolute control over autonomous coding agents through rigorous execution gates. Unlike chat-based interfaces where models grade their own work, infaiw enforces that delegated sidecar agents pass an explicit, parent-defined acceptance script before reporting completion. It solves terminal abandonment by keeping approvals waiting in a persistent background daemon, allowing seamless model switching between DeepSeek, OpenAI Codex, and Claude Code mid-session without losing historical state.
Main Features
- Sidecar Loops with Acceptance Gates: Enables parent AI agents to delegate sub-tasks to sidecar loops configured with a specific turn budget (e.g., 20, 40, or 100 turns) and a mandatory bash acceptance script. The sidecar cannot declare victory until its acceptance script exits with a status of 0, ensuring the parent defines objective completion criteria rather than trusting model self-assessments.
- Daemon-First Architecture & Durable Timelines: Runs as a lightweight background service using an engine called ISAC to route messages between sessions and mailboxes. Sessions are stored as append-only, git-like event timelines rather than flat chat logs. Every state branch, tool invocation, and subagent attempt is recorded, enabling users to branch from any point in the history or export the entire timeline as a single, filterable HTML report.
- Human-in-the-Loop Granular Approvals: Provides tiered execution policies (allow, human, deny) for system tools, file edits, bash scripts, web fetches, and MCP integrations. Consequential actions automatically pause execution and queue approval prompts that persist even if the user closes the terminal window, enabling true asynchronous task delegation.
- Multi-Model Interoperability & Dynamic Switching: Allows users to switch between DeepSeek, OpenAI Codex, Claude Code, and any OpenAI-compatible custom endpoint mid-session without altering the active timeline, system prompts, or approval states.
- Integrated MCP, Skills, and Evals Support: Built-in support for Model Context Protocol (MCP) servers with OAuth authentication, custom prompt integrations, image support via clipboard pasting and generation, and automated evaluations to verify task execution.
Problems Solved
- Pain Point: Unmonitored AI hallucination loops, runaway token consumption, and untrustworthy agent completions where models prematurely claim tasks are "done." Furthermore, traditional terminal agents trap sessions inside active windows, forcing developers to babysit long-running processes or lose state upon terminal closure.
- Target Audience: Software engineers, DevOps practitioners, open-source maintainers, and technical leads who utilize terminal-based AI coding assistants and require strict operational security, multi-model flexibility, and verifiable execution outputs.
- Use Cases: Complex multi-file refactoring projects where sub-tasks must be delegated to sidecar agents and verified against test suites; long-running background migrations that require intermittent human authorization; and auditing AI workflows through immutable, branchable session timelines.
Unique Advantages
- Strengths & Limitations (Pros & Cons):
- Pros: Exceptionally lightweight memory footprint (under 100 MiB resident memory for the server and TUI); deterministic completion gating via bash acceptance scripts; git-like append-only timeline branching; persistent background execution via user services.
- Cons: Requires familiarity with command-line interfaces and terminal workflows; setup involves configuring local model providers, API keys, or MCP servers manually; currently limited to macOS and Linux operating systems.
- Key Alternatives & Differentiation:
- Claude Code / OpenAI Codex CLI: While these native CLIs offer deep model integration, they typically run as ephemeral foreground processes with high memory footprints (often exceeding 250–700 MiB) and lack robust subagent gating mechanisms or durable branching timelines.
- Aider / Open-Source Chat Harnesses: Traditional CLI coding assistants generally operate on flat chat transcripts without background daemon services, persistent async approvals, or programmatic bash-script acceptance gates for subagents. infaiw differentiates itself through its architectural separation of the daemon engine from the TUI client, strict subagent pass/fail scripts, and minimal resource usage.
Frequently Asked Questions (FAQ)
- Question? How does infaiw prevent sidecar agents from looping infinitely and exhausting API tokens? Every sidecar loop is deployed with a strict turn budget (e.g., 20, 40, or 100 turns). If the sidecar exhausts its turn budget before its bash acceptance script exits with 0, the loop automatically halts and reports "max iterations reached" back to the parent session.
- Question? Can I use infaiw with local, self-hosted AI models? Yes. infaiw supports any OpenAI-compatible endpoint, allowing you to seamlessly connect locally hosted models or alternative providers alongside DeepSeek, OpenAI Codex, and Claude Code.
- Question? What happens to my pending approvals if I close my terminal window while infaiw is running? Because infaiw operates as a daemon-first background service (managed via systemd user services or Homebrew services), pending approvals and running sessions persist in the background. You can detach, close your terminal, and re-attach later to answer prompts and resume the session.
- Question? How does session storage work in infaiw? Sessions are structured similarly to git repositories as append-only event timelines rather than flat chat logs. Content is split into chunks with content-addressed blobs, allowing instant loading, memory-efficient scrolling, and the ability to branch from any historical point in the timeline.
