Haruspex

GitHub requests

A GitHub requests job lets you ask Haruspex about an issue from anywhere you can comment on GitHub, your phone included. /haruspex investigate reads the code and posts the findings on the issue. /haruspex fix makes the change, runs the tests with the network off and opens a draft pull request.

Set it up

In Chat or the Code tab, ask "watch this repo for /haruspex comments": the model drafts the job with your checkout filled in, and you set the schedule and save it. To make it by hand:

  1. Add GitHub in Settings → MCP servers and start it (see the mcp-servers page). Haruspex acts as the account its token, or your sign-in with GitHub (sign in), belongs to.
  2. In the Jobs tab, make a job of type GitHub requests (see the jobs page).
  3. Under Repositories, type each repository as owner/name and choose your local checkout of it. A clone a Code session has used fills itself in.
  4. Set the Daily limit (5 by default, or No limit).
  5. Give it a schedule as the backup check. Hourly is enough.
  6. Leave Working directory empty.

Start a request

Comment on an open issue in a listed repository:

/haruspex fix the crash only happens after a save

The line can be anywhere in the comment, in any case. Anything after the verb, and the rest of the comment, are your notes, which the model takes as its instructions. A /haruspex line inside a code block or a > quote is not a request.

While Haruspex is open, it looks at the listed repositories every 5 minutes.

What it checks

A comment is acted on only when all of these hold:

A comment is looked at once. To ask again, write a new comment.

The "picked up" comment

First, Haruspex posts "Picked up on <computer>." on the issue. That comment is the claim. When two computers run the same job, the older claim wins and the other leaves the request alone, so you may see two. Every comment Haruspex posts starts with Haruspex and carries a hidden marker, so it never reads its own comments as requests.

Investigate

Haruspex makes a fresh worktree of your checkout at the tip of the default branch. Your branch and uncommitted work are left alone. The model reads the files there and posts what the issue reports, where in the code it happens, the likely cause and a suggested fix. The model sees every comment on the issue, marked as untrusted text; only your notes are instructions.

Fix

  1. The model reads the code and writes a short plan, with the build and test commands it found in the repository.
  2. A coding job, GitHub request: owner/name#N, carries it out in a worktree on the branch haruspex/issue-N. It appears under the GitHub requests job in the Jobs tab. It can read and change files and run commands, all with no network: no web tools, and every command runs in a sandbox that can't reach the internet.
  3. Haruspex runs the plan's build and tests itself, network off. Only when they pass does it push the branch.
  4. It opens a draft pull request that says Fixes #N and comments the link on the issue.

A second /haruspex fix while that pull request is open adds commits to the same branch. After it is merged or closed, a new fix uses a new branch.

If a step fails, Haruspex comments "Couldn't finish" and the reason, with the end of the test output when the tests failed. The worktree is kept for a week: Open worktree in Code on the Home card opens it.

What it can't do