{"slug": "show-hn-cli-and-mcp-for-model-fusion-via-harnesses", "title": "Show HN: CLI and MCP for model fusion via harnesses", "summary": "Parley, a new CLI and MCP server, enables local multi-model deliberation by fusing answers from multiple AI coding agents like Claude, Codex, and Gemini into a single response, providing consensus or flagging disagreements without sending code to external APIs.", "body_md": "**Your coding agents are smarter together.**\n\nA **CLI** *and* an **MCP server** that convene a panel of the agents you already run — Claude, Codex, Gemini, and more — and fuse their answers into one.\n\nA single agent is a single model's judgment — one set of blind spots. Parley sends the same problem to a **panel** of agent CLIs, then fuses their replies: where they agree you get high-confidence consensus, where they disagree you get a flag worth your attention, and what none caught the panel surfaces. This is the multi-model deliberation behind ** Sakana's AB-MCTS** and\n\n**— both report combined models beating any single one — but running over the CLIs already on your machine, with**\n\n[OpenRouter's Fusion](https://openrouter.ai/blog/announcements/fusion-beats-frontier/)*their*auth and\n\n*your*context.\n\n**No API keys. No new vendor. Your code never leaves.**\n\nParley is **first-class both ways** — a CLI you drive, and an MCP server your agent drives. Same engine, same capabilities, whichever side you call it from:\n\n| Capability | CLI — you run it |\nMCP — your agent calls it |\n|---|---|---|\nFuse a panel into one answer |\n`par fuse \"design a rate limiter\"` |\n`fuse` tool |\nAsk another agent, with context |\n`par ask -h g -p \"…\" --context-from cl` |\n`ask_agent` tool |\nResume any agent's session here |\n`par resume` |\n`list_sessions` · `get_last_session` · `resume_command` |\nConverse — two agents, multi-turn |\n`par converse --a cl --b g -p \"…\"` |\n(compose via `ask_agent` ) |\nRoute a prompt to any agent |\n`par -p \"…\" -h <agent>` |\n— |\nConvert one config to every agent |\n`par convert` |\n— |\n\n```\n# Drive it yourself…\npar fuse \"design a rate limiter for this service\"    # panel + judge → one fused answer\n\n# …or wire it into your agent once, and let Claude convene the panel mid-task:\npar mcp connect -h cl                                # registers the MCP server into Claude\n#   then just say: \"fuse this across codex and gemini\"  → Claude calls the `fuse` tool itself\n```\n\nParley is a small, dependency-free Rust CLI (binary: `par`\n\n). It never calls a model API itself — it drives the agent CLIs you already have, so your auth, models, and permissions stay with them. The MCP server exposes the very same operations as tools, so nothing is locked to one surface.\n\n**A single agent is a single point of view.** Every coding agent ships one model's training, one model's failure modes, one model's blind spots. On the calls that matter — an architecture decision, a security review, a tricky migration — there's no second opinion, no disagreement to flag risk, no way to combine the model that reasons best with the model that writes the best code.\n\nResearch labs already proved the fix. Sakana's AB-MCTS lets frontier models cooperate at inference time and reports problems *no single model could solve* becoming solvable. OpenRouter's Fusion runs a panel plus a judge and reports a fused pair beating every individual model. The catch with both: API-side, single-vendor, and your code leaves your machine.\n\n**Parley does it locally — and fixes the other half of the problem, that the agents are silos.** Each CLI has its own headless interface (`claude -p`\n\n, `codex exec`\n\n, `gemini --prompt`\n\n, `goose run -t`\n\n, `opencode run`\n\n, `aider --message`\n\n), its own config format, and its own on-disk session store — none can see each other. So:\n\n**Agents can't combine.** Two models with different strengths have no way to review each other's work, debate, or vote on an answer.**Scripts are brittle.** Switching agents means rewriting commands, model flags, provider syntax, and env vars.**Config is duplicated.** The same instructions, commands, and MCP servers get hand-maintained once per agent.**Work gets stranded.** A conversation lives inside whichever agent you started in; you can't pick it up elsewhere.\n\n**Parley is the interoperability layer that removes all four — and turns it into collective intelligence:**\n\n**Fuse**—`par fuse \"...\"`\n\nsends your prompt to a panel of agents in parallel, then a judge (Claude by default) synthesizes one answer from their consensus, contradictions, and blind spots. Same thing is an**MCP tool**, so an agent can convene its own panel mid-task — escalation when a question is worth more than one model.** One interface**— route any prompt to any agent by changing a single flag (`par -p`\n\n,`-h <agent>`\n\n). The adapter owns the translation.**One config**— author your`.claude/`\n\npack once,`par convert`\n\ngenerates each agent's native config from it.**Portable sessions**—`par resume`\n\nlists and resumes any agent's past sessions for this folder, regardless of which agent created them.**Agents that collaborate**—`par ask`\n\nlets one agent query another (seeded with a shared session's context), and`par converse`\n\nputs two agents in a multi-turn conversation. Expose it over MCP with`par mcp`\n\nso an agent can do this itself —*\"ask Gemini to review this, with my Claude context.\"*\n\nThe result: your automation describes *intent*, not which agent is wired up today — and your agents stop being islands and start being a team.\n\nNew to fusion?The[Fusion Playbook]is the how-to for ~10× better results: when to fuse, how to pick a diverse panel, and the debate / wider-deeper / second-opinion patterns.\n\nOne command:\n\n```\ncurl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/KerryRitter/parley/main/install.sh | sh\n```\n\nThis installs `par`\n\ninto `~/.local/bin`\n\n(plus an `agent-router`\n\nalias). Make sure that directory is on your `PATH`\n\n:\n\n```\nexport PATH=\"$HOME/.local/bin:$PATH\"\npar --version          # verify\n```\n\n`par`\n\nroutes to agent CLIs — it does not install them for you automatically. Install the agents you want with[, or bring your own.]`par install`\n\n**From source** (needs [Rust](https://sh.rustup.rs)):\n\n```\ngit clone https://github.com/KerryRitter/parley.git\ncd parley\nscripts/setup.sh --install        # validates, then `cargo install --path . --force`\n```\n\nThis creates `~/.local/bin/par`\n\nand `~/.local/bin/agent-router -> par`\n\n. Ensure both `~/.cargo/bin`\n\nand `~/.local/bin`\n\nare on your `PATH`\n\n.\n\n**Direct from GitHub:**\n\n```\ncargo install --git https://github.com/KerryRitter/parley.git --branch main --force\n```\n\n**Install-script options** (append after `sh -s --`\n\n):\n\n```\n... | sh -s -- --install-dir /usr/local/bin   # custom location\n... | sh -s -- --from-source                  # force a source build\n... | sh -s -- --from-source --git-protocol ssh\n... | sh -s -- --no-agent-router              # skip the agent-router alias\n```\n\nThe script installs a prebuilt release binary for your platform when available, and falls back to a source build otherwise. (Release-binary and Homebrew distribution are planned; see [Release Plan](#release-plan).)\n\n| Command | Capability |\n|---|---|\n`par -p \"...\"` |\n\n`par fuse \"...\"`\n\n`par default <agent>`\n\n`par install <agent>`\n\n`par shims install`\n\n`claudey`\n\n/ `codexy`\n\none-shot shortcuts`par convert`\n\n`.claude/`\n\nconfig to every other agent`par resume`\n\n`par ask`\n\n`par converse`\n\n`par mcp`\n\n**fuse** a panel, ask each other, and resume sessions\n\n```\npar                                    # launch the default agent interactively\npar -p \"summarize this repository\"     # one-shot prompt\npar -h co -m gpt-5.4 -p \"add tests\"    # choose an agent + model\ngit diff | par -p \"review this patch\"  # pipe context in\npar -p \"review src\" --dry-run          # print the routed command instead of running it\n```\n\n**Choosing the agent** — `-h`\n\n/ `--harness`\n\ntakes a full name or a short code:\n\n| Code | Agent | Code | Agent | Code | Agent |\n|---|---|---|---|---|---|\n`cl` |\nclaude | `g` |\ngemini | `q` |\nqwen |\n`co` |\ncodex | `go` |\ngoose | `a` / `ai` |\naider |\n`cu` |\ncursor | `oc` |\nopencode | `aq` |\namazon-q |\n`cp` |\ncopilot | `k` |\nkimi | `ag` |\nantigravity |\n\n```\npar -h cl \"review this\"\npar -h co -m gpt-5.4 \"fix tests\"\npar -h k -p \"drain the queue\"\n```\n\nBare\n\n`-h`\n\n(no value) prints help;`-h <name>`\n\nselects an agent.\n\n| Flag | Purpose |\n|---|---|\n`-p` , `--prompt` , `--print` |\nPrompt text (`--print` is accepted for Claude compatibility). |\n`-h` , `--harness <name>` |\nTarget agent. Defaults to `claude` . Accepts short codes. |\n`--provider <name>` |\nProvider namespace, when the agent uses provider-qualified models or env config. |\n`-m` , `--model <name>` |\nModel name. |\n`--agent <name>` |\nAgent/persona/profile, where supported. |\n`--output-format <fmt>` |\nOutput mode (e.g. `json` ), where supported. |\n`--input-format <fmt>` |\nClaude-compatible input format. |\n`--permission-mode <mode>` |\nPermission/sandbox mode, where supported. |\n`--max-turns <n>` |\nMax agent turns, where supported. |\n`--cwd <path>` |\nWorking directory for the child process. |\n`--yolo` / `--no-yolo` |\nAdd / skip the agent's permission-bypass flag. On by default. |\n`--dry-run` |\nPrint the routed invocation as JSON; run nothing. |\n`--version` , `-v` |\nPrint version. |\n`--help` |\nPrint help. |\n`--` |\nPass everything after it straight to the agent CLI. |\n\n**Pass agent-specific flags** after `--`\n\n:\n\n```\npar -h cl -p \"review this\" -- --verbose\npar -h aider -p \"fix lint\" -- --yes --no-auto-commits\n```\n\n**How prompt input is resolved:**\n\n- No prompt and no stdin → launch the agent's interactive entrypoint.\n- stdin piped\n**and**`-p`\n\ngiven → stdin is placed before the prompt, blank line between. - stdin piped, no\n`-p`\n\n→ stdin becomes the prompt.\n\nEvery run adds the agent's permission-bypass flag (e.g. `--dangerously-skip-permissions`\n\nfor Claude) so automation runs hands-off. Opt out per run with `--no-yolo`\n\n, or persistently with `PARLEY_YOLO=false`\n\n. Agents with no known bypass flag (e.g. Amazon Q) simply run without one. **Opt out when running untrusted prompts or in sensitive directories.**\n\nSo you don't repeat `-h`\n\nevery time:\n\n```\npar default codex            # set default agent\npar default claude --yolo    # set agent + persist yolo\npar default --no-yolo        # keep agent, disable yolo\npar default                  # show current defaults\npar default --path           # print the config file path\npar current                  # alias for showing defaults\npar list                     # list supported agent names\n```\n\nThe default lives in `~/.config/par/default`\n\n(or `$XDG_CONFIG_HOME/par/default`\n\n; override with `PAR_DEFAULT_FILE`\n\n).\n\n```\nexport PARLEY_HARNESS=codex\nexport PARLEY_PROVIDER=openai\nexport PARLEY_MODEL=gpt-5.4\nexport PARLEY_YOLO=true\n# legacy AGENT_ROUTER_* names are still honored as a fallback\n```\n\nGenerate `*y`\n\none-shot shortcuts for yolo-capable agents:\n\n```\npar shims install            # writes claudey, codexy, ... to ~/.local/bin\nclaudey -p \"work in this sandbox\"\ncodexy \"work in this sandbox\"\n```\n\nOverride the location with `par shims install --dir <dir>`\n\nor `PAR_SHIM_DIR`\n\n. `par shims list`\n\nprints the generated names and commands.\n\n`par fuse`\n\nis the collective-intelligence command. It sends your prompt to a **panel** of agents *in parallel*, then hands every reply to a **judge** agent — Claude by default — that synthesizes a single answer: where the panel agreed (high-confidence), where it disagreed and who's right, and what it missed. Same idea as OpenRouter's Fusion and Sakana's AB-MCTS, over the CLIs you already run. It's available both as this command **and** as an [MCP tool](#mcp--fuse-ask-and-resume-from-inside-your-agent) so an agent can convene its own panel mid-task.\n\n```\npar fuse -p \"design a rate limiter for a multi-tenant API\"        # default panel: claude, codex, gemini\npar fuse \"is this migration safe to run on a live DB?\" --panel cl,co,k\npar fuse \"...\" --judge co --judge-model gpt-5.4                    # choose the judge and its model\npar fuse \"...\" --context-from cl                                  # seed every panelist with your latest claude session here\npar fuse \"...\" --panel cl,co,g --dry-run                          # print every routed command (panel + judge), run nothing\n```\n\n| Flag | Purpose |\n|---|---|\n`--panel <codes>` |\nComma-separated panel agents (short codes allowed). Defaults to `claude,codex,gemini` . Needs ≥2; duplicates are allowed (self-pairing is a valid technique). |\n`--judge <agent>` |\nAgent that synthesizes the panel. Defaults to claude. |\n`--judge-model <m>` |\nModel for the judge. |\n`--context-from <h[:s]>` |\nPrepend a prior session's transcript to every panelist, so the panel deliberates with your context (sources: `claude` , `codex` , `opencode` ). |\n`--max-context` , `--cwd` , `--no-yolo` , `--dry-run` |\nAs in\n`par ask` |\n\nPanelists run **concurrently**, so wall-clock ≈ the slowest agent + the judge, and cost ≈ N+1 agent runs. A panelist whose CLI isn't installed is skipped with a note; fusion needs at least two to succeed. Alias: `par panel`\n\n.\n\n**Fuse selectively** — it's escalation, not autopilot. Reach for it on the calls where being wrong is expensive (design, security, migrations), and use a *diverse* panel (different vendors, not three of the same model). The [Fusion Playbook](/KerryRitter/parley/blob/main/docs/fusion-playbook.md) covers when to fuse, how to pick the panel, and the debate / wider-deeper patterns that stack on top.\n\n`par`\n\ncan install the downstream agents it routes to:\n\n```\npar install list             # show installer coverage\npar install claude           # install one agent\npar install all              # install every supported agent\npar install --dry-run all    # print the exact upstream commands, run nothing\n```\n\nThe registry is transparent — `--dry-run`\n\nprints the real upstream install command. Agents without a stable one-liner (e.g. Amazon Q) print the official install page and a verify command instead of guessing.\n\n| Agent | Installer |\n|---|---|\n`claude` |\n`curl -fsSL https://claude.ai/install.sh | bash` |\n`codex` |\n`npm install -g @openai/codex` |\n`cursor` |\n`curl https://cursor.com/install -fsS | bash` |\n`gemini` |\n`npm install -g @google/gemini-cli` |\n`goose` |\n`curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | bash` |\n`opencode` |\n`curl -fsSL https://opencode.ai/install | bash` |\n`qwen` |\n`curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh | bash` |\n`aider` |\n`curl -LsSf https://aider.chat/install.sh | sh` |\n`amazon-q` |\nManual official installer page; verify with `q --version` |\n`copilot` |\n`curl -fsSL https://gh.io/copilot-install | bash` |\n`kimi` |\n`curl -LsSf https://code.kimi.com/install.sh | bash` |\n`antigravity` |\n`curl -fsSL https://antigravity.google/cli/install.sh | bash` |\n\n`par`\n\ndoes not manage agent versions; each downstream CLI owns its own upgrade flow.\n\n`par convert`\n\nports a Claude command/skill pack to other agents. Your `.claude/`\n\ndirectory (commands, skills, `agents/`\n\n, references), `CLAUDE.md`\n\n, and `.mcp.json`\n\nstay the **single source of truth**; convert generates each agent's native config from them.\n\n``` php\npar convert                       # claude -> all targets\npar convert --to kimi             # claude -> one target\npar convert --from claude --to codex\npar convert --dry-run             # show what would be written\npar convert --cwd path/to/project\n```\n\n**Source:** `claude`\n\n. **Targets:** `gemini`\n\n, `codex`\n\n, `antigravity`\n\n, `opencode`\n\n, `cursor`\n\n, `kimi`\n\n.\n\nWhat it does:\n\n**Parses frontmatter**— real descriptions, per-command`model`\n\n, argument placeholders; strips the block from bodies.**Reads** commands, skills, personas (`.claude/agents/`\n\n), references, and`.mcp.json`\n\n.**Emits native artifacts per target**— e.g.`.kimi/skills/<name>/SKILL.md`\n\n+`.kimi/mcp.json`\n\n,`.codex/config.toml`\n\n+`.agents/skills/`\n\n,`.gemini/commands/*.toml`\n\n+`GEMINI.md`\n\n,`.cursor/rules/`\n\n,`.opencode/config.json`\n\n, plus`AGENTS.md`\n\n. MCP servers in`.mcp.json`\n\nare translated into each agent's format.**Resolves cross-references**— every`/command`\n\n,`**skill** skill`\n\n, persona path, and reference path is checked against the pack. The run prints a resolution report and**exits non-zero if any reference dead-ends**, so a typo fails the convert instead of shipping a broken pack.\n\nGenerated skills carry a `par-convert:generated`\n\nmarker, so re-running replaces only its own output and never a hand-authored file. Commit `.claude/`\n\n; git-ignore the generated output. A typical `npm run sync:instructions`\n\nis just `par convert --from claude --to all`\n\n.\n\n`par resume`\n\nbrowses and resumes sessions from **any** agent, scoped to the current directory — the same scoping every agent's own `--resume`\n\nuses. It reads the transcripts each agent already writes to disk; there are no extra files to maintain.\n\n```\npar resume                      # list this folder's sessions (any agent), pick one\npar resume -h cl                # resume a claude session here (picker if several)\npar resume -h co --latest       # resume the newest codex session, no prompt\npar resume --list               # print the listing, resume nothing\npar resume --list --json        # machine-readable listing\npar resume -h cl <id> --print   # print the resume command for a session id\npar resume --cwd path/to/proj   # scope to another directory\n```\n\nA selector is either a list index (`par resume 2`\n\n) or a raw session id (`par resume -h cl <id>`\n\n). Add `--yolo`\n\nto append the agent's permission-bypass flag (off by default here, since resume drops into an interactive session).\n\n**Two tiers of support:**\n\n**Native listing**—`claude`\n\n,`codex`\n\n,`opencode`\n\n. Read straight from disk (`~/.claude/projects/<slug>/`\n\n,`~/.codex/sessions/`\n\n,`~/.local/share/opencode/storage/session/`\n\n), matched on exact cwd, with title and recency. These show up in the cross-agent listing.**Delegate resume**—`cursor`\n\n,`gemini`\n\n. Their stores are hash-scoped in a way`par`\n\ndoesn't reproduce, but the binaries self-scope to the cwd. Listing is skipped (marked`~`\n\n); resume runs the agent's own cwd-scoped resume (`cursor-agent resume`\n\n,`gemini --resume latest`\n\n).`par resume -h cu`\n\n/`par resume -h g`\n\nwork directly.\n\n`par ask`\n\nruns another agent **headless** and returns its reply as text. Because `par`\n\nalready routes a prompt to any agent, \"Claude asks Gemini\" is just routing the prompt to Gemini and capturing its output. With `--context-from`\n\n, `par`\n\nfirst reads a prior session's transcript and prepends it — so the answer is informed by that history. This is the cross-agent **context bridge**.\n\n```\npar ask -h g -p \"critique this approach in 3 bullets\"        # ask gemini, print its reply\npar ask -h g -p \"what did we decide?\" --context-from cl      # seed with your latest claude session here\npar ask -h cl -p \"continue this\" --context-from co:<id>      # use a specific source session id\npar ask -h g -p \"...\" --max-context 8000                     # cap injected context (default 12000 chars)\npar ask -h g -p \"...\" --dry-run                              # show the routed command + final prompt, run nothing\n```\n\n`--context-from`\n\ntakes `harness[:session]`\n\n; omit the session (or use `latest`\n\n) for the newest in the directory. **Context sources:** `claude`\n\n, `codex`\n\n, `opencode`\n\n(full transcripts). `cursor`\n\n/ `gemini`\n\ncan't export transcripts, so they can't be context *sources* — they can still be asked.\n\nNotes: each call is one-shot (the target keeps no memory between asks); yolo is on by default so the headless agent can't block on a permission prompt; long transcripts are truncated to the most recent turns within the budget.\n\n`par converse`\n\nputs two agents in one conversation: A speaks, B replies, A replies, and so on. Each agent is stateless and headless, so `par`\n\nitself holds the running dialogue and feeds it back every turn — `par ask`\n\n's context bridge, accumulated across the loop. Output streams turn by turn so you can watch them work.\n\n```\npar converse --a cl --b g -p \"Design a rate limiter; A proposes, B critiques.\"\npar converse --a cl --b g -p \"Agree on a name.\" --turns 8 --until AGREED\npar converse --a cl --b g -p \"Continue this.\" --context-from co     # seed turn 1 with a codex session\npar converse --a cl --b g -p \"...\" --a-model <m> --b-model <m> --dry-run\n```\n\n`--a`\n\n/`--b`\n\n— the two agents (short codes allowed).`--a-model`\n\n/`--b-model`\n\nset per-agent models.`--turns N`\n\n— total turns, alternating, starting with A (default 6; capped at 50).`--until <phrase>`\n\n— stop early when a reply contains the phrase (agents are told to emit it when done).`--context-from harness[:session]`\n\n— seed the first turn with a prior session's transcript.`--max-context`\n\n,`--cwd`\n\n,`--no-yolo`\n\n,`--dry-run`\n\nas in`par ask`\n\n. Aliases:`par debate`\n\n,`par relay`\n\n.\n\nEach turn spawns a full agent process, so cost and latency scale with `--turns`\n\n. The loop is two-party; `--until`\n\nis the way to end before the turn budget.\n\n`par mcp`\n\nruns a small [MCP](https://modelcontextprotocol.io) server over stdio (newline-delimited JSON-RPC 2.0), so any MCP-capable agent can **convene a panel and fuse it**, ask other agents questions, and resume sessions — all from inside the agent you're already in. This is how you say *\"fuse this across Codex and Gemini\"*, *\"ask Gemini to review this with my Claude context\"*, or *\"pick up my last conversation from Claude\"* without leaving your agent.\n\n**Tools:**\n\n— the collective-intelligence tool. Sends`fuse {prompt, panel?, judge?, judge_model?, cwd?, context_from?: {harness, session?}}`\n\n`prompt`\n\nto every agent in`panel`\n\n(default`claude,codex,gemini`\n\n)**in parallel**, then a judge agent (`judge`\n\n, default`claude`\n\n) synthesizes one answer — consensus as high-confidence, contradictions resolved, gaps filled, blind spots flagged — and returns it as text.`context_from`\n\nseeds every panelist with a prior session. Needs ≥2 panelists; ones whose CLI isn't installed are skipped with a note. (Same engine as the`par fuse`\n\ncommand.)`ask_agent {harness, prompt, model?, provider?, cwd?, context_from?: {harness, session?}}`\n\n— run another agent headless and return its reply, optionally seeded with a session transcript. The agent-to-agent / context-bridge primitive.`list_sessions {cwd?, harness?}`\n\n— resumable sessions for a directory, newest first.`get_last_session {cwd?, harness?}`\n\n— the most recent session plus a ready-to-run resume command.`resume_command {harness, id, cwd?, yolo?}`\n\n— build the native resume command for a session id (text; never spawns an interactive agent).\n\n**Why fuse is also a tool, not just a command:** like OpenRouter's Fusion, fusion is\n\n*escalation, not autopilot*— exposing it as a tool lets the model decide a question is worth more than one opinion and convene the panel itself, mid-task, without you running anything. (The\n\n`par fuse`\n\ncommand does the same thing from the terminal.) Use a **diverse** panel (different vendors, not three of the same model). The\n\n[Fusion Playbook](/KerryRitter/parley/blob/main/docs/fusion-playbook.md)covers when to fuse and how to pick the panel; the debate (\n\n`par converse`\n\n) and wider→deeper patterns stack on top.\n\n\"fuse this across codex and gemini: is this migration safe on a live DB?\"→ the agent calls`fuse`\n\n, Parley runs Claude+Codex+Gemini in parallel, and the agent writes one answer grounded in all three.\n\n**Register it into an agent** — `par mcp connect`\n\nruns whatever that agent needs:\n\n``` php\npar mcp connect -h cl           # claude   -> runs `claude mcp add -s user par -- <par> mcp`\npar mcp connect -h co           # codex    -> runs `codex mcp add par -- <par> mcp`\npar mcp connect -h g            # gemini   -> runs `gemini mcp add par <par> mcp`\npar mcp connect -h oc           # opencode -> opens its own interactive `opencode mcp add`\npar mcp connect -h cu           # cursor   -> merges ~/.cursor/mcp.json (no add command exists)\npar mcp connect -h cl --dry-run # show the exact command / file change, do nothing\n```\n\n`connect`\n\nregisters the absolute path of the running `par`\n\n, so it works regardless of the caller's `PATH`\n\n. Agents with a native `mcp add`\n\nare invoked directly (some, like opencode, prompt in their own TUI); cursor has no add subcommand, so its config file is merged in place, preserving existing servers.\n\nThen, from any registered agent: *\"use par to pick up my last claude session here\"* → the agent calls `get_last_session`\n\nand runs the returned `claude --resume <id>`\n\n.\n\n| Agent | Aliases | Routed command |\n|---|---|---|\n`claude` |\n`cl` |\n`claude -p \"<prompt>\"` |\n`codex` |\n`co` , `openai` |\n`codex exec \"<prompt>\"` |\n`cursor` |\n`cu` , `cursor-agent` |\n`cursor-agent -p \"<prompt>\"` |\n`gemini` |\n`g` , `google` , `google-gemini` |\n`gemini --prompt \"<prompt>\"` |\n`goose` |\n`go` |\n`goose run -t \"<prompt>\"` |\n`opencode` |\n`oc` , `open-code` |\n`opencode run \"<prompt>\"` |\n`qwen` |\n`q` |\n`qwen -p \"<prompt>\"` |\n`aider` |\n`a` , `ai` |\n`aider --message \"<prompt>\"` |\n`amazon-q` |\n`aq` , `amazonq` , `aws-q` , `amazon` |\n`q chat \"<prompt>\"` |\n`copilot` |\n`cp` , `github-copilot` |\n`copilot -p \"<prompt>\"` |\n`kimi` |\n`k` , `moonshot` , `kimi-code` |\n`kimi -p \"<prompt>\"` |\n`antigravity` |\n`ag` , `agy` , `google-antigravity` |\n`agy \"<prompt>\"` |\n\n**Per-agent flag mappings**\n\n**Claude** — `claude -p`\n\n. Supports `--model`\n\n, `--output-format`\n\n, `--input-format`\n\n, `--permission-mode`\n\n, `--max-turns`\n\n. Yolo → `--dangerously-skip-permissions`\n\n.\n\n**Codex** — `codex exec`\n\n. `--output-format json|stream-json`\n\n→ `--json`\n\n. Provider is preserved in `PARLEY_PROVIDER`\n\n(Codex receives the plain model name). Yolo → `--dangerously-bypass-approvals-and-sandbox`\n\nfor routed runs; the `codexy`\n\nshim uses `codex --yolo`\n\n.\n\n**Cursor** — `cursor-agent -p`\n\n. Plain `--model`\n\n; `--output-format`\n\nwhen accepted. Yolo → `--force`\n\n(required for print-mode file writes).\n\n**Gemini** — `gemini --prompt`\n\n. Plain `--model`\n\n; `--output-format`\n\nwhen accepted. Yolo → `--yolo`\n\n.\n\n**Goose** — `goose run -t`\n\n. `--provider`\n\n→`GOOSE_PROVIDER`\n\n, `--model`\n\n→`GOOSE_MODEL`\n\n, `--permission-mode`\n\n→`GOOSE_MODE`\n\n, `--max-turns`\n\n→`GOOSE_MAX_TURNS`\n\n, `--agent`\n\n→`--with-builtin`\n\n. Yolo sets `GOOSE_MODE=auto`\n\nunless `--permission-mode`\n\nis given.\n\n**OpenCode** — `opencode run`\n\n. `--provider anthropic --model claude-sonnet-4-6`\n\n→ `--model anthropic/claude-sonnet-4-6`\n\n. `--output-format json|stream-json`\n\n→ `--format json`\n\n. `--agent`\n\n→`--agent`\n\n. Yolo → `--dangerously-skip-permissions`\n\n.\n\n**Qwen** — `qwen -p`\n\n. Plain `--model`\n\n; `--output-format`\n\nwhen accepted. Yolo → `--yolo`\n\n.\n\n**Aider** — `aider --message`\n\n. Provider+model joined for `--model`\n\n(e.g. `anthropic/claude-sonnet-4-6`\n\n). Use `--`\n\nfor Aider flags like `--yes`\n\n. Yolo → `--yes-always`\n\n.\n\n**Amazon Q** — `q chat`\n\n. `--agent`\n\n→`--agent`\n\n. Model selection owned by Amazon Q config.\n\n**Copilot** — provisional. `copilot -p`\n\n. Yolo → `--yolo`\n\n. Validate against the installed CLI before relying on it.\n\n**Kimi** — `kimi -p`\n\n. Plain `--model`\n\n, `--output-format`\n\n. Yolo → `--yolo`\n\n. Auto-loads project MCP: when `./.kimi/mcp.json`\n\nexists (relative to `--cwd`\n\nor the process cwd), the adapter adds `--mcp-config-file <cwd>/.kimi/mcp.json`\n\n, so the project config generated by `par convert`\n\nloads automatically.\n\n**Antigravity** — experimental. Uses the `agy`\n\ncommand. Docs currently describe the interactive AGY CLI rather than a headless mode; the adapter passes the prompt and leaves version-specific flags to `--`\n\n. Yolo → `--dangerously-skip-permissions`\n\n.\n\n```\nscripts/setup.sh                 # full local validation (fmt, test, clippy, release build, agent check)\nscripts/setup.sh --strict-harnesses   # also require at least one agent CLI installed\nscripts/setup.sh --install       # validate, then install the binary\n```\n\nDirect commands:\n\n```\ncargo fmt\ncargo test\ncargo clippy --all-targets -- -D warnings\ncargo build --release\ncargo run -- -h oc --provider anthropic --model claude-sonnet-4-6 -p \"review\" --dry-run\n```\n\nExpected `--dry-run`\n\nshape:\n\n```\n{\n  \"command\": \"opencode\",\n  \"args\": [\"run\", \"--model\", \"anthropic/claude-sonnet-4-6\", \"review\"],\n  \"env\": {}\n}\nsrc/\n  main.rs              entrypoint, stdin handling, dry-run, dispatch\n  cli.rs               command-line parser\n  model.rs             provider/model resolution\n  process.rs           child process execution (inherit-stdio run + captured run)\n  json.rs              zero-dep JSON parser/serializer (used by convert, session, ask, mcp)\n  ask.rs               agent-to-agent calls (headless run + transcript context injection)\n  converse.rs          multi-turn two-agent conversation loop\n  fuse.rs              panel fusion engine — parallel panel + judge (`par fuse` and the mcp `fuse` tool)\n  mcp.rs               stdio MCP server (resume tools + ask_agent + fuse) + `mcp connect`\n  harness/             per-agent adapters (claude, codex, cursor, gemini, goose,\n                       opencode, qwen, aider, amazon_q, copilot, kimi, antigravity)\n    mod.rs             Harness trait, Request, HarnessFactory, normalize_harness\n    invocation.rs      command/args/env representation\n  convert/             .claude/ reader + per-target writers + cross-reference resolver\n  session/             cross-agent session discovery, resume, and transcript export\n    mod.rs             SessionStore trait, SessionRef, Turn, listing + resume + context\n    claude.rs codex.rs opencode.rs   native parsers (cwd-scoped listing + transcripts)\n    cursor.rs gemini.rs              delegate adapters (resume via native CLI)\n  installer.rs         agent installer registry\n```\n\n**Design constraints:** no `sh -c`\n\n(adapters build argv directly); no hidden API calls (only starts local CLIs); no login handling (authenticate each agent separately); agent-specific behavior stays in its module; provider/model transforms stay centralized in `model.rs`\n\n; `--dry-run`\n\noutput stays stable enough for tests.\n\n- Create\n`src/harness/<name>.rs`\n\nand implement`Harness`\n\nfor a small adapter struct. - Register it in\n`HarnessFactory::default()`\n\n. - Add aliases in\n`normalize_harness()`\n\nif useful. - Add dry-run tests (command, args, provider/model, env, passthrough).\n- Document it in this README.\n\n```\nuse super::{add_passthrough, plain_model, Harness, Invocation, Request};\n\npub(crate) fn new() -> Box<dyn Harness> {\n    Box::new(ExampleHarness)\n}\n\nstruct ExampleHarness;\n\nimpl Harness for ExampleHarness {\n    fn build(&self, request: &Request) -> Result<Invocation, String> {\n        let mut args = vec![\"run\".to_string(), request.prompt.clone()];\n        if let Some(model) = plain_model(request) {\n            args.extend([\"--model\".to_string(), model]);\n        }\n        Ok(Invocation::new(\"example\", add_passthrough(args, request)))\n    }\n}\n```\n\nWorking infrastructure for local automation.\n\n**Done:** dependency-free Rust CLI · shared `claude -p`\n\n-style prompt surface · isolated per-agent adapters · agent installers · provider/model resolution · dry-run routing · cross-agent session resume · agent-to-agent calls with context bridging · multi-turn two-agent conversations · panel fusion (`par fuse`\n\n+ mcp `fuse`\n\ntool) · stdio MCP server · validating setup script.\n\n**Not yet:** GitHub Actions release builds · Homebrew formula · end-to-end smoke tests against every vendor CLI · a stable semver contract per agent mapping.\n\n`scripts/setup.sh`\n\n.- Smoke-test locally available CLIs with\n`--dry-run`\n\n. - CI:\n`cargo fmt --check`\n\n,`cargo test`\n\n,`cargo clippy --all-targets -- -D warnings`\n\n, and release binaries for Linux/macOS/Windows (`par-<target>.tar.gz`\n\n/`.zip`\n\n). - Add archive checksums, publish a GitHub release.\n- Add a Homebrew tap once artifact names are stable.\n\n`par`\n\ndoes not inspect or redact prompt content. Anything passed via stdin or `-p`\n\nis forwarded to the selected agent, which may send it to its configured provider.\n\n**Yolo (permission bypass) is on by default** — each run adds the agent's bypass flag unless you pass `--no-yolo`\n\nor set `PARLEY_YOLO=false`\n\n. This favors hands-off automation over sandboxing; opt out for untrusted prompts or sensitive directories. Use `--dry-run`\n\nto validate automation that may include secrets before running it.\n\nWritten against public docs (checked May 19, 2026): [Claude](https://code.claude.com/docs/en/cli-reference), [Codex](https://www.mintlify.com/openai/codex/advanced/exec-mode), [Cursor](https://docs.cursor.com/en/cli/using), [Gemini](https://google-gemini.github.io/gemini-cli/docs/cli/), [OpenCode](https://dev.opencode.ai/docs/cli/), [Qwen](https://qwenlm.github.io/qwen-code-docs/en/cli/index), [Aider](https://aider.chat/docs/scripting.html), [Amazon Q](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-reference.html), [Goose](https://block.github.io/goose/docs/tutorials/headless-goose/), [Antigravity](https://antigravity.google/docs/cli-using). Installer commands live in `src/installer.rs`\n\n. Agent CLIs change fast — re-check these surfaces before a public release.", "url": "https://wpnews.pro/news/show-hn-cli-and-mcp-for-model-fusion-via-harnesses", "canonical_source": "https://github.com/KerryRitter/parley", "published_at": "2026-06-24 13:43:51+00:00", "updated_at": "2026-06-24 14:10:18.454782+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "large-language-models", "ai-tools", "ai-infrastructure"], "entities": ["Parley", "Claude", "Codex", "Gemini", "Sakana", "OpenRouter", "AB-MCTS", "Fusion"], "alternates": {"html": "https://wpnews.pro/news/show-hn-cli-and-mcp-for-model-fusion-via-harnesses", "markdown": "https://wpnews.pro/news/show-hn-cli-and-mcp-for-model-fusion-via-harnesses.md", "text": "https://wpnews.pro/news/show-hn-cli-and-mcp-for-model-fusion-via-harnesses.txt", "jsonld": "https://wpnews.pro/news/show-hn-cli-and-mcp-for-model-fusion-via-harnesses.jsonld"}}