Skip to main content

hatchway

A narrow, logged opening through which an outside agent reaches your tools.

pip install hatchway
hatchway authorize "ssh-ed25519 AAAA... my-agent" --agent assistant   # one confined key
hatchway check "crowsnest triage"                                     # what the gate would do

An agent that lives somewhere else (a personal assistant on its own cloud VM, another machine's scheduler, a phone shortcut) gets one SSH key. That key can do exactly one thing: run hatchway gate, which reads the requested command line, checks it against a profile (an allowlist kept as a TOML file), logs the call, and runs the allowed command directly, never through a shell. Anything not in the profile is refused with a reason.

It is the "reach in" half of connecting an outside agent to the tools on your machine, with no new server, no open port and no new dependency: OpenSSH already has forced commands, and hatchway is the policy and the bookkeeping around one.

What you get

  • An allowlist as data. A rule names the words the agent sends, the command that actually runs (with fixed arguments the agent cannot remove, such as --no-verify), and exactly which flags and names it may add. Names are checked against a pattern and passed after --, so they can never be read as options. Shell characters are refused outright.
  • A confined key. hatchway authorize writes one authorized_keys line with command="hatchway gate --agent NAME", restrict (no shell, no port, agent or X11 forwarding, no pty), and by default from="100.64.0.0/10,fd7a:115c:a1e0::/48", so the key works only from a Tailscale tailnet even if sshd is reachable elsewhere. It keeps every other line, backs the file up first, and is idempotent. hatchway revoke --agent NAME takes it out.
  • A log of every call in ~/.local/share/hatchway/calls.jsonl: when, which agent, from where, what was asked, allowed or refused, exit status. Never the output. hatchway log shows the tail.
  • Gated classes. A rule can belong to a class that stays off until a flag file exists. The bundled profile's dispatch class (starting a Claude Code session) needs both ~/.config/hatchway/allow-dispatch and a list of directories it may start sessions in.
  • A snapshot for pulling instead of waiting. hatchway snapshot runs the profile's snapshot requests (through the same allowlist) and writes the answers atomically to ~/.local/share/hatchway/out/, with an index.json. The agent reads them through the gate (snapshot triage.md) without waiting for anything to run. hatchway schedule --every 300 keeps them fresh with launchd (macOS) or a systemd user timer (Linux).
  • Skills for the agents that set it up. hatchway install-skills links the bundled skills into one or more Claude Code homes.

The bundled profile: claude-fleet

For a machine running Claude Code sessions watched by crowsnest (live sessions) and openloops (what sessions left owed or blocked). hatchway help prints it, and it is what the agent gets when it sends help:

Request Runs
crowsnest [--brief|--json] the roster across every configured Claude home
crowsnest triage [-q] [--json] what needs you, what is safe to close, what is working
crowsnest show|turns|recap|brief NAME one session (show and turns quote its transcript)
crowsnest ledger [NAME...], groups, synopsis GROUP, questions, lineage, report the rest of crowsnest's read side
ol, ol owed, ol blocked, ol dashboard openloops, always with --no-verify (verify predicates are commands taken from issue bodies, and a remote request never runs them)
snapshot [FILE] list or print the snapshot files
crowsnest spawn NAME --cwd DIR --prompt TEXT gated: starts a session on sonnet, in a directory under the dispatch roots

Nothing in it kills, reaps, messages or writes into a running session.

To change it for one machine, copy hatchway/data/profiles/claude-fleet.toml to ~/.config/hatchway/profiles/<name>.toml, edit it, and set profile = "<name>" in ~/.config/hatchway/config.toml (or pass --profile <name> to authorize, which puts it in that key's forced command).

Configuration

~/.config/hatchway/config.toml, every key optional:

profile = "claude-fleet"
path = ["~/.local/bin"]           # where the commands live (sshd's PATH is minimal)
timeout = 120
[roots]                           # extra directories file rules may serve, by name
[dispatch]
roots = ["~/projects"]            # where a gated spawn may start a session
[snapshot]
to = ""                           # optional private copy: a local dir or host:path

The security model, in one paragraph

What the key can do is the profile, so read it before you authorise a key. Read commands still send what they read to wherever the agent runs: crowsnest show quotes your sessions' transcripts, so authorise only an agent you would show them to. Keep the from= restriction. If the agent joins your Tailscale tailnet, give it a policy that allows only TCP port 22 to the machines it serves and no Tailscale SSH rule: Tailscale SSH authenticates by tailnet identity and never reads authorized_keys, so it would bypass the gate entirely. 100.64.0.0/10 is also ordinary carrier-grade NAT space, so once you know the agent's own tailnet address, narrow --from to it (--from 100.x.y.z/32). Leave dispatch off until you have watched the log for a while: a session it starts runs code as you. The bundled rule pins --model sonnet and --permission-mode default (the session asks before acting), refuses a prompt that starts with -, and starts sessions only under the directories you list.

Also built in: the commands run with an allowlisted environment (nothing the connecting client can set reaches them beyond LANG), in their own process group so a timeout stops their children too, one call at a time per agent (a concurrent call is refused with exit 75), and every allowed call is logged before it runs, so a dropped connection still leaves its line.

Agents

  • hatchway skill: install and verify a connection for an outside agent on this machine (the steps, the checks, the Tailscale policy).
  • hatchway-muse skill: when a task would be better handed to a personal Muse agent (Meta), which integration pattern fits, and the exact prompt to give it.

Metadata

Release files for hatchway 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hatchway 0.0.2
File Size Uploaded Provenance Actions
hatchway-0.0.2.tar.gz 29.4 kB Without provenance Details for hatchway-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hatchway 0.0.2
File Interpreter ABI Platform Actions
hatchway-0.0.2-py3-none-any.whl Python 3 none any Details for hatchway-0.0.2-py3-none-any.whl

Total release size: 61.1 kB

Release files / hatchway-0.0.2.tar.gz

Download URL hatchway-0.0.2.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
edc7bc97e540ac04097bbaf2d4829e5a12a92fe272ef558507824284ae920665
BLAKE2b-256 checksum
How to use checksums
fb6b71baacc00778f5191b9f902c7b4bbeff398cbc6cbe5144d52e877ea83788
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hatchway-0.0.2-py3-none-any.whl

Download URL hatchway-0.0.2-py3-none-any.whl
Size 31.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45b58b9a2c4e0c2bedffb4e119130c2707f3bb799dca1f953cc91114d3c76e8e
BLAKE2b-256 checksum
How to use checksums
ad56a1fe04097fd7fd6b308c801b49205ab468616b6d07615a19fb14f4194c41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for hatchway 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page