Guardrails
Govern request safety with publishable deterministic checks and Webhooks.
Choose a checker
Workspace Guardrail profiles support keywords, regular expressions, PII/secret detection, tool policies, and constrained HTTPS Webhooks. Choose input, tool, or final-output stages supported by the checker; stage support is not universal.
GDPR-related personal data
The PII/secret checker also detects valid IPv4/IPv6 addresses, explicitly labelled online identifiers, and labelled dates of birth. Checks run locally; ordinary execution records exclude matched values, while blocking evidence is encrypted separately.
- Online labels:
cookie_id,device_id,advertising_id,session_id,idfa, andgaid. Camel case, spaces and hyphens are accepted in place of underscores. Values use 8–128 letters, digits, underscores or hyphens and start with a letter or digit. - Birth date labels:
date_of_birth,birth_date,dob, or出生日期, followed by a validYYYY-MM-DDcalendar date. Camel case, spaces and hyphens are also supported for the English labels. - Labels and values must appear together in text, separated by
:or=; quoted JSON text is supported. Bare UUIDs and unlabelled dates are not detected by these new rules.
These are potential personal-data signals under GDPR Article 4 and Recital 30,
not a determination that a person is identifiable or that processing complies with GDPR. Public or private
infrastructure IPs and version-like strings can also match. Names, postal addresses, precise locations and
special-category data are not comprehensively detected; use additional policies or Webhook checks.
Review in Monitor mode before blocking. Upgrading the Gateway expands every existing pii_secret check;
already published blocking profiles can therefore reject newly detected content after the upgrade.
Monitor and Block
In the local preview, Chat Completions / Responses support output blocking after buffering the complete response, delaying the first content. Other streaming protocols may still reject output blocking before Provider invocation. PII/secret checks use local rules and require false-positive evaluation.
| Mode | Behavior |
|---|---|
| monitor | Runs asynchronously, records sanitized results, and does not block the call. |
| block | Runs synchronously and rejects requests or output when a blocking rule matches. |
Test and publish
-
Configure the profile. Webhooks also require a connection, authentication, timeout, and failure policy.
-
Use synthetic data to test allow/block parsing and inspect sanitized results, without real sensitive content.
-
Review and publish, then inspect recent Guardrail execution records to verify behavior.
Agent Hooks analytics
User activity ranking sits to the left of daily activity (above it on mobile). It shows the top five users by retained event count in the selected range, with initials, name, count and relative bars. Hover or keyboard focus shows active sessions and active days in your selected timezone. Source, time, stage and result filters apply; the user filter does not change the ranking. Clicking a user selects that user in the filter bar and updates the overview, heatmap, trend, stages and event list. Administrators see their authorized Workspace ranking; other members see only My activity. Counts are aggregated on the server, independently of pagination. Equal counts are ordered by user ID; unavailable names fall back to user IDs. This indicates usage frequency, not work performance.
Open Guardrails → Agent Hooks in a Workspace. Installation and failure policy is collapsed at the top; expand it for installation commands and configuration. Failure-policy changes still require saving a draft, reviewing and publishing a Release.
Select source, user, start/end time and result, then click Query. Results include all, allowed, denied and allowed without check. Administrators can view Workspace records; other members see only their own. Summary counts cover all retained matching events, independently of list pagination.
| Metric | Meaning |
|---|---|
| Received events | Events received by the server and still retained. |
| Denied | Checked events that were denied; the rate divides by checked events. |
| Active sessions | Distinct combinations of user, source, installation and nonempty session identifier with events in the range; not currently online sessions. |
| Active users | Distinct users with events in the range. |
The daily activity heatmap always covers the past year, keeping source, user, stage and result filters. Summary, trend and stages use the selected time range. Date grouping, time inputs and list receipt times follow the selected application timezone. Switching timezone preserves the queried instants; selecting a day uses that timezone's day boundaries.
The trend uses daily stacked columns. Stages use three horizontal stacked bars: Prompt submitted, Before tool use, After tool use. Each chart shares a count scale; total stage-bar length represents its event volume.
- Allowed (green): checked and allowed.
- Denied (red): checked and denied; a post-tool denial cannot undo an operation.
- Allowed without check (gray): events continued under the outage policy and already uploaded. Replay does not make them passed checks; they are excluded from green allowed counts and the denial-rate denominator.
Hover or focus a segment for all result counts and percentages, relative to that day or stage total. Event trends and stage distribution are read-only: clicking segments, dates or stage names does not filter the list. Use the filter bar or select a day in the daily activity heatmap to filter events.
Counts use server receipt time; deferred events count on their receipt day. Empty heatmap cells may reflect expired history, not absence of activity. Pending uploads are not yet counted. Original content in details is permission-controlled and every read is audited.
Agent Hooks during outages
Codex and Claude Code Hooks block by default when ShieldON is unavailable. An administrator can
select Continue with deferred auditing in Agent Hooks, save the draft, then review and publish
the Release. Update Shieldon Desktop and open Agent protection to enable or reconnect Codex / Claude Code Hooks. Existing CLI Hooks are migrated from the client. Codex setup requests OS administrator authorization and installs managed Hooks for the current OS user. Restart the Codex session; no manual /hooks switches are needed. Verify actual events in Shieldon before considering protection active. Claude Code also uses OS administrator authorization to install system managed-settings.json Hooks and migrate legacy CLI configuration. Restart Claude Code, verify the managed source in /status, inspect /hooks, and confirm actual events in Shieldon. Enterprise MDM or remote policy can take priority over local files; the client does not override it.
Continuation requires an unexpired one-hour cached authorization and encrypted local storage of the complete original event. Network failures, timeouts and temporary service failures can permit continuation. Explicit policy denials, authentication or permission errors, expired authorization, a full queue or failed storage still block. Offline content is not checked in real time; revocation and policy changes can take up to one hour to reach an offline client.
What happens in Codex
When offline continuation is authorized and the event is securely stored, Codex can continue.
The Hook returns a system message explaining that ShieldON is unavailable, the event continued
without a completed check under the organization's policy, and encrypted audit data awaits upload.
Codex controls how this message is displayed. Otherwise, the Hook blocks the submission or tool
call and returns the reason. PostToolUse runs after execution and cannot undo completed actions.
An outage can initially cause a short delay: each Hook makes at most two check requests with a three-second timeout per request. After two consecutive failed online Hook checks, the circuit opens for thirty seconds. During that interval, Hooks still validate offline authorization and store events, but skip remote checks. Recovery may therefore only be detected by the next Hook after the circuit interval ends.
Recovery detection and upload
- A new message or tool operation triggers another Hook.
- During the circuit interval, the offline policy still applies. Once the interval ends, the Hook attempts the current event's online check directly; it does not send a separate health probe.
- A valid, verified check response clears the circuit state, refreshes the one-hour authorization, and triggers an attempt to upload up to three queued records within two seconds. The current event follows its online allow or deny decision.
- Local records are deleted only after the server acknowledges them. Remaining or failed uploads stay queued for a later attempt.
There is currently no dedicated recovery or upload-completion notification; normal checks resume. If replay fails, the Hook runtime emits a pending-upload message whose presentation depends on the host. Service recovery alone does not start uploads, and there is no background synchronizer. Pending records can also be uploaded from the desktop client:
To upload pending records manually, open Agent protection in Shieldon Desktop and click Sync audit for the Agent.
Manual sync attempts up to one hundred records within thirty seconds and preserves unfinished records. Replayed events are marked Allowed without check, retaining observation time, receipt time, policy version and original content. Replay only completes the audit trail; it does not rerun historical Guardrail checks or mark these events as having passed a check. Expired authorization prevents further offline continuation, but events observed within its validity window can still be uploaded after recovery if retention requirements and current identity and permission checks succeed. Pending records prevent uninstalling the binding; preserve the encrypted queue and credential store.
Non-streaming output message checks include Chat reasoning_content/refusal, Responses reasoning summaries/refusal, Anthropic thinking, and Gemini text parts including thoughts. Opaque signatures, encrypted content and tool arguments are not message text. Existing checks inspect these fields after a Gateway upgrade. Output blocking preserves reported token usage. Streaming output blocking still rejects before the Provider call; monitor checks do not inspect streamed output.
Next steps
Inspect blocking evidence
Administrators can load evidence on demand from request details or Agent Hooks events. The panel shows rules, reasons and matched text, without the full checked payload. Tool policies and Webhooks may provide no text match. Reads require permission and auditing; historical events without archives cannot be reconstructed.
Gateway blocking evidence is encrypted and retained for 30 days independently of ordinary body capture. Agent Hooks evidence follows the original archive retention. Backend archives include checked content. Available archive storage is required; archival failure does not change the block decision.
View Hooks in Request logs
Select Agent Hooks in Workspace Request logs to filter by agent, user, stage, tool, session and installation. Details load original content and matching evidence on demand; administrator reads are audited. View session filters by user, agent, installation and session ID within the selected time range. It does not infer associations with model requests.
The Endpoint Agent Hooks page retains configuration and analytics. View request logs carries the applied filters to the unified list. Allowed, denied and not-checked events remain distinct. Hooks do not count toward model requests, Tokens or Credits. Exports use the existing task workflow, leave model usage blank for Hooks and expire no later than the earliest included Hook.