# Framework comparison

Whole frameworks only. Subsystem detail stays in the [linked comparisons](#status).

## Conclusions

| Finding | Result |
| --- | --- |
| Strongest | Sessions are graphs, and code execution is recorded as nodes. |
| Weakest | Standard local entry points exist; a stable remote-control contract does not. |
| Unexpected | Codex code mode: model-written code invokes tools. |

**Strongest: evidence**

- No second implementation among the twelve was confirmed to record the function call tree in conversation history.
- Model tool results and successfully persisted Agent method calls (session DAG recording on, `expose` not `hidden`) are code nodes. They share caller and predecessor edges with user and llm nodes, in the session's append-only log. Multiple heads reference different history branches.
- OpenClaw Control UI has fork, rewind and branch; pi-mono JSONL carries parentId and `/tree` switches branches. OpenProgram adds one DAG across user, llm and code nodes, where code nodes hold both tool results and nested calls.
- Transcript branches and worktrees are independent. Agent branches share the working directory; only jobs bound to `worktree_id` isolate file changes.

`runtime/context/git/dag.py` · `state/store/session/session_store/` · `runtime/agent/call_state.py`

**Weakest: evidence**

- Present: bundled, dynamic community and custom providers, MCP client, skills, plugins, an authenticated stdio MCP server for tools, an ACP server for sessions and an OpenAI-compatible `/v1/chat/completions` on the Worker.
- Unconfirmed: stable versioned remote-control SDK, complete public headless event protocol, maintained IDE extension. Owner-authenticated WebSocket and Python library entry points are internal or embedded and promise no external compatibility.
- OpenProgram and OpenClaw both keep agent guidance in agent workspaces. OpenClaw ships `migrate-claude` and `migrate-hermes`; Codex desktop and CLI import Claude Code and Cursor setup and recent work. OpenProgram has no importer for external sessions, configuration or skills.

`extensions/mcp/server/server.py` · `interfaces/acp/server.py` · `interfaces/cli/commands/capabilities/mcp.py` · `runtime/agent_registry/workspace.py`

**Unexpected: evidence**

- The model writes JavaScript that invokes tools in the current turn. In `CodeModeOnly` the visible tools are only `exec` and `wait`. Four crates and a V8 runtime implement it; the feature registry disables it by default, so checking default behaviour misses it.
- OpenProgram generates a workflow package and runs a versioned Python workflow after static validation and atomic publication. It has neither per-turn code mode nor a surface reduced to `exec` and `wait`.

`codex-rs/features/src/lib.rs` · `code-mode`, `code-mode-host`, `code-mode-protocol`, `code-mode-runtime`, `v8-poc`

By use case. Coding: three core Python and TypeScript LSP tools (diagnostics, references, definition); no maintained IDE extension, formatter collection, tree-sitter index or GitHub Action. General harness: OpenClaw and Hermes have far more integrations than OpenProgram's four channels.

## OpenProgram

A general-purpose Python agent harness for one local user: the `openprogram` command and a persistent worker on port `18100`.

- **Surfaces**: TUI (Ink and React), Web (Next.js), Electron desktop, four channels: Telegram, Discord, Slack, WeChat
- **Turn processing**: Surfaces share `ChatAgent().run_turn`; the Python library enters through `Agent` or Runtime straight into `agent_loop`. Context assembly L0, L1, L2; compact when over budget; `tool.before` gate can deny; finalize writes ContextCommit output and Git commits
- **Threads**: Web and TUI: daemon thread per turn. JobRunner: bounded pool. Dispatcher: asyncio loop per turn. Scheduler: threads and processes
- **Session storage**: One append-only log per session is the source of truth, three roles (user, llm, code), caller and predecessor edges, branch heads. `context/commits/` holds per-turn context records
- **Other storage**: `usage.db`: SQLite usage ledger. Memory: Markdown with rebuildable in-memory BM25 and embedding indexes, background writes, three `memory_*` tools
- **Tools**: Dynamic registry in four domains (todo, task, agent, message); deferred catalog plus `tool_search`
- **Extensions**: MCP client and server, ACP, skills, plugins, 37 events, `agent.json`; bundled, dynamic and custom providers
- **Authentication**: Web and WebSocket: `owner_auth` with a per-start token and profile-specific cookie. Channels: pairing and allowlists (`interfaces/channels/inbound/_access.py`), a separate source-identity boundary. Not multitenant

### Codebase size

| Project | First-party lines |
| --- | --- |
| openclaw | 1,987,813 |
| codex-cli | 1,070,595 |
| hermes-agent | 544,917 |
| opencode | 366,499 |
| OpenProgram | 254,320: Web 73 thousand, TUI 35 thousand, `openprogram/` 134 thousand |
| pi-mono | 116,599 |
| weclaw | 5,723: WeChat forwarding and ACP calls |
| pi-ai | 4,021: read-only slice of pi-mono `packages/ai`, protocol reference for the Python Codex provider, no capability comparison |

Only .py, .ts, .tsx, .js, .rs, .go; no tests, node_modules, dist, target or vendor. Static counts at fixed revisions. Size indicates complexity, not quality. OpenClaw and Codex's lead is mainly channels, TUI and IDE integration.

## Twelve references

Claude Code, Codex, OpenClaw and OpenCode capabilities come from the official stable releases in [evidence](#method). Code counts, internals and other references come from fixed versions. These are not one audit.

### Four execution models

| Model | Shape | Examples and state |
| --- | --- | --- |
| Single process | Terminal, agent loop, model. Exits when done | pi-mono: JSONL session tree, parentId links, leaf is current. weclaw: forwards to an external ACP agent |
| Local client and server | TUI client over RPC to an HTTP server in a worker | opencode only: SQLite and Drizzle, messages in a seq log, system-context snapshots in an epoch table |
| Persistent daemon | Channels, Web and TUI share one process with session routing and a registry | OpenProgram: append-only log per session. hermes-agent, codex: SQLite. openclaw. claude-code: JSONL per project |
| Remote execution | Local session, remote or cloud commands | codex: remote and cloud tasks. claude-code: cloud teleport. openclaw: optional cloud workers, managed worktrees. hermes: seven backends. OpenProgram: `docker.py`, `ssh.py` backends, no sandbox integration or hosted service |

### By dimension

| Dimension | OpenProgram | Standing |
| --- | --- | --- |
| Product form | General-purpose harness | — |
| Target user | Single local user | — |
| Execution model | Persistent worker | Comparable |
| State storage | Append-only log per session | Ahead |
| Context assembly | L0/L1/L2 component registry | Ahead |
| Project instructions | AGENTS.md in agent workspace | Comparable |
| Tool surface | Dynamic registry; persistent presets + deferred tool_search catalog | Comparable |
| Permission approval | Five modes + rules + tool.before gate | Comparable |
| Extensions | Plugins + skills + MCP client + 37 events | Comparable |
| Channels | Four | Behind |
| Interfaces | TUI + Web + Electron | Comparable |
| External interfaces | Authenticated stdio MCP server + ACP; no stable remote SDK | Comparable |
| Observability and billing | Append-only ledger with cache reads/writes and itemized costs | Comparable |

**The other seven, by dimension**

| Dimension | claude-code | codex | opencode | pi-mono |
| --- | --- | --- | --- | --- |
| Product form | Coding CLI + cloud | Coding CLI + cloud | Coding CLI + SaaS services | Coding TUI + library |
| Target user | Individual, subscription or enterprise | Individual; seven configuration layers | Individual developer | Single local user |
| Execution model | In-process + background supervisor + cloud VMs | In-process + App Server + cloud | Local client/server separation | Single process |
| State storage | JSONL files per project | Rollout JSONL + five SQLite databases | SQLite + Drizzle | JSONL session tree |
| Context assembly | Stable content first for prompt caching | Per-model prompts compiled into the binary | 13 model-specific prompt sets | Prompt restricted to enabled tools |
| Project instructions | Four CLAUDE.md levels, including system-wide | AGENTS.md accumulated below Git root | Global + project; first match | All ancestor directories |
| Tool surface | About 45 in the official reference, many conditional; ToolSearch | About 28; code mode can reduce to two | 16; model-dependent apply_patch | Seven; three disabled by default |
| Permission approval | Six modes: default/acceptEdits/plan/auto/dontAsk/bypassPermissions | Four, including Granular; execpolicy DSL | Ask by default; Bash command tokenization | None; tool allowlist only |
| Extensions | Plugin marketplace + 33 hook events; command count undocumented | Plugin marketplace + 11 hooks; model can self-install | Plugins with 19 hooks; can render inside TUI | About 40 events + package manager; no MCP |
| Channels | Remote Control, Slack; Telegram, Discord and iMessage channels in research preview | Slack integration; depends on cloud account and workspace configuration | GitHub + Slack + ACP + two IDEs | None |
| Interfaces | Terminal UI + Vim + voice dictation | ratatui; IDE context over sockets | OpenTUI + Web + Electron | Custom TUI framework that can run DOOM |
| External interfaces | Agent SDK + Remote Control | App Server + Python/TypeScript SDK; `codex mcp-server` deprecated | HTTP service + JS SDK + ACP | RPC mode + JSON mode + SDK |
| Observability and billing | OTel; print-mode budget cap and spend limits | OTel + analytics; tokens but no currency amounts | OTel + data lake; stats command | Optional installation counts; scripted cost aggregation |

| Dimension | openclaw | hermes-agent | weclaw |
| --- | --- | --- | --- |
| Product form | Multichannel gateway platform | Personal assistant + research harness | WeChat relay |
| Target user | Single operator; multiple channel users | Individual; pairing codes for strangers | Individual; no authentication |
| Execution model | Gateway + paired devices, opt-in cloud workers and managed worktrees | In-process + gateway daemon | Forwarding daemon |
| State storage | Per-agent SQLite for runtime state and transcripts; JSONL only for archives or legacy migration | SQLite + FTS5 | In memory; lost on restart |
| Context assembly | Workspace files + bootstrap budget | Three layers: stable/context/volatile | None |
| Project instructions | Workspace AGENTS/SOUL/TOOLS | Four formats + subdirectory guidance | None |
| Tool surface | About 35 in 11 groups; tool_search | About 82; 32 toolsets | Zero |
| Permission approval | Layered restrictions; approval cards in chat | 55 dangerous patterns; auxiliary-LLM auto-approval | Automatically approve all |
| Extensions | 126 plugins + 59 skills + ClawHub | 20 hooks + shell-script hooks + 178 skills | Configuration file only |
| Channels | Ten native channels; over 20 plugin channels | About 26, plus webhooks and cron | One |
| Interfaces | TUI + control panel + macOS/iOS/watchOS/Android nodes | Ink TUI + React Web | Terminal only |
| External interfaces | Three MCP server forms + OpenAI compatibility + 74 RPCs | MCP server + OpenAI compatibility + ACP | Local HTTP push |
| Observability and billing | Trace export + OTel + Prometheus | Log redaction + Langfuse; provider quota retrieval | One log file |

OpenProgram, OpenClaw and Hermes all serve multiple entry points from persistent services. Remaining gaps: channel breadth, stable remote SDK, cross-worker session placement, complete versioned headless event contract. Unpinned star, fork and skill counts are not evidence.

## Separate pages

| Page | Contents |
| --- | --- |
| [Missing capabilities](https://fzkuji.github.io/OpenProgram/docs/reference/design/framework-comparison/capability-differences.html#blind) | What the twelve have that subsystem comparisons missed |
| [Distinctive mechanisms](https://fzkuji.github.io/OpenProgram/docs/reference/design/framework-comparison/capability-differences.html#ours) | What OpenProgram has, and its closest counterparts |
| [Four Chinese CLIs](https://fzkuji.github.io/OpenProgram/docs/reference/design/framework-comparison/capability-differences.html#cn) | What each Tencent CLI changes from upstream |

## Candidates

| Item | State | Where |
| --- | --- | --- |
| Scripted provider | Partial: test-only | `tests/component/providers/scripted_provider.py` |
| MCP server | Done: authenticated stdio, allowed tools only, existing registration, permission modes and allow patterns. No remote SDK, OpenAI-compatible endpoint or inbound webhooks | `extensions/mcp/server/server.py`, `interfaces/cli/commands/capabilities/mcp.py` |
| Trajectory export | Partial: Markdown or HTML, redacted | `state/store/session/reading/export.py` |
| Recoverable deletion | Partial: `trash list`, `trash restore`, manifest | `host/sandbox/recoverable_delete.py`, `interfaces/cli/commands/maintenance/trash.py` |
| Feature registry and default stages | Not implemented | None |
| External session and configuration import | Not implemented. External-CLI credential discovery migrates none of this | None |

Remaining work needs separate design, estimation and approval. Excluded: training-data pipelines, a native mobile app, a complete formatter collection, a new execpolicy-style argument DSL. ToolName prefix, glob and exact rules and the Python and TypeScript LSP tools stay; more languages follow concrete demand.

## Target

| Goal | Target |
| --- | --- |
| A session is portable, shareable and reproducible | The session log already holds the whole graph. Transfer it to another machine, publish it redacted, branch from any node: one representation, not three export formats. |
| Other programs operate OpenProgram through stable contracts | MCP server and ACP exist. Still needed and unapproved: a stable versioned remote-control contract and external session and configuration import. |
| One capability registry, one reproducible record | Each capability has a stage and default switch; every run can export a redacted complete trajectory. |

## Evidence

| Reference | Evidence | Notes |
| --- | --- | --- |
| OpenProgram | Current code, CLI, Web and TUI entry points and their tests | MCP server, ACP, LSP, mid-turn steering, Scheduler, cross-session agent provenance, session export, cross-provider history compatibility and recoverable deletion were checked against current implementation boundaries. Design-only candidates are not marked complete. |
| claude-code | [Official stable release `v2.1.252`](https://github.com/anthropics/claude-code/releases/tag/v2.1.252) and [official documentation](https://code.claude.com/docs/en/overview) | Only public documentation and releases are used; anything they do not describe is treated as undocumented. |
| codex | [Official stable release `rust-v0.152.0`](https://github.com/openai/codex/releases/tag/rust-v0.152.0) and [official documentation](https://learn.chatgpt.com/docs) | Worktrees, cloud, Web, GitHub, Slack, Automations, import and App Server/SDK count as official public capabilities. Older local source only supplements internal structure. |
| openclaw | [Official stable release `v2026.8.1`](https://github.com/openclaw/openclaw/releases/tag/v2026.8.1) and [official documentation](https://docs.openclaw.ai/) | session SQLite/search/archive, paired devices, [cloud workers requiring explicit profile configuration](https://docs.openclaw.ai/gateway/cloud-workers), managed worktrees, Control UI and Workboard were checked against documentation for the corresponding release. |
| opencode | [Official stable release `v1.18.25`](https://github.com/anomalyco/opencode/releases/tag/v1.18.25), tag-pinned source and [official documentation](https://opencode.ai/docs/) | Scout has a documentation/source discrepancy and remains unconfirmed in stable source. Worktree core exists, but routing remains experimental. |
| Four other references | `references/` fixed source: Hermes, pi-mono, weclaw and the pi-ai protocol reference | Not claimed to be the latest releases; capability conclusions are limited to the specified evidence. |
| Four Chinese projects | Local`~/.npm-global/lib/node_modules/` npm packages; inspect `dist/`bundled artifacts | The first three are wrappers whose changes focus on environment and configuration; the Gemini variant is a source fork. |
| Trae | Implementation unavailable | Not installed locally; absent from `/Applications`, application-support directories, and VS Code/Cursor extension directories. No speculation. |

Official pages behind changed assessments: [feature matrix evidence](https://fzkuji.github.io/OpenProgram/docs/reference/design/framework-comparison/feature-matrix.html#current-evidence).

### Source discrepancies

| Item | Source | Assessment |
| --- | --- | --- |
| Codex long-term memory | A complete subsystem in source (two-stage read/write pipeline and its own database), marked Stable in the feature registry but `default_enabled: false`. Looking only at default behavior would incorrectly suggest it is absent; an earlier assessment made this error. | Counts as present. A default-off subsystem still exists; an earlier assessment missed it. |

### Status and related pages

Candidates are not approvals, and the target is not fully implemented. Code size and internal structure describe fixed local versions.

- **[Framework overview](https://fzkuji.github.io/OpenProgram/docs/reference/design/framework-overview.html)**: How one conversation runs inside OpenProgram
- **[Feature matrix](https://fzkuji.github.io/OpenProgram/docs/reference/design/framework-comparison/feature-matrix.html)**: Same twelve references by feature inventory: 160 canonical entries, 56 candidate differences. Counts do not combine with this page
- **[Sandboxing](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/security/sandbox-architecture.html)**: [Architecture diagram](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/security/sandbox-architecture.html)
- **[Agent collaboration](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/collaboration/agent-collab-comparison.html)**: Only OpenProgram limits subagent tools by remaining message budget
- **[Long-term memory](https://fzkuji.github.io/OpenProgram/docs/reference/design/memory/comparison.html)**: [Adoption](https://fzkuji.github.io/OpenProgram/docs/reference/design/memory/adoption.html)
- **[Speaker identity](https://fzkuji.github.io/OpenProgram/docs/reference/design/memory/speaker-identity.html)**: Multi-user conversations
- **[Chat attachments](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/chat/chat-attachments.html)**: 
- **[Context composition](https://fzkuji.github.io/OpenProgram/docs/reference/design/context/comparison.html)**: 
- **[Extension admission](https://fzkuji.github.io/OpenProgram/docs/reference/design/extension-gating/reference-comparison.html)**: 
