Wrk.Dog

Results and help

What each result means, where to look, and how to get help.

Ran, didn't run, or may have run

The huntaway command always tells you plainly which of three things happened. "It ran" means you have the answer; it doesn't mean the answer is right. "It certainly didn't run" means you can send it again. "It may have run" means Huntaway can't be sure, so check before you send it again.

You seeIn statusWhat it means
The answerdoneIt ran and you have the answer.
"Nothing ran; you can send it again."failedThe API refused it, or couldn't be reached. It certainly didn't run.
"It may have run and was not retried."uncertainThe call was sent but the answer was lost (a server error, a dropped connection, the time limit). Check before sending again.
"Stopped before anything was sent." (you pressed Ctrl-C)failed, declined or cancelledStopped before the call was sent. It never ran.
"Stopped. It may have run" (you pressed Ctrl-C)uncertainStopped after the call was sent.

If Huntaway itself is cut off (a crash or a power cut), the next huntaway ask records that run: declined or cancelled if it was never sent, uncertain if it may have been. With its default engine, the huntaway command never resends a question on its own, so a question can't run twice without you knowing. With --engine pipe, the Pipe may retry a job within the limits its README describes.

How a Pipe job ends

The commands on this page use pipe, the short shell function from pipe/README.md, with the setup file's folders. Define it first (change the paths if yours differ):

The pipe function
$ pipe() { node ~/huntaway/pipe/src/cli.ts "$@" --config ~/pipe-data/config.json; }

pipe wait "$ID", with ID set to the job's id, returns when a job reaches one of these states:

StateWhat it means
completedThe job finished. Read its result, and its card for any saved changes.
failedThe job ended without finishing. A job that changes code and had already started is never re-run on its own: look at its worktree before you send it again.
cancelledSomeone cancelled it, and the record says who.
start_mismatchThe folder wasn't at the commit the job named (or, if the job asked for a clean start, it had uncommitted changes). So the job never started, and it isn't retried.

Before a job starts, a busy or limited account makes it wait rather than fail. Once it has started, a limit can still end it. The job runs on the model you chose, or it fails: a mismatch is never recorded as a success.

Where to look

Finding out what happened
$ pipe list                        # newest 500 requests, no prompt or result
$ pipe list --state failed         # only failed ones
$ pipe list --requester me         # only ones you sent as "me"
# ID is the job's id, from what pipe submit printed: ID=…
$ pipe status "$ID"               # one look at a request
$ pipe card "$ID"                 # content-free card with attempt hosts and save state
$ huntaway status                  # this machine and its runs
$ huntaway status --json           # the same, for a program

A job that changes code works in its own git worktree, on a pipe/… branch. Its card says whether its work was saved, and the branch and commit. A finished job's worktree is normally kept for 72 hours (worktreeKeepHours). When the disk is short of space it can be removed sooner, down to 15 minutes. Then any uncommitted work is committed on its branch and the folder is removed; the branch stays. A worktree the Pipe can't save cleanly is kept for you to look at. To keep one, lock it: git worktree lock /path/to/the/worktree (its path is in the job's record).

Known issues

Several huntaway ask runs started close together, most often on a brand-new install, can, rarely, stop with "Error: the request log could not be opened". A run that stops this way has sent nothing: run that one again.

If the request log needs recovery

Huntaway refuses to open its request log if an earlier run stopped part-way through creating or writing it, for example when the power failed during your very first ask. It won't guess what the log held, because a guess could hide a question that may have run. Keep every file in the folder as it is, make sure no huntaway is running, and open an issue (without attaching the files).

Get help

A question or a bug

Open an issue on GitHub. Say what you ran and what happened. Please don't paste logins, keys or tokens into an issue.

A security problem

Report it privately: open the repository's Security tab and choose Report a vulnerability. Please don't open a public issue for it. The security policy.

Which version

Only the latest commit on main and the latest npm and Homebrew packages are supported. From a package, update with npm install -g @wrkdog/huntaway@latest or brew upgrade huntaway. From source, to update the huntaway command, pull and run the installer again. To update the Pipe: run pipe drain, wait until lsof -nP -iTCP:8123 -sTCP:LISTEN prints nothing, then git pull and start it again. If drain errors, or the port is still busy after a minute, stop and look at the Pipe's log (setup file, section 3.5).

Next: what Huntaway keeps, and where your data goes.