oh-my-pi

The closest Rust coding-agent runtime — terminal-first with hash-anchored edits, LSP integration, browser automation, Python execution, and subagents.

Overview

oh-my-pi is a Rust-based AI coding agent for the terminal. It features hash-anchored file edits, integrated LSP support, browser automation, Python execution, and subagent delegation. It is probably the closest existing Rust project to a full coding-agent runtime, though it is terminal-first rather than an async service platform.

AttributeValue
Language / StackRust + Tokio
GitHubgithub.com/can1357/oh-my-pi
LicenseMIT
Closest MatchRust coding-agent runtime (terminal-first)
MaturityExperimental

Key Features

  • Hash-anchored edits — File modifications are content-addressed via hash anchors, ensuring idempotent edits and preventing accidental overwrites.
  • LSP integration — Communicates with language servers for semantic code understanding, completions, and diagnostics.
  • Browser automation — Can drive a headless browser for web scraping, testing, and documentation lookups.
  • Python execution — Embedded Python interpreter for running scripts and data processing within the agent context.
  • Subagent delegation — Spawns child agents for parallel subtasks, each with isolated context.
  • Terminal-native — Built for the terminal with Ratatui-based TUI, fuzzy file navigation, and session history.

Architecture

oh-my-pi runs as a terminal application with an async Tokio runtime. The agent loop reads user intent, plans tool calls, executes them through a sandboxed subprocess layer, and observes results. File edits use a content-addressed patch system where each edit is anchored to a file hash, enabling safe concurrent modifications. LSP integration provides semantic context beyond simple text search.

Strengths

  • Rust safety — Memory-safe agent runtime with zero-cost abstractions for high-performance tool execution.
  • Hash-anchored edits are an elegant solution to the "concurrent file edit" problem that most agents ignore.
  • LSP integration provides semantic code understanding superior to grep-based approaches.
  • Subagent model matches our multi-agent vision for xCoder.
  • Terminal-first design is ideal for developer workflows and CI/CD integration.

Gaps vs Open SWE

  • Terminal-first — Not designed as an async service with webhooks, Slack/Linear triggers, or persistent threads.
  • No sandbox abstraction — Uses local subprocesses rather than pluggable cloud sandboxes (Docker, E2B, etc.).
  • No GitHub integration — No built-in PR creation, review, or issue management.
  • Experimental maturity — Less proven than Python/TS alternatives at scale.

Relevance to xCoder

oh-my-pi is our primary reference for Rust agent mechanics. Its hash-anchored edit system could be ported to our TypeScript driver for safer concurrent file operations. The LSP integration pattern is something we will replicate for semantic code understanding in the xCoder agent. For our Rust execution substrate layer, oh-my-pi's terminal runtime and subagent model provide proven patterns.

Research note

We are evaluating porting oh-my-pi's hash-anchored edit system to TypeScript/WASM as a core xCoder tool. The content-addressed patch approach eliminates an entire class of race conditions in multi-agent file editing.