How Hive checks agent actions
The rules Swarmix Hive applies to each tool call an agent makes, which calls ask you, which Hive refuses, and what it records.
An agent works through tools: it reads and writes files, runs commands, searches, and calls plugins and servers. Before a tool call runs, Studio sends it to Swarmix Hive, the Swarmix service on your computer. Hive checks the call against your company's rules, the agent's role and your own rules. It allows the call, refuses it, or asks you. If Studio cannot reach Hive, the call does not run.
This page explains how Hive decides. To answer a request, see Approving agent actions.
The rules, in order
Hive applies the first rule that matches the call:
- Your company's blocks. Hive refuses a tool or command your company blocks.
- The agent's role. Hive refuses a tool the role denies. It also refuses a protected path, and a path outside the agent's working folder when the role keeps the agent in that folder.
- Your "Always Deny". Hive refuses a tool you denied for this agent.
- The exact tool list. When the role lists the only tools the agent may use, Hive refuses any other tool.
- Allowed tools. A tool the role allows, or one you allowed with Always Allow or Allow for this chat, runs.
- Anything else asks you.
Admins build roles and company rules from ready-made groups, such as Protect credentials & secrets (SSH keys, cloud credentials, .env files, private keys), Protect git history (force-push, reset --hard) or Block all network access. See Tools and services and Agent teams, roles, profiles and traits.
Calls that ask you each time
Hive asks you about a call that can delete or overwrite data, even when a company rule, the role or your Always Allow would let it run:
- a shell or PowerShell command on Hive's lists of destructive and git-history commands, such as
rmorgit push --force, also as part of a longer command; - a tool that declares that it deletes or destroys data;
- a plugin action that deletes or changes data in an app, such as deleting a worksheet in Excel. The card names the type of action.
A deny still refuses these calls. To stop the questions for the rest of a chat, click Allow for this chat on the card when Hive offers it. Studio does not save that answer for the agent.
Your organization can also ask you about every call from a risk level, with its Always ask at risk setting. These calls ask you each time, with Allow once or Deny only, in every permission mode. Hive works out a call's risk from what the tool declares, or from the kind of tool. A tool from a maker Hive does not trust can raise its own risk, never lower it. See Risk & Audit.
Calls Hive refuses whatever the rules allow
- A call that keeps failing. After the same call with the same input fails twice in a turn, Hive refuses it and passes the last error to the agent, so the agent can change its approach.
- A file of another project. Projects are self-contained: an agent cannot reach another project's files.
- A chat past its limits. When a chat reaches the limits your company set, its agent makes no more tool calls.
- A call Swarmix cannot record, when your organization's Fail closed setting is on. The chat says why.
- A plugin your company does not allow. The plugin's tools do not run.
The permission mode
Hive's answer then passes through the chat's permission mode:
| Mode | What happens to a call that would ask |
|---|---|
| Ask Everything | You get a card. |
| Accept Edits | Studio approves file edits. Other calls give you a card. |
| Plan first | Read-only tools run. For other tools, each tool's maker declares whether Hive runs it, asks you or refuses it while the agent plans. |
| Deny All (set by an admin) | Hive refuses the call. |
| Auto-approve or Bypass Permissions (set by an admin) | The call runs without a card. |
A refused call stays refused in all modes. A call that can delete or overwrite data asks you in all modes except Deny All, which refuses it. Your company can rule out the modes that approve more than it allows.
Risk
You meet two kinds of risk information:
- The risk line on a card shows what the tool's maker declared: a level from Low to Critical, and what the tool does, such as "writes files" or "uses the network". Some tools declare nothing: the line then says "Risk not declared by the tool". Values from a source Hive does not trust carry "as claimed by an external source".
- The risk pill in the chat's header shows Hive's score for the whole chat, from Low to Critical. Click it for a summary, then Show details for the chat's calls by risk and its alerts. In a crew chat, the details also show each agent.
Hive also notes approvals given too fast or in bulk, and risky calls that ran without a person's decision. Leaders see these in Risk and data.
Your data in tool calls
When Data Shield is on, Hive masks sensitive values in what plugins and servers return before the agent sees them. When the agent sends a masked value back in a call, Hive puts the real value in before the call reaches the plugin or server. The agent and its AI vendor see only the masked values.
What Hive records
Hive records each tool call and its decision in your agent's audit trail: what the agent asked for, whether the call ran, and who decided (a company rule, a role, your saved rule, the permission mode, or you). Under a company rule in audit mode, the call runs and Hive records that the rule would have refused it. See Audit trail.
What the rules can and cannot see
Command rules match the text of a call. A rule on rm does not see rm inside a script, inside $(...) or behind sh -c, so Hive treats command rules as a guardrail that catches the plain command. The exact tool list and the working-folder rule work on tool names and paths instead of command text.
FAQ
A rule matched first: a company block, the agent's role, your Always Deny, or the exact tool list. Hive also refuses a call that keeps failing, a call on another project's file and calls in a chat past its limits.
The call can delete or overwrite data, or its risk reaches your organization's Always ask at risk level. These calls ask you each time. For a call that deletes or overwrites data, use Allow for this chat when the card offers it.
No. Admins set them. You can add and remove your own rules in Allowed Tools. See Approving agent actions.
Studio cannot check the call, so the call does not run. The chat shows "Swarmix Hive unavailable — tool call blocked".