FAQ

Frequently asked questions

Short answers, each drawn from the README and the docs. For anything not covered here, see the usage guide.

Which brokers does lockmq support?

RabbitMQ, through its management HTTP API (required), the stream protocol and AMQP 0-9-1 (both optional). It is tested against RabbitMQ 3.13 and 4.1.

Other brokers are not supported. See protocols.

Which AI agents does it work with?

Any MCP client: Claude Code, Codex, Cursor, Gemini CLI, … each starts the MCP server with the same command, lockmq mcp (wire the agent).

lockmq init writes the project files for these four. An agent can also use the lockmq CLI from a shell.

The agent must run confined: in a container without the Docker socket, for example inside lea. The console refuses a client that runs on the host or sees the Docker socket, or an older client, unless a non-production profile sets unconfined = true. The check covers the client, not the agent: a host agent that runs lockmq through the launcher passes it (the client runs in a throwaway container), so only running the agent itself inside lea contains it.

Which operating systems?

Linux and macOS, on amd64 and arm64. lockmq runs in Docker (Docker Engine, or Docker Desktop); on Windows, run the launcher in WSL 2.

The separation relies on Unix accounts, socket peer credentials and terminals inside the image. Install options.

How do I set it up?

Install lox and lockmq with Homebrew, run lox add lockmq in your project, and keep lox run open in a terminal of its own. Then start your agent.

By hand: lockmq init, lockmq profile add and lockmq doctor --fix. Setup steps.

Does the agent ever see the broker password?

No. The agent never sees a credential and never opens a connection. Credentials are typed at console start (no echo), or read from HashiCorp Vault.

They never appear in argv, environment, files, logs, the socket or error messages. URI passwords are stripped from every answer, including the URIs of shovels and federation links.

What waits for me, and what does not?

Each profile sets a rule per action: auto, ask or deny. By default the first connection of each lox run session and every peek are asked; lists and stream reads pass.

An unmasked read is always asked. Your rules.

Can lockmq publish, purge or move messages?

No. lockmq has no writes of any kind: no publish, purge, delete, move, requeue or shovel. The only operation that changes delivery state is the opt-in queue peek.

The rules for get, publish, purge and delete already exist, so a profile can be locked down before any such operation does.

Why is reading a queue off by default?

RabbitMQ has no read-only way to look at a classic or quorum queue. The management get takes messages and requeues them, so they come back redelivered and a quorum queue’s delivery count grows.

lockmq only peeks on a profile you set to tier peek. It shows the side effects on the screen, asks you every time by default, and refuses a peek near the delivery limit.

Streams have no such problem: a stream read moves nothing. More on peek.

Can the agent approve its own reads, or turn peek on?

No. Decisions come only from lockhub, signed, and lox run runs outside the agent. No socket method approves and no socket method loosens the policy.

Switching a profile to tier peek, or loosening a rule, takes effect only after you confirm it in the console.

Why does the console need its own OS account?

An agent in the console’s own account could read or type into its terminal. Separation is mandatory: without it the console refuses to start. The Docker image holds it: the console runs as lockmq, the agent as agent.

⚠️ Warning: an agent that can run docker commands can attach to the console or open its volume. The confinement check does not catch it when it runs lockmq through the launcher (the client runs in a throwaway container that passes the check). Run the agent inside lea to contain it.

For a hard boundary, run the agent in a container of its own, without the Docker socket. What Docker does and does not separate.

What happens if nobody answers a ticket?

A read or peek ticket stays pending: it waits up to 1 hour for a decision, and is asked again on the agent’s next run. A connect ticket not decided within 10 minutes fails. Silence is never an approval.

How is personal data in messages protected?

JSON bodies are masked per leaf. On production, by default, every string leaf of a JSON body and every header string is redacted unless an allow rule names it; elsewhere mask rules, key-name heuristics and value detectors decide.

Text bodies (text/* or no content type) and properties go through rules, heuristics and detectors. Bodies of any other declared type, and binary or compressed ones, are reduced to their size and hash. Masking is best effort: a value in a free-text field that nothing catches comes back in clear. More on masking.

Can I see the real values myself?

Yes, in the console only. Press Ctrl-O (or type :results) and the console prints each read and peek result in clear in its own terminal, while the agent still gets it masked.

To let the agent itself receive clear values, type :unmask. A request with --unmask then shows PII: UNMASKED on its screen and is asked every time, never auto-approved. Both switches are console-only and audited.

What permissions should the broker user have?

Tag monitoring, empty configure and write, and read only where needed. RabbitMQ lets the read permission purge a queue, so grant it on the streams, and on queues only for profiles with tier peek.

The console refuses an administrator or policymaker user on production. The broker user.

Can a message payload manipulate my agent?

It can try: lockmq treats the agent, and anything that can steer it such as message content, as not trusted. Every check runs in the console, and results are framed as untrusted data.

What is logged?

One JSON line per login, policy change, catalogue call, refusal, decision, run and logout in the console account’s audit log (mode 0600). It holds the operation, target, message count, the agent’s intent and the client’s uid.

Never a message body, header or property value.

How does it relate to the other Locks?

Same model, different target. lockmq is one Lock of the Lock Family: locksql gates SQL databases, lockfile files, lockhttp outbound HTTP(S), locklog logs and lockssh commands over SSH.

All are built on lockkit, and one hub, lockhub (lox run), decides for all of them.

Is lockmq stable?

It is a pre-release (before v1.0): any release may still change the config files, the MCP tools or the CLI.

Do I need Go to install it?

No. You need Docker and the lockmq launcher, a shell script; the release image holds the binary. Building from source needs Go 1.26 or later.

How do I report a vulnerability?

Privately, through GitHub security advisories, not in a public issue. See SECURITY.md.

What is the licence?

Apache License 2.0.