Skip to content

phiward v0.2.0b1 (beta)

The first public release of phiward. It keeps protected data (for example patient data) and your credentials out of what an AI coding agent sends to its model provider.

Start with docs/quickstart.md: install phiward, set it up (with Claude Code's help through /phiward:setup, or by hand), and check it.

uv tool install --python-preference only-managed phiward==0.2.0b1

Or from the GitHub tag: uv tool install git+https://github.com/msk-access/phiward@v0.2.0b1.

What you get

  • Mode A, the default: every normal Claude Code session (the desktop app, an IDE, a terminal) is wired by phiward install claude --user. Bash runs in Claude Code's sandbox, the file tools are refused protected data and credentials, and every session starts with a note on the rules.
  • Mode B, the stronger one: phiward launch --tool claude runs the whole tool (file tools, shell, MCP servers, hooks) in phiward's kernel profile. Terminal only for now.
  • The gateway: the agent works on protected data only through phiward run and phiward copy. The broker runs them outside the agent and masks the output.
  • HPC through your own shared SSH connection: phiward run --remote and phiward copy. No request reads your key or Kerberos ticket (hpc.md).
  • Easy onboarding: a Claude Code plugin with /phiward:setup, /phiward:doctor and /phiward:help; phiward init for a project; phiward mcp, the gateway as MCP tools (plugins.md).
  • The broker as a login service: phiward broker --service --write.

A summary of this release is in the CHANGELOG.

Tested, on made-up data

  • Mode A in the Claude Code desktop app on macOS: reads of protected data and of a credential by the Read tool, cat and Monitor were refused; ssh to HPC failed; normal work was unaffected.
  • The plugin in a desktop-app session: the session note, the refusals, the commands, normal work; and beside another plugin (ECC).
  • Mode B with the real Claude Code on macOS: the file tools and the shell were refused protected data; the gateway returned masked output; a skill and an MCP server carried over.
  • HPC against a real cluster: remote runs, a push, a pull into a protected folder, and the refusals.
  • An MCP server wrapped in phiward launch, on macOS and Linux.
  • The full test suite on macOS and Linux; fuzz tests; several adversarial reviews.

Not tested yet

  • The real Claude Code on Linux (the test suite runs there).
  • phiward launch driven from the desktop app with Remote Control.
  • A published MCP server wrapped in phiward launch on macOS (on Linux it was).
  • A protected folder on a mounted HPC volume.
  • [network] limit in a live Claude Code session (the settings it writes are tested; Claude Code enforces them).
  • Other agent tools than Claude Code.

Limits

All limits are in docs/threat-model.md, with a summary for reviewers at the top. The main ones:

  • Identifiers inside files need a pack or patterns. Out of the box, masking inside file contents covers only sequence and alignment file names, read names and loci (the genomics pack). Subject and sample identifiers inside files are masked only with a pack that has them (the msk example), your own [sanitize] patterns or names_from. The gateway masks entry names under the protected roots (4 characters or longer). Planned for 0.2.0b2: setup asks, doctor warns, and the output says what was masked (#3, #5).
  • The network is open by default. [network] limit (asked by setup) limits the shell commands of a Mode A session to listed hosts; WebFetch, MCP servers and Mode B stay open. The agent cannot read protected data, but it can send what it can read.
  • Masking covers names and identifiers, not content. Print counts and summaries through the gateway.
  • In Mode A, the file tools are refused inside Claude Code, not by the kernel, and hooks and MCP servers that are not wrapped run with your rights.
  • run --remote is not confined on the cluster. [remote] commands is what limits it.
  • macOS: the Keychain and the per-user temp folder are shared with your own tools.

Upgrade from agent-guards

phiward was called agent-guards before this release. See setup.md.