Changelog
What changed, release by release
The same notes as CHANGELOG.md in the repository. Install the latest with pipx install interlockd, brew install interlockd/tap/interlock, or npm install @interlockd/sdk.
- ▸Tamper detection; upgrade note. Interlock now fails closed when its own protection is tampered with or when the daemon disappears without
interlock stop. Setfail_mode: {tamper: open}to keep the old behaviour. After upgrading, runinterlock restart(orinterlock init) before your next agent session; shims from 0.1.x keep working against the new daemon, and the new shims refuse to trust a daemon that does not identify itself (every call is refused withdaemon_identityuntil the daemon restarts).INTERLOCK_FAIL_MODE=openis no longer honoured; onlyclosedis. Editing~/.interlock/policy.yamloutsideinterlockcommands (by hand,interlock judge install) is now reported aspolicy_modifieduntil you runinterlock policy accept. User guide §2.2, threat model §5. - ▸Daemon identity: each start derives a 128-bit value from the home's token (HMAC-SHA256 over a random nonce), writes it to
~/.interlock/identity(0600) and sends it asX-Interlock-Identityon every reply; the shims (sh, Python, Kiro Node, OpenCode) apply a reply only when it carries exactly this value. A 401/403 from the daemon's address istoken_rejected, a missing or wrong identitydaemon_identity, an unreachable daemon without a stop markerdaemon_lost; these use the newfail_mode.tamper(open | closed, defaultclosed), everything else keepsfail_mode.default. Refusals name the cause and the repair command (adapters/README.md). The daemon records each rejected token (adapter name only, at most 5 per adapter per minute, then a summary). Fixes the silent fail-open of #29. - ▸Stop versus loss:
stop,restart,shadow,enforce,uninstall,token --rotateandinitrecord an operator action, and those that stop or restart the daemon write~/.interlock/stop-marker.jsonfirst (no expiry forstop/uninstall, 120 s otherwise), exiting 1 without touching the daemon when it can't be written. The daemon marks a clean exit indaemon.json, and its next start recordscontrol.daemon_unexpected_exitand acontrol.calls_unjudgedsummary of the hook-log lines in the gap. - ▸Enforcement points are verified on every hook request (stat-cached; shims now send their own path) and by the hook watch every 10 s instead of 60 s (
INTERLOCK_WATCH=watchfileswith thewatchextra wakes it on change). A changed shim is repaired from the package, a removed hook reported, and in enforce mode every pre-tool call from that agent is blocked with a notice (keywordenforcement_point) untilinterlock initorinterlock ack; the MCP gateway does the same. - ▸Policy and token pinning:
~/.interlock/integrity-baseline.jsonpins the policy and managed-policy digests (with copies under~/.interlock/pinned/) and the token's digest and mode. An unexplained policy change keeps the pinned copy in force and records the changed top-level key names (never values);interlock policy diff | accept | revertresolve it. A widened token mode is restored to 0600; a replaced or missing token is reported and the loaded one kept. - ▸Protection state (
protected | observing | stopped | compromised), per agent and for the home, persisted in~/.interlock/protection-state.json: first line ofinterlock status(exit 1 when compromised), a block ininterlock doctor(reasons, tamper events since the last acknowledgement, baseline coverage,fail_mode.tamper, the identity file),protectionandpolicy_pinin/interlock/v1/health. Plugin API (still version 1, additive):protection_status,subscribe_protection,pin_managed_policy,record_operator_action;Decisiongainstamper_kindandprotection_statefor control records. - ▸
interlock ack [-y]: lists the unresolved reasons and every file that differs from the baseline, asks, then re-baselines from disk and clears them. Optional desktop notification oncompromised(notify: {desktop: true}). - ▸New rule
persistence.interlock_control(ask): an agent runninginterlock ack,shadow,stop,restart,uninstall,policy accept|revert,token --rotateorresume; an approved run is recorded as an operator actionvia: hook_session. - ▸
interlock selftestalso checks a wrong-token request per agent;--shimruns each installed shim against a loopback stub without the identity header and expects adaemon_identityrefusal.interlock benchmeasures the HTTP path with and without the per-request check and printsverify Δp95 ms;--budget-ms MSexits 1 over budget. - ▸Fix:
interlock token --rotate,enforceandshadowrestart the daemon only when it is this home's (itsdaemon.jsonnames a live process), not whichever daemon answers on the port;stopanduninstallcall launchd / systemd only for this home's installed or loaded job. With two Interlock homes (or the test suite in a sandbox), rotating one home's token could restart, and register, a daemon for the other on the real port. The test suite now refuses any test that changes the real service manager. - ▸Releases: build provenance covers exactly the wheel and the sdist (the 0.1.8 attestation also listed
dist/.gitignore).
- ▸Plugin API (still version 1, additive):
Decisionalso carries content-free metadata for each audit record:event_id,agent(the adapter),action_class,tier,mode,tool_name,finding_severitiesandpolicy_sha256, pluskeyed_session(key), an HMAC pseudonym of the agent's session id. Still never exposed: tool arguments and results, file paths, the working directory, transcripts, reason and notice texts, finding subjects (a contract test feeds a record full of content and checks none of it comes through). - ▸Fix (Windows):
interlock stop(andrestart,uninstall) no longer fails with "access is denied" when the daemon is already exiting as it is stopped (its venv launcher goes first); it waits for the exit instead. - ▸Fix:
persistence.agent_config_writeno longer refuses every file of a Claude Code agent worktree (<repo>/.claude/worktrees/<name>/...) because its path contains/.claude/. A worktree is treated as a checkout of its own: its source files are workspace files, while its own.claude/,.kiro/,.codex/,.interlock/, the parent.claude/(settings, hooks, commands, agents) and the user's~/.claude/stay protected, after normalizing.., without case, and following symlinks. Adding.claude/worktrees/**totrust.protected_pathsrestores the old behaviour. - ▸Fix: writes to agent configuration through the shell that were missed are now caught by the same rule:
>|,teewith flags or several files,dd of=,truncate,perl -i/ruby -i,awk -i inplace, a localrsyncdestination, and interpreter one-liners and heredocs (python3 -c "open('.claude/settings.json','w')...",node -e "fs.writeFileSync(...)", Ruby, Perl, PHP) that write a literal path. Reads and mere mentions of the path are not flagged. - ▸Tests: the tier-0 latency test gates on the best median of five batches after a longer warm-up (a stall on a shared CI runner no longer fails it; a real slowdown still does), with a 30 ms p50 budget on Windows and 20 ms elsewhere.
- ▸Tests: the gateway tests no longer depend on the caller's environment (they failed when
INTERLOCK_HOMEwas set). - ▸Tests: the JavaScript SDK tests wait longer for
node --version(a slow Windows runner timed out at collection and failed the whole job) and are skipped, not errored, when node doesn't answer. - ▸
interlock scan(and the GitHub Action) also checks the project's own agent setup: Claude Code project settings (hooks the repository ships, hooks switched off, allow rules that hand out an interpreter, the network or writes anywhere, literal secrets inenv), prompt and instruction files (CLAUDE.md,AGENTS.md,.cursor/rules/, Kiro steering,.claude/commands/,.claude/agents/, skills) for literal secrets and instructions that switch off safety checks, and Python / TypeScript agent code (Strands, LangGraph / LangChain, OpenAI Agents SDK, CrewAI) whose tools get shell, file-write or network access without the Interlock integration, plus system prompts that interpolate untrusted input. Findings go into the SARIF output with a line number and count for--fail-on. Text patterns, not data flow; see the user guide, "Repository checks". The code checks report at mostmediumin this release (ungated shell tools included), so the Action's defaultfail-on: highdoesn't start failing existing repositories; secrets and hooks that run downloaded code arehigh, as elsewhere inscan. - ▸
interlock redteam: replays attack scenarios through the deterministic pipeline and a policy (Interlock's default, or yours with--policy) and reports what gets through, exiting 1 on a regression. Built-in packs for injection through tool results, exfiltration, persistence, supply chain and MCP poisoning (multi-step scenarios share a session, so flow rules apply), plus the attack cases ofcorpus/archetypes; judge-dependent scenarios are reported as skipped, known gaps are listed without failing. An optionalredteamstep in the GitHub Action. The MCP gateway's tool screening is now one function (mcp_proxy.screen_tool) used by the gateway and the red-team replay. - ▸Argument rewrites, opt-in (
rewrites: [git.force_with_lease]in your policy): a simplegit push --force/-fis offered asgit push --force-with-lease(anaskshowing the rewritten command) instead of going through unchanged; a protected-branch force push stays blocked. Rendered for Claude Code asupdatedInput(to the documented contract, not yet verified live); other harnesses keep the original call. A repository policy can't turn rewrites on. - ▸Judge flip test:
interlock test --judge <spec> --flip [--min-flip-rate F]asks each intent, confirmation and injection label twice through the judge interface, as recorded and with the deciding evidence turned around, and reports how often the answer follows (and which pairs are "sticky": the same answer either way). Tested with the replay backend; not yet run against a live Decider.
- ▸Plugin API (still version 1, additive):
compose_policies(docs)returns one policy document that tightens a policy as applying the documents one after another would, for layering policies centrally (a baseline plus group policies) into the one managed policy a machine applies;tighten_policy(base, data)andlint_policy(policy)expose the tighten-only merge andpolicy lint. A property test checkscomposeagainst applying the layers in order on random policies. One documented exception:trust.allowed_git_remotesis narrowed left to right, never looser than the machine's own list.
- ▸Native Windows, agent hooks:
interlock init/installset up Claude Code, Codex, Cursor, Gemini CLI, Copilot CLI, Windsurf, Antigravity and Kiro on Windows with a Python hook shim (interlockd/shims/py): the same replies as theshshim byte for byte (tested on every captured payload), about 60 ms per call, standard library only. The background service on Windows is a per-user Run-key entry (no admin rights).selftest,captureandgatewaywork on Windows too; onlysandboxandjudgestill need macOS or Linux. CI runsinitand every installed hook throughcmd.exe/ PowerShell on a Windows runner (scripts/e2e-hooks.py); live runs with each agent on Windows are still to do. - ▸The MCP gateway starts servers like
npxon Windows (their.cmdlaunchers), andcapture exportredacts Windows home paths to/Users/dev/...like POSIX ones. - ▸Releases publish
@interlockd/sdkto npm from the release workflow with npm trusted publishing (no stored token) and npm provenance; the release checks that the tag matches the JS SDK's version too.
- ▸Plugin API:
interlockd.plugin_api(version 1) is the stable interface for plugins (settings, policy validation, the managed policy, daemon status, hook integrity, audit records without tool content), covered by contract tests. A plugin can require a newer API withPLUGIN_API = <n>; an older interlockd skips it with a message.interlock pluginsshows the API version. - ▸
examples/aws/interlock-audit.yaml: a CloudFormation sample for the optional DynamoDB audit table (it keeps the table, and your audit records, if the stack is deleted); the user guide links it.
- ▸Windsurf adapter verified live on Windsurf (Devin.app) 3.10.67: a refused force push, an injected README refused before Cascade read it, and a
catof it refused (flow.reread_withheld). Windsurf's read hooks carry no contents, so the daemon reads the file itself (256 KiB, never a sensitive path). Fixed live: Windsurf sendscwd: null, so a repository policy never applied; the hook's own directory is used now. Windsurf runs each hook twice; the repeat is answered from the first decision. - ▸
interlock capturepairs Windsurf's calls with their results (its report showed a false "block held: no"). - ▸Contributing: pull requests are reviewed and merged in this repository, with a DCO sign-off on each commit (
git commit -s, checked in CI); CI also runsscripts/check-hygiene.sh, which keeps real home paths, account ids and keys out of the repository.
- ▸Security fix (macOS, Windows): path rules now match without case where the file system ignores it. On macOS (default APFS) a write to
~/.CLAUDE/settings.json,.GIT/hooks/pre-commitor.GitHub/Workflows/ci.ymlchanges the real file but was allowed. Linux is unchanged. - ▸Native Windows, first part: the daemon (
interlock start | stop | status, a detached background process), policy, audit log,scan,report,explain,testand the Python and JavaScript SDKs run on Windows without WSL2. Paths are matched the same way on every OS (C:\Users\me\.claude\settings.jsonhits the same rules as~/.claude/settings.json), and the Startup folder and PowerShell profiles count as persistence. Agent hooks,interlock init, the gateway, the sandbox and the local judge still need macOS or Linux (on Windows, WSL2); those commands say so. Verified on a Windows CI runner: the full test suite, and a live daemon (start, decisions through the Python client,audit verify, stop). - ▸Gemini CLI adapter verified live on Gemini CLI 0.65.0: a refused force push and a withheld injected README; captured payloads replayed in tests.
- ▸Withheld content can't be read back another way: the local probe also scores ROT13 and base64 decodings of each tool result, and once a file is withheld, a shell call naming it in the same session asks (
flow.reread_withheld). Found live: Gemini CLI re-read a withheld README through ROT13 "without triggering policy". - ▸
interlock capture:--scratchprojects push nowhere; for agents that send no tool-call id (Gemini CLI), the report pairs a refused call with a later result by session and input. - ▸Text files are read and written as UTF-8 on every platform.
- ▸Managed policy:
<interlock home>/managed-policy.yamlis applied last and can only tighten decisions (it can switch enforce on, never loosen anything). It is reloaded without a restart; a file that doesn't parse is ignored and reported byinterlock policy lint. For device management and centrally managed machines. - ▸Plugins: installed packages that register under the
interlockd.pluginsentry-point group can add commands and run background work besideinterlock serve. Plugins never sit in the decision path; a plugin that fails is skipped with a warning.interlock pluginslists them;INTERLOCK_PLUGINS=0turns them off. - ▸Platforms stated: macOS and Linux; on Windows,
interlockexplains how to use WSL2 instead of crashing on import. Homebrew:brew install interlockd/tap/interlock. - ▸
interlock judge install | status | remove: run the optional judge model (Strands Decider 2B) locally in one step. The daemon starts it in the background instead of delaying startup. - ▸Contributing: pull requests are imported into the development repository with author credit (
CONTRIBUTING.md); a code of conduct;demo/demo.sh(and a VHS tape) for a self-contained recording. - ▸
@interlockd/sdkfor JavaScript and TypeScript agents (sdk/js, no dependencies):guardToolsfor the Vercel AI SDK, Mastra and any{ execute }tool map, andguardOptionsfor the Claude Agent SDK for TypeScript. Both verified with the real packages. - ▸Injection detector, measured on public benchmarks (
docs/BENCHMARKS.md, scripts inbenchmarks/): catches AgentDojo's leaderboard template (0% -> 100%), InjecAgent's enhanced attacks (37% -> 97% on the harm set), typo'd "ignore your previous ..." and###(system_message)markers. False positives on real documentation fell from 2.2% to 0.25% ("bypass the X policy" and "silently skipped" no longer count). - ▸
shred <file>is an irreversible delete (asked or recorded likerm -rf), no longer blocked as a disk wipe;shred /dev/...still is. - ▸Releases carry signed build provenance (
gh attestation verify), and the release workflow regenerates the Homebrew formula and commits it tointerlockd/homebrew-tapwhen a tap token is configured. - ▸
interlock capture: record the real hook payloads an agent sends (with Interlock's replies), check that blocks held, and export redacted fixtures.--scratchsets up a verification project. Verified live with Claude Code. - ▸Cedar mandate: shell egress (
curl,wget, ...) now binds tonet.egresswith its hosts, like fetch tools (it was reported unjudged). Withmandate.mode: enforce, a mandate without anet.egresspermit now refuses shell egress;docs/mandate-example.cedarshows a host allowlist. Enforce mode verified live through the hook shim. - ▸MCP OAuth checks in the HTTP gateway: a JWT issued for another service is never passed to an MCP server (audience binding), scopes in
mcp.oauth.deny_scopesare refused, administrative scopes are flagged, and each server's authorization servers are pinned on first use so a change is refused untilinterlock mcp-pins --accept.
- ▸Google ADK and CrewAI integrations.
- ▸Semantic Kernel integration (
guard_kernel): a function-invocation filter, tested through a real Kernel. - ▸Claude Agent SDK integration (
guard_options): in-process PreToolUse / PostToolUse hooks, verified live (a refused force-push, a withheld injected README). - ▸
interlock pause/resumekill switch. - ▸Linux sandbox (bubblewrap) verified in CI.
- ▸Repository policies: a committed
<repo>/.interlock/policy.yamlapplies to every call inside the repository, re-read on change. It can only tighten your policy unless you list the repository intrust.trusted_workspaces;interlock policy lint --workspace <repo>shows what was not applied. - ▸Hook watch: the daemon re-checks the hooks it installed every minute and records a removed hook or a modified shim (and the repair) in the audit chain;
interlock reportlists them. Shims left by an upgrade are refreshed instead of flagged. - ▸
interlock bench: decision, probe, HTTP and hook-shim latency on your machine; seedocs/PERFORMANCE.md. - ▸Faster audit writes: the hash chain's head is cached between appends instead of re-read; decision p50 4.2 ms -> 1.2 ms.
- ▸
interlock doctorreports when a newer release is on PyPI (INTERLOCK_NO_UPDATE_CHECK=1turns it off). - ▸Docs: the hooks apply
fail_mode.defaultwhile the daemon is down (the per-category entries had been described as applying too).
First public release.
- ▸
interlock init/uninstall: one-command setup for Claude Code, Codex, Kiro, Cursor, and GitHub Copilot CLI (verified live), plus Gemini CLI, Windsurf, Antigravity CLI, and OpenCode (built from their documented hooks and plugin API); background service (launchd, systemd user, or detached process); shadow mode by default. - ▸Pre-action gate: 48 deterministic rules in 6 packs (shell, git, egress, persistence, secrets, packages) with a shell decomposer.
- ▸Post-action injection probe that runs locally (no cloud), withholding injected results in Claude Code.
- ▸Custom agents:
interlockd.integrations.strands.InterlockHooks,interlockd.integrations.langchain.guard_tools, andinterlockd.integrations.openai_agents.guard_agent_tools. - ▸MCP gateway:
interlock gateway wrap | unwrap | statusroutes stdio MCP servers throughinterlock mcp-proxyand remote (Streamable HTTP) servers through the daemon, which pins tool definitions (rug-pull detection), hides poisoned tools, gates tool calls with the same rules as the agent's own shell, and withholds injected results. - ▸
interlock mcp: Interlock as an MCP server with read-only advisory tools (check_action,explain_decision,recent_decisions,scan_mcp_servers,interlock_status,suggest_rule_override);interlock init --mcpregisters it. - ▸Codex: injected tool results are withheld (
decision: block, measured live). - ▸Memory-poisoning protection: writes to agent instruction files (CLAUDE.md, AGENTS.md, ...) and MCP memory tools are recorded, and asked when the content reads as injected or the session took in untrusted content.
- ▸
interlock pause/resume: a kill switch that refuses every agent action (all or named agents, optionally timed), in any mode. - ▸
interlock egress-proxy: decides every outbound host (metadata endpoints refused;--strictallowlist);interlock sandbox --egressmakes it the agent's only way out. - ▸
interlock sandbox -- <agent>: OS-level sandbox (macOS seatbelt; Linux bubblewrap) refusing persistence and guard-rail writes, with optional secret-read and network limits. - ▸Packaging: published on PyPI as
interlockd(the command is stillinterlock) via a trusted-publishing release workflow, and a Homebrew formula generator forinterlockd/homebrew-tap. - ▸
interlock replay: re-decide recorded calls with your current policy and see what would change. - ▸
interlock policy lint: unknown rule ids (a typo in an override silently does nothing), weakened critical rules, catch-all allows. - ▸
interlock selftest: attack shapes through the live daemon in each agent's hook format; run byinit. - ▸
interlock explain: why a call was stopped, in plain language, with the override snippet. - ▸OpenTelemetry: one span per decision to any OTLP/HTTP collector (
otlp_endpointin config), andinterlock otel exportto backfill. - ▸
interlock aibom: CycloneDX 1.6 AI bill of materials for the agent stack (agents, models, MCP servers with package URLs and pinning, remote endpoints). - ▸Hardening: the daemon also listens on a 0600 Unix socket that the hooks prefer;
interlock token --rotate. - ▸Tamper-evident audit log: hash-chained records,
interlock audit verifyandaudit head. - ▸
interlock scan: static audit of MCP servers and agent settings across Claude Code, Claude Desktop, Codex, Cursor, VS Code, Kiro, Gemini CLI, and Windsurf. - ▸
interlock report,doctor,status,log,enforce/shadow,test. - ▸Optional: Cedar mandate, open-weights judge, Amazon Bedrock Guardrails as an extra detector, DynamoDB audit store.