Who is really in charge of your agent?

Stroq reads your own Claude Code, Codex and Cursor sessions and shows how many commands came from text your agent read, and which keys left your machine.
An example: a made-up machine with made-up sessions, keys and hosts. Hoo is Stroq's owl. Your card shows your own sessions.
npx @stroq/cli
It reads your last 30 days of sessions, your key files and the folders your agent worked in; prints key names, never values; writes nothing but a small cache under ~/.stroq; and sends nothing. No account, no telemetry.
npx @stroq/cli a card of your own sessions, like the one above
npx @stroq/cli init stop it next time: guard your agent
npx @stroq/cli inspect read a folder you were sent before you run it
npx @stroq/cli why why an action was stopped
npx @stroq/cli attack watch Stroq stop 36 known attacks, in a sandbox
npx @stroq/cli uninstall remove Stroq
Every moment on the card has a stroq show line that prints the evidence behind it (npx @stroq/cli show 1). stroq help --all lists the other commands. Needs Node.js 22 or newer. Apache-2.0.
Beyond the card
Stroq is a local security platform for AI coding agents: Claude Code, Cursor, Codex CLI and others. Its hooks judge every tool call before it runs. They deny curl | sh and outbound calls that carry a known secret from your machine, and they ask you first when a command repeats text the agent read, naming that text. The console shows which agents actually ask Stroq, and every decision with its reason. Sessions you already had can be checked too, without installing anything.
npx @stroq/cli console # the console: a private page on 127.0.0.1
npx @stroq/cli replay --all # your Claude Code sessions of the last 30 days against the policy; no hooks needed
npx @stroq/cli sent # did your agent pass your keys on? key names, never values
npx @stroq/cli sent --try # a built-in sample with a made-up key; reads nothing
npx @stroq/cli init # hook into your agent and guard the next session
Did your AI agent pass your keys on? stroq sent reads the Claude Code, Codex and Cursor sessions on your machine and looks for the exact values of your keys in them. For each key it finds, it says where the key went: sent to another company, maybe sent, seen by the AI, used with its own service, or blocked before it ran. It prints key names, never values, and writes nothing.
What a finding looks like (made-up keys, trimmed):
stroq sent: did your AI agent pass your keys on?
6 of your 6 keys appear in your agent sessions: 2 sent to another company, 1 maybe sent, 1 seen by the AI, 1 used with its own service, 1 blocked before it ran.
Checked 3 sessions (Claude Code 2, Codex 1), 2026-10-02 to 2026-10-19.
Compared with 6 keys: ~/.aws/credentials, ~/.npmrc, ~/work/shop/.env, ~/work/api/.env.
SENT TO ANOTHER COMPANY: rotate these today (2)
1. STRIPE_SECRET_KEY from ~/work/shop/.env
went to collector.example, in a curl command
when 2026-10-11 14:02 UTC · Claude Code · ~/work/shop
do revoke it at https://dashboard.stripe.com/apikeys, then update ~/work/shop/.env
SEEN BY THE AI: your agent's model saw these keys (1)
4. aws_secret_access_key from ~/.aws/credentials
seen in the output of a Read of ~/.aws/credentials
when 2026-10-02 09:42 UTC · Claude Code · ~/work/api
note Not ruled out: 2 later commands in that session could reach the network.
do your agent's model saw it; rotate it if that matters: https://console.aws.amazon.com/iam/home#/security_credentials
Stroq names a send only when it sees the key in the command that sent it. A script, a file or a variable can carry a key out without showing it.
Run these commands with Node.js 22 or newer. They work on sessions from before Stroq was installed. npx downloads the CLI from npm. To know what to look for, sent reads your key files (~/.aws/credentials, ~/.npmrc, ~/.netrc, ~/.docker/config.json, project .env files) and your environment, and keeps the values in memory only. "Went to" means a recorded call carried the key; it does not show what the host kept. See the guide's coverage and limits.
Guard future sessions: Stroq scans content visible to installed agent hooks, carries suspicion and source information into later decisions, and applies a local policy to the tool calls those hooks expose. It supports native hooks, an OpenClaw plugin and a stdio MCP proxy; coverage differs by agent and channel. The hooks do not send telemetry.
Supported today: Claude Code, Cursor, Codex, Copilot CLI, Windsurf, Google Antigravity (native hooks) · OpenClaw (in-process plugin) · any MCP client (stdio proxy).
Install
npx @stroq/cli init # Claude Code: writes .claude/settings.json hooks
npx @stroq/cli init --agent cursor # Cursor: writes .cursor/hooks.json
npx @stroq/cli init --agent codex # Codex CLI: writes .codex/hooks.json
npx @stroq/cli init --agent copilot # Copilot CLI: writes .github/hooks/stroq.json
npx @stroq/cli init --agent openclaw # OpenClaw: installs a plugin into ~/.stroq/openclaw-plugin
npx @stroq/cli init --agent windsurf # Windsurf: merges into .windsurf/hooks.json
npx @stroq/cli init --agent antigravity # Google Antigravity: merges into .agents/hooks.json
npx @stroq/cli init --agent mcp --client claude-desktop # any MCP client: wraps its stdio servers
npx @stroq/cli doctor # check the installation
init writes hooks into the project's .claude/settings.json by default; pass --user to install into ~/.claude/settings.json instead, or --dry-run to preview the change.
Prefer a persistent install? npm install -g @stroq/cli installs the stroq command globally — then run stroq init and stroq doctor directly.
doctor --json keeps its version 1 installation-wide ok and exit semantics, and adds diagnosticsVersion:1 with finite reason/scope facts on each check. An absent agent can still have ok:true when another agent is configured; its typed observation says not-configured. These are recorded offline checks, not current native-host blocking proof. The human-readable report remains unchanged.
Local security platform (source build)
This checkout also builds the console, a private page with five screens: Check (the card of your sessions), Live (the audit journal), Agents (hooks and settings), Rules (the policy) and Skills & MCP (what your agents load). Build and start it locally:
pnpm install --frozen-lockfile
pnpm --dir console install --ignore-workspace --frozen-lockfile --ignore-scripts
pnpm platform:build
node packages/cli/dist/index.js console --workspace /path/to/project --port 47815
Open the private URL printed at startup. The server binds only to 127.0.0.1; its fragment token grants access to the selected workspace and OS user, so keep that URL private. --port 0 selects an available local port. Starting the console does not install hooks or run an agent. A change to an agent's settings or to Stroq's policy is written only after you confirm a preview of it.
Rules → History makes retained policy backups usable from the console. Test the selected prior bytes against the current policy and saved checks before explicitly restoring them. A prior absent file offers the current bundled default, with separate consent for reduced protection, shared scope and private recovery copies. See tested policy recovery.
Agents → Test hook checks the exact captured source of an agent's hook with two fixed events, offline and with no provider requests. The recorded result stays separate from hook approval and native blocking. See isolated hook checks.
npm pack in packages/cli prepares a self-contained local tarball: the split CLI, static UI, local services, engine workers and required data all ship together. It installs the console's committed lockfile independently and builds the platform before packing. An installation of that tarball can run stroq console without the source checkout, Next.js or a separate frontend installation. Preparing a tarball does not publish it; this source feature has not been released to npm by this work.
Windsurf note: post_read_code cannot scan a directory Cascade reads recursively (it scans the file it names, and a directory reads as empty), and a tainted pre_read_code of ~/.ssh or ~/.aws without a trailing slash is not classified as a secret path either — see the Windsurf section of the full README for this and every other documented limit.
MCP proxy note: for clients with no hook API, --agent mcp rewrites the client's mcpServers entries so each stdio server starts through stroq mcp, which judges every tools/call and scans every result. There is no way to prompt from inside a proxy, so a policy ask arrives as a blocked tool result naming the rule; HTTP (url/serverUrl) servers are skipped; and the project directory is the one init ran in — see the MCP proxy section of the full README for this and every other documented limit. --agent mcp --strict additionally withholds, audits and counts every server message the proxy could not fully read and scan (an oversize or unparsable line, an unsolicited response, sampling and other server-initiated requests, fields it does not read, a scan that throws or passes a hard deadline) and answers the waiting request with a fixed error; the same section has the table and the limits.
MCP runtime pins
stroq mcp --server <name> --client <client> --pin sha256:<64 lowercase hex> -- node <absolute store entrypoint> [server arguments] refuses to start unless the same server name and digest are confirmed in this machine's passports.json. It checks every stored file against the stroq-tree/1 manifest, reads the source bytes once, and launches those bytes from a fresh private directory under <STROQ_HOME>/run (owned by the current user, mode 0700 on POSIX). The copy is normally removed after the server exits, including shutdown through SIGINT, SIGTERM or SIGHUP; SIGKILL, a crash during preparation, or a filesystem cleanup error can leave a copy there. Remove leftovers only after their servers have stopped. Windows relies on the user's home-directory ACL; POSIX mode bits do not establish Windows ACL isolation.
The server's working directory is the private copy, so relative paths refer to the confirmed tree rather than the project. --cwd selects the project for Stroq's decisions only. Every whole absolute argument inside the store tree is relocated to the corresponding file or directory in the copy; embedded references such as --config=<store tree>/config.json are refused, so pass the path as a separate argument. The Node runtime is the one running Stroq; Node loader flags before the entrypoint, package runners such as npx, and entrypoints outside the store are refused. Pinned wrappers with no environment record use the filtered infrastructure environment. Repeated --pin flags and malformed pins are usage errors.
A pin is written by stroq add --kind mcp, which 0.30 removed, so what follows is for wrappers an older version made. The pin holds such a wrapper to what add wrote, exactly: the proxy compares the whole command line it was started with (node, its flags, the Stroq entry, every flag and the command after --) with the recorded entry, token by token, and refuses to start on any difference, an added --cloak or a hand-made rewrite included (the refusal and stroq doctor print the command that takes the pin out: stroq init --agent mcp --unwrap, after which a plain stroq init --agent mcp wraps the server again without it). stroq doctor also compares the entry's env, cwd and other keys, and reports a pin that was taken out. A record with only a name and a digest is held to those.
stroq init --agent mcp leaves a pinned wrapper that the lock confirms exactly as it is, prints kept <name> for it, and prints the command that takes the pin out so that a rewrite with a new directory, node or flags can apply. This also applies to init --strict: it keeps those entries unchanged. A wrapper with a --pin that no confirmation here records is still rewritten with its --pin flags kept, invalid pins included, which keep failing closed. Rewriters that use wrapMcpConfig keep that behavior and leave the names in confirmed alone. --unwrap removes the pin along with the wrapper and prints a notice. stroq doctor checks each configured pin offline, and stroq exposure reports a changed or unverifiable pinned server as mcp-pin-drifted. Neither check starts the server.
The shared lock layout is { "v": 1, "skills": {}, "mcp": { "<server name>": { "kind": "mcp", "status": "confirmed", "digest": "<64 lowercase hex>", "grant": { "pin": "sha256:<same digest>" } } } }. The skills and mcp buckets are intentional: their writers must preserve each other's records. The schema lives in install/passports-schema.ts, read through install/lock-reader.ts and shared with install writers; the lock reader refuses files over 4 MiB with a distinct size-limit diagnostic.
This is tamper-evident, not tamper-proof: the same user can change the store, lock or private copy. The pin covers the shipped tree of a self-contained Node server; a package absent from that tree can still be resolved from an ancestor's node_modules and is not covered by the pin. stroq add --kind mcp (removed in 0.30) therefore refused a server whose package.json lists dependencies, whose sources import a package by name, or whose files it cannot read with certainty (a module name built at run time, createRequire, eval, an import of a path outside the tree), and stroq vet prints the blind spot imports resolve outside the pin for one. The reading of the text is best-effort and not a proof that no import escapes; a wrapper written by hand can still pin such a server. The private runtime folder prevents a module planted above a shared temporary copy from being used, but does not sandbox package resolution or the server, attest the Node executable, or cover code fetched at runtime. The pin itself is a flag in the client config: an agent able to edit .mcp.json or .cursor/mcp.json can remove it, and offline diagnostics inspect only entries that still carry a pin. The plain lock records neither who confirmed nor a signature. stroq add --kind mcp wrote the record after a person typed the digest at a terminal, and the proxy holds the wrapper to what that record keeps; a record written by hand with only a name and a digest is accepted and held to those. A wrapper without --pin retains its existing behavior.
Commands