Skip to content

Sensitive content handling ​

Built Octryx AI examines what goes to a model for sensitive content and acts on it per content kind. A Workspace admin chooses the action for each kind; a fresh install starts with the defaults below.

The kinds: credentials, credential assignments, email addresses, internal IP addresses, IBANs and phone numbers.

There are two places where this happens, and they work differently:

  • The platform's own model calls: the chat, tasks, governed runs and tool results. All five actions apply here.
  • The gateway of external coding agents: the requests of Claude Code and Codex, on the governed route and on a seat. A request is forwarded unchanged or refused; nothing is masked or rerouted there.

Defaults ​

These apply on a fresh install, and in every Workspace that changes nothing.

WhereWhat happens
Platform's own model callsCredentials and email addresses are masked, internal IP addresses are reported, IBANs and phone numbers are not acted on
Gateway of external coding agentsCredentials are refused, credential assignments are reported (the request goes on, the finding is recorded); nothing else is acted on
Command safetyA command with credentials or internal IP addresses is sent for review

The five actions ​

A Workspace admin chooses one per kind in Agents › Governance › Policy, card Sensitive content handling. On the platform's own model calls:

ActionWhat happens
Refuse (refuse)The request is not sent. The caller gets content_policy_denied.
Mask (mask)Each value is replaced by a numbered placeholder before the model sees it.
Reroute (reroute)The request goes to the Workspace's governance alias.
Mask and reroute (mask_reroute)Masked, and sent to the governance alias.
Report only (report)The text goes to the model unchanged; the finding is recorded as an informational decision.

An admin can also set a kind back to its shipped default. Before you save, the card shows what the chosen action does at every place; on the gateway it shows "platform calls only" wherever the choice does not act there.

The governance alias ​

Each Workspace has one governance alias: the single governed model alias (an alias of an active model gateway) that every rerouting kind is sent to. Kinds carry no alias of their own.

  • A kind can be set to reroute only while the Workspace has a governance alias (content_handling_alias_required).
  • The alias cannot be cleared while a kind still reroutes (content_handling_alias_in_use, naming the kinds); it can only be replaced by another governed alias.

Where reroute does not apply ​

  • A model's reply goes back to the user, not to another model. There reroute and mask and reroute mask instead. The call's decision record is request-side: it says, for the request sent, which action was requested and which was applied. The reply adds no per-kind entries; a refused reply only sets reply_refused: true on that same record.
  • A direct provider driver, and commands: reroute and mask and reroute are refused with content_route_unavailable.

On the gateway of external coding agents ​

The gateway protects against accidental leakage by your own coding agent and against prompt injection arriving in tool results. It does not defend against a deliberately evasive client: Claude Code and Codex are your own programs and can reach any provider directly.

  • Forwarded unchanged or refused. The bytes sent are exactly the payload the gateway scanned.
  • Only credentials and credential assignments act there. Credentials are refused by default, credential assignments reported by default; a Workspace can set Refuse or Report only for either. A credential assignment is a field whose name ends in a credential name (password, db_password, access_token, client-secret, …) with a literal value, also inside tool arguments, tool results and embedded JSON.
  • Every other kind, and mask and the reroutes, apply to platform calls only. On the gateway such a setting leaves the kind at its default: a credential set to mask stays refused there.
  • Prompt injection is checked only inside tool results (Claude Code's tool_result blocks, Codex's tool-call outputs). Found there, the request is refused (content_policy_denied). It is not checked in tool definitions, in your text, in the assistant's text or in the client's system prompt.
  • The Workspace's custom content policies are asked too. A policy that blocks refuses the request; a policy that would mask or reroute also refuses it (content_handling_gateway_refused), because the gateway changes nothing. In shadow mode the request is sent and what the policy would have done is recorded.
  • Bodies that cannot be checked are refused: invalid JSON (request_body_invalid), a body over 16 MiB (request_body_too_large), or a check not finished within 10 seconds (content_scan_unfinished). The next request is examined again.

A refusal and a report notice name the decision record and say what to do next: remove the affected message or start a new conversation (Claude Code: /rewind or /clear; Codex: start a new session). A credential refusal names the kind of credential on the run's timeline.

What stays fixed ​

No setting changes these:

  • Text the detectors could not finish examining is withheld from a platform call; on the gateway the request is refused.
  • Content of an unknown shape in a platform call is refused (content_unreadable).
  • Prompt injection is refused: in every field a platform call sends to a model, and on the gateway in tool results.

Who can change it ​

Workspace admins and owners, and platform admins. Members see the action in effect for each kind, and whether it is the default. Every change of an action or of the governance alias is written to the audit log as content_handling.changed; see Governance.

Known limitations ​

See Known limitations.

Reference: how the checks work ​

The exact behaviour, for admins and reviewers who need it.

The gateway in detail ​

The gateway covers the Anthropic route and the Claude Code seat, and the /openai Responses route and the Codex seat. A governed call's final payload is built before the scan: the model replaced by the alias' model group and, on the Responses route, the effective output cap. A seat call sends the client's body as it arrived. The bytes sent are exactly the serialization of the payload the gateway scanned; there is no separate final check on the gateway.

The threat model has three consequences: no protocol-shape validation beyond JSON parsing; opaque fields skipped by an exact key list without content validation (below); caller-supplied names and types are not verified.

  • What is scanned. The whole JSON payload as one text, minus the values under the opaque key list, plus the structured credential assignments of its parsed keys and values. A field whose name ends in a credential name assigning a literal value is a credential_assignment finding: in tool arguments, tool results and prompt data, a string that is itself serialized JSON included, the opaque list honoured. It is classified the same way for refuse and report.
  • Prompt injection is checked only inside tool results: Anthropic tool_result blocks, Responses function_call_output and *_call_output items, each read as one text. It is not checked in tool definitions, in the user's, the assistant's or the client's system text, in citations or in search items.
  • Bodies that cannot be checked. Not valid JSON (a repeated key, a nesting deeper than 64, a non-finite number such as a NaN or Infinity literal or a number beyond the float range, invalid UTF-8): request_body_invalid (400). Over 16 MiB: request_body_too_large (413). Not checked before the deadline: content_scan_unfinished (400). Nothing unfinished is remembered: the next request is examined again.
  • Deadline. 10 seconds from the moment the request handler is entered, the body read included. It bounds the content examination, from entry to the last scan, the structured fields and the bytes to send. The clock is read once after all of it; a passed deadline is the fixed unfinished refusal, before any finding reaches a custom policy or a record. Admission, budget and commit steps after a finished examination are not content work and are not bounded by it.
  • Custom content policies (Cedar) are asked over the whole body's findings. A blocking policy refuses with content_policy_denied; an obligation to mask or reroute refuses with content_handling_gateway_refused; in shadow mode the request is sent and what the policy would have done is recorded.

Decision records on the gateway ​

A content decision record is written once, when the request ends, from its actual final outcome:

  • for every request refused for a content reason: an unreadable, oversized or late body, a fixed rule, the content handling, a tool-result policy, or a custom policy. It is refused, with the reason and the stage (body, content, tool_result_policy, cedar);
  • for every request with acted-on or reported findings.

It never claims an action that was not applied:

  • A request with findings that was sent is forwarded (applied: report), also when the upstream answered with an error status (upstream_status): the body crossed the transport, so it is never refused. A request counts as sent the moment the upstream's response headers arrive, before any error body is read.
  • A request with findings that was not sent for another reason (a budget, an undelivered send, a cancellation or failure) is not_sent, with that reason and stage (applied: none).
  • A tool-result injection refusal states the injection's count and source (prompt_injection).
  • A refusal for a non-content reason with nothing found (run limits, admission, budget or cost, authentication, a model denial, loop protection), and a clean forward, write no content record.

The refusal and the report notice (header x-octryx-obligation, on every returned answer, upstream errors and token counts included) name the record and say what to do next. A credential refusal names the kind of credential on the run's timeline. The Agents badge counts what the newest turn carries.

The opaque key list ​

The only values not read, by key, wherever they are, without validating their content. The same list applies on the gateway and on the platform's own calls.

KeySkipped when
signatureits value is a string (a thinking block's signed state)
encrypted_contentits value is a string (encrypted reasoning, compaction or web-search state)
dataits value is a string in an object whose type is base64 (a media source) or redacted_thinking
image_url, url, file_dataits value is a data: URL (an inline image or file)

The platform's own model calls in detail ​

  • One budget per call. Every provider-bound field is examined once within one budget for the whole call: size, number of parts, and a deadline from the call's entry to the last scan, the final check's serialization included. The size cap counts the full serialized bytes, opaque values included. The clock is read once more after all content work; a deadline passed during the examination is the fixed unfinished refusal. The custom policies' scans of a governed call, an obligation's masking pass included, are charged to the same budget. Once it is spent, the call is refused unfinished (content_scan_unfinished, a notice without counts) before any later decision.
  • Refuse and history. A kind set to refuse refuses new content (the newest turn, system text, message fields) and newly offered tool definitions. Found in older history or in a replayed tool call, it is masked instead: that text was checked when it was new.
  • Prompt injection is refused in every field sent to the model, the newest user text included. An administrator-authored agent role ("Act as …") is the one phrasing not refused there.
  • Platform instructions. A platform instruction is sent unchecked only when its text is exactly a shipped seed text (by content hash). An edited or Workspace-authored instruction is checked like any authored text.
  • Unreadable structure. A request whose structure cannot be read (messages that are not a list of objects, a nesting deeper than 64, text that is not valid Unicode, a role that is not a string, an unknown block) is refused with content_unreadable before anything copies or hashes it.

The final check ​

Right before a provider driver sends, the final request object it hands to its transport or SDK is read once more as one JSON text, minus the opaque key list, with the same structured credential classification as the gateway. It never rewrites text. The only text not read is a field that is exactly a shipped seed text.

Prompt injection is not evaluated in a system carrier of the driver's request whose value is exactly an authored system text of the call, or exactly the driver's join of the call's system texts. A system carrier is the top-level system or systemInstruction, or a message of the top-level messages or input list whose role is system or developer. Nothing else is looked at for a role: the same text in any other field, or inside a longer value, is evaluated, and every other detector reads the authored field whole.

The call is refused and nothing is sent if:

  • prompt injection, or a kind whose action must keep it out (refuse, mask, mask and reroute), is still there;
  • a rerouting kind is there while the call is not going to the Workspace's governance alias;
  • the call ran out of its budget.

Right before the send, after the custom policies, a call that a rerouting kind sent to the governance alias must still be going there; a mismatch is refused with content_route_unavailable.

The record of a platform call ​

The record is request-side only. It is written once, after the request was handed to the transport, from the final check's reading of the sent bytes:

  • a kind present in them is recorded with its applied action, report or reroute;
  • a kind the examination of the input found and the sent bytes do not carry is recorded mask;
  • a report first seen in the sent bytes is included; a report this process already recorded for the same text is named reported_before, and the earlier record keeps counting it;
  • a refused call is recorded refuse, refusals by custom policies and by the final check included;
  • a call neither refused nor sent (the driver failed, or the call was cancelled before the hand-off) has no record.

The reply is masked or refused as configured but leaves no per-kind evidence: a refused reply only sets reply_refused: true on the call's record, and a reply part whose examination does not finish is withheld. The conversation's badge is counted after the record.

Tool results ​

Each released tool result has at most one decision record, written once from what was actually released: unchanged, masked, blocked, or kept by a coding agent's client that cannot take a masked output. A result released unchanged with nothing to state has none.

  • Each kind's applied is read from the released result: report only for a reported kind it carries; mask only for a kind found and absent from it (a Workspace policy's mask); otherwise none, because it applies where the result next reaches a model. informational lists the kinds applied as report.
  • A blocked result is refuse; an unfinished examination is the fixed record without findings.
  • The record is written when the check returns the result to its caller; a check that fails or is cancelled before that writes nothing.
  • A result the client keeps (a built-in tool) is released as it came, with nothing claimed as blocked, masked or withheld; the launcher's notice says the output stays and the gateway checks it. A Workspace policy's part, and a withheld count, are stated only for a released result.

The conversation's badge counts only what entered the context, after the record.

Octryx AI v0.0.1-alpha · Apache 2.0 · octryx.ai