返回资讯中心
外部精选
软件工程
#开发者实时流

Turn Superlogical's Rex into an AI Harness

Turn Rex into a harness for your coding agent.

Hacker News 最新alpcan2026/11/1 · 今天16 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Turn Rex into a harness for your coding agent.

The loop • Install • Usage • How it works • FAQ

demo.mp4

One minute, sped up while the agent works. No player? Download the video.

Rex already runs your agents. rexmod builds the harness around them: it records every turn, so you see exactly what the agent changed; it opens a real editor beside the agent to read and review that code; and it hands your review back to the agent as its next input. Prompt, change, review, feedback: the whole loop stays in one Rex window, for Claude Code, Codex, OpenCode or Pi.

rexmod is an unofficial mod, not made by or affiliated with Superlogical. It patches your local copy of Rex so Rex loads the panel; the uninstaller puts the official build back.

Prompt. Talk to your agent as usual. rexmod snapshots the working tree the moment you send.

Change. The Changes panel on the right, styled like Rex's own sidebar, fills in while the agent works: Last Turn is exactly what this reply changed, next to Uncommitted, Branch and a Files tree.

Review. Click a file and it opens in Neovim beside the agent, at the changed line, with LSP, completion and live diagnostics. Space r on a line or a selection leaves a review comment.

Feedback. Your comments ride along with your next message to the agent, or go right away from the panel. The agent answers them, and the next turn starts at step 2.

Around the loop:

You need a Mac with Apple silicon on macOS 15 or later, Rex installed and opened once, and Homebrew (for Neovim, fzf and Node, if you don't have them).

brew trust --tap alpcanaydin/rexmod # Homebrew asks you to trust third-party taps brew install alpcanaydin/rexmod/rexmod rexmod-setup

Or in one line:

curl -fsSL https://raw.githubusercontent.com/alpcanaydin/rexmod/main/install.sh | sh

Then quit Rex (⌘Q) and open it again. Nothing is compiled on your machine. After brew upgrade rexmod, run rexmod-setup again.

Options: --update-rex installs the latest official Rex first, --no-patch skips the panel, --no-hooks skips the agents. From a checkout, ./install.sh builds what it needs if Go and Xcode are there.

Codex runs new hooks only after you trust them: start Codex and run /hooks once. OpenCode loads plugins when its background server starts, so quit OpenCode once after installing.

Where Keys What

Rex ⌘⇧E Show or hide the panel

Rex ⌘P Find a file in the agent's repository

Panel click a file Open it in the editor pane

Editor Space r Comment on the line, or on the selection in visual mode

Comment box Ctrl+S / Esc Save / cancel

Editor, on a noted line E / D Edit / delete that note

Editor ]r / [r Next / previous comment

Editor Space R All comments of the repo: Ctrl+S sends pending ones, Ctrl+X deletes

The comment badge in the panel header sends pending comments right away. Without it they ride along with the next message you type to the agent, as a short list of file:line, the code, and your note.

Several agents in one tab. The panel, Last Turn and your comments follow the agent pane you focused last; working in the editor or a shell doesn't change that. The agent name at the bottom of the panel becomes a menu to switch.

flowchart LR subgraph Rex.app panel[Changes panel<br/>RexModPanel.dylib] end agent[Agent pane<br/>Claude Code · Codex · OpenCode · Pi] editor[Editor pane<br/>Neovim + rexmod.nvim] cli((rexmod)) git[(.git/rexmod<br/>turns · comments)]

panel -- "state, open, send" --> cli agent -- "hook prompt / stop" --> cli editor -- "comments" --> cli cli -- "panes, splits, input" --> rex[Rex server API] cli --> git cli -- "--listen socket" --> editor

Loading

The panel is a Swift dylib. The installer adds a weak load command for it to Rex's executable and re-signs the app ad hoc. It insets Rex's own chrome and draws on Rex's backdrop, so it looks native.

rexmod, a Go CLI, does the work: it finds the tab's agent pane through Rex's API, diffs git trees, opens files in the editor pane, and keeps comments.

Last Turn comes from two snapshots of the working tree (written with a throwaway git index, so your index is untouched): one when you send a message, one when the agent finishes.

Comments live in .git/rexmod/ of the worktree, each tied to the agent pane it was written for.

Updating and uninstalling

Updates: brew upgrade rexmod && rexmod-setup, or run the one-line install again.

Rex itself: Sparkle can't update a patched Rex (its installer only accepts an app signed by Superlogical), so rexmod turns Sparkle's checks off and its LaunchAgent updates Rex instead, every hour: it downloads the official build, checks its signature, Team ID and notarization, patches it and asks you to reopen Rex. To do it now: ~/Library/Application\ Support/rexmod/scripts/update.sh.

Uninstall, which restores the official Rex and removes the hooks, the ⌘P block and the files:

~/Library/Application\ Support/rexmod/scripts/uninstall.sh

FAQ

The panel doesn't show up Check that Rex is patched: ~/Library/Application\ Support/rexmod/scripts/patch.sh --check. If Rex just updated, reopen it once the re-patch notification arrives. The panel logs to ~/Library/Logs/rexmod-panel.log; start Rex with REXMOD_PANEL_DISABLE=1 to run it without the panel.

The agent's hooks aren't running. Run ~/Library/Application\ Support/rexmod/scripts/install-hooks.sh again, then for Codex trust the hooks with /hooks, and for OpenCode quit it once.

No. A note is tied to the agent pane of the tab you wrote it in. An agent running elsewhere (another terminal or app) in the same repository only gets notes written outside Rex.

Codex runs its hooks in one background server for every pane, so rexmod finds the pane by looking for the Codex that works in that folder. With two of them in the same repository it can't tell which one sent the message, and rather than guess it leaves the notes pending and records the turn without a pane. Send those notes with the comment badge in the panel: it pastes them straight into the pane the panel follows. Claude Code, OpenCode and Pi don't have this limit.

Darwin notifications drive it from a shell: notifyutil -p dev.rexmod.toggle (also .refresh, .snapshot, .dumpviews, .dumpchrome, .dumpheader, .dumpsidebar). Output lands in ~/Library/Caches/rexmod/.

make build, make panel, make test, make lint. See CONTRIBUTING.md for the setup and how the pieces fit together.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →