{"slug": "show-hn-r3-a-local-code-review-tool-for-you-and-your-ai-agent", "title": "Show HN: R3 – A Local Code Review Tool for You and Your AI Agent", "summary": "R3, a local code review tool for AI agents, launched on Hacker News. It enables developers to leave line-specific feedback on agent-generated diffs and documents, tracking comments to resolution outside of chat interfaces. The tool runs fully locally with a web UI and is designed to streamline the review loop between humans and coding agents.", "body_md": "r3 is a review tool for the diffs and docs produced by your coding agents, running locally with a web interface. You leave feedback pinned to the exact line or quote it's about, and track each comment to resolution.\n\nr3 fills a gap the chat box can't. Say your agent writes a long planning doc and you want to fix a handful of things. In a chat you copy-paste each passage to quote it, type your feedback, then lose track across turns of what's been handled. Instead of working in a linear, unstructured chat stream, r3 works like the code review tools you're used to, but just for you and your agents, and it runs fully locally.\n\n## r3-demo-web.mp4\n\nThe point of r3 is a tight, copy-paste-free review loop between you and an agent.\n\n```\nsequenceDiagram\n    participant A as Agent\n    participant S as r3 server\n    participant U as You (browser)\n\n    A->>S: [1] `r3 create` — opens a review, shares the URL\n    loop until you Approve or Abandon\n        A->>S: [2] `r3 watch` (blocks for feedback)\n        U->>S: [3] leave feedback + Submit\n        S-->>A: `r3 watch` prints your feedback to stdout and exits\n        A->>S: [4] `r3 reply` by feedback id\n        S-->>U: [5] web UI updates live\n    end\n```\n\n- The agent starts a review with\nand shares the URL.`r3 create`\n\n- The agent runs\n, which registers as a live watcher and waits for feedback.`r3 watch <id>`\n\n- You leave feedback anchored to the exact lines it's about, then click\n**Submit**.`watch`\n\nprints your feedback to stdout that's captured by the agent. - The agent works each item and\n**replies by feedback id**(`r3 reply <fid> -m \"what I changed\"`\n\n), saying what it changed, or the reasoning for why it didn't. - Every reply lands on the web UI through live updates. The agent\n`watch`\n\nes again until you**Approve** or**Abandon** the review.\n\nr3 is driven by your coding agent, so the quickest start is to point your agent at\nit. Drop this into your agent's instructions file (`AGENTS.md`\n\n, `CLAUDE.md`\n\n, or\nyour tool's equivalent), or just try it out by pasting it into a new session:\n\n```\nThis project uses r3 for review. Run it with whichever of these you have:\n`npx @hyperlogue/r3@latest`, `bunx @hyperlogue/r3@latest`, or `nix run github:hyperlogue/r3 --`.\n`r3 guide` will show how to use it.\n```\n\nThen just ask: \"put your changes up for review.\" Your agent runs\n`npx @hyperlogue/r3@latest create …`\n\n, shares the URL, and waits while you leave feedback in\nthe browser. The launcher lazily starts the web server on localhost and opens the\nreview.\n\nOne **web server** spans all your repos on a stable port (default 8791). The first\ncall spawns it automatically, so there's nothing to start by hand;\n`r3 start | stop | status | restart`\n\nmanage it explicitly. Open\n[http://127.0.0.1:8791/](http://127.0.0.1:8791/) to see every project's reviews in one tab.\n\nNo config needed: reviews live in one global sqlite at `$XDG_STATE_HOME/r3/r3.sqlite`\n\nkeyed by a **projects registry** (so worktrees of one clone are one project and\ncopies stay separate), and the web server announces itself in `$XDG_RUNTIME_DIR/r3/daemon.json`\n\nso the CLI finds it with zero config. Run the CLI from any git repo, and it tells\nthe web server which project/worktree the call targets.\n\nYou rarely type the commands yourself — you ask your agent, and it runs the right\n`r3 create`\n\n:\n\n```\n\"Put your working changes up for review.\"\n  → diff review of the working tree\n\n\"Open a review of the plan doc so I can comment on it.\"\n  → files review of that file, watched live as the agent keeps editing\n\n\"Let me review the diff between main and this branch.\"\n  → diff review of the range\n\n\"Start a review with a scratch folder and put your draft design doc there.\"\n  → adhoc scratch review with no git source\n```\n\nTo install `r3`\n\npermanently — a persistent command instead of `npx`\n\n/`bunx`\n\neach\ntime — add `-g`\n\n:\n\n```\nnpm install -g @hyperlogue/r3    # or: bun add -g @hyperlogue/r3\n```\n\nThen run `r3 …`\n\nfrom anywhere.\n\nEvery review is one of two kinds:\n\n- A\n**files review** is a live view of a set of files as they are right now. r3 watches them and re-renders on every change, so it fits work in progress: a design doc your agent is still writing, or a few source files you want to read together. - A\n**diff review** is a frozen record of a change: a commit, a branch range, your working tree, or any diff. It doesn't move once captured, and follow-up work lands as new rounds you can compare against.\n\nFeedback anchors to a **quote**, not a line number: in a files review your notes\nfollow the code as it's edited; in a diff review the rounds are immutable, so\nnothing drifts.\n\nIf you work on a remote dev server, r3 listens on loopback there, and you reach\nits web UI from your local device through a tunnel. Set one up however you like: an SSH\nforward (`ssh -L 8791:localhost:8791 devbox`\n\n), `tailscale serve`\n\n, or a Cloudflare\ntunnel. **Never** bind `0.0.0.0`\n\n.\n\nEnv: `R3_PORT`\n\n(default 8791), `R3_BIND`\n\n(default `127.0.0.1`\n\n), `R3_ALLOWED_HOSTS`\n\n(comma-separated exact Host names, never `*`\n\n), `R3_PUBLIC_URL`\n\n.", "url": "https://wpnews.pro/news/show-hn-r3-a-local-code-review-tool-for-you-and-your-ai-agent", "canonical_source": "https://github.com/hyperlogue/r3", "published_at": "2026-07-10 04:13:39+00:00", "updated_at": "2026-07-10 04:36:09.550953+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents"], "entities": ["Hyperlogue", "r3"], "alternates": {"html": "https://wpnews.pro/news/show-hn-r3-a-local-code-review-tool-for-you-and-your-ai-agent", "markdown": "https://wpnews.pro/news/show-hn-r3-a-local-code-review-tool-for-you-and-your-ai-agent.md", "text": "https://wpnews.pro/news/show-hn-r3-a-local-code-review-tool-for-you-and-your-ai-agent.txt", "jsonld": "https://wpnews.pro/news/show-hn-r3-a-local-code-review-tool-for-you-and-your-ai-agent.jsonld"}}