Safety model
Before diving into individual tools, it helps to understand the two-tier scope system that underpins all of them. Preview rules exist to make iteration safe. When your agent creates a rule, it lands in preview scope first. Preview rules apply only to sessions opened in preview mode, leaving your production capture untouched. You can create, test, and delete preview rules freely. Live (production) rules apply to every captured session. They are created by promoting a preview rule, and they cannot be deleted through the agent tooling. This asymmetry means your agent can autonomously handle the entire propose-create-promote cycle while a human retains final authority over what gets removed from production coverage. The tooling is designed to let the agent move fast without being able to accidentally dismantle your privacy posture.privacy-propose
Scan a session for PII and propose masking rules as a dry-run.
privacy-propose is a read-only operation. It inspects the session’s event stream, identifies elements that appear to contain personally identifiable information, and returns a list of suggested CSS selectors along with a rationale for each match. Nothing is written to Subtext — no rules are created, no state changes.
Key behaviors:
- Returns candidate CSS selectors, not finalized rules. You decide which suggestions to act on.
- The agent evaluates visible text content, element attributes, and contextual signals (field labels, surrounding copy) to assess PII likelihood.
- Safe to call multiple times on the same session without side effects.
privacy-create to persist them.
privacy-create
Persist privacy rules from CSS selectors in preview scope.
privacy-create takes one or more CSS selectors and writes them as masking rules scoped to preview sessions only. Elements matching these selectors will be blocked in the session replay viewer when a session is opened in preview mode, giving you a way to verify correct behavior before rolling out broadly.
Key behaviors:
- Rules created here do not affect your production session capture until explicitly promoted.
- Returns a rule ID for each created rule — save these IDs to use with
privacy-promoteandprivacy-delete. - You can create rules from selectors you wrote yourself, not just those returned by
privacy-propose.
Creating a preview rule does not modify any previously recorded sessions. It only affects sessions captured after the rule is created and viewed in preview mode.
privacy-list
List all current element-block (privacy) rules.
privacy-list returns every active privacy rule across both preview and production scopes. Use it to audit your masking coverage, confirm that a newly created rule is registered, identify candidates for promotion, or spot rules that are redundant or outdated.
Key behaviors:
- Returns rules from both scopes in a single response.
- Each rule entry includes its ID, CSS selector, scope (preview or live), and creation timestamp.
- Read-only — calling this tool changes nothing.
privacy-promote
Promote a preview rule to live scope so it applies to all sessions.
privacy-promote escalates a preview rule to production. After promotion, every new session your application captures will mask elements matching the promoted rule’s selector. The rule also becomes protected — it can no longer be deleted through the agent tooling.
Key behaviors:
- Accepts a single rule ID per call. Promote rules one at a time so you can validate each one individually.
- Promotion is immediate — the rule goes live as soon as the call succeeds.
- The original preview rule is replaced by a new live rule with a different ID. Update any references accordingly.
- Past recordings are not retroactively affected; masking applies to sessions captured after promotion.
privacy-delete
Delete a preview rule by ID.
privacy-delete removes a preview rule permanently. Use it to discard selectors that turned out to be incorrect, overly broad, or no longer needed after a UI change. Only preview rules can be deleted through this tool — live rules are protected.
Key behaviors:
- Accepts a rule ID that must correspond to a preview-scoped rule. Passing a live rule ID returns an error.
- Deletion is immediate and irreversible for the rule record itself. You can always recreate a rule with the same selector if needed.
- Does not affect any previously captured sessions.
To remove a live rule, navigate to the Privacy section of the Subtext dashboard. This deliberate friction ensures that production masking coverage is never reduced without a conscious manual action.

