# AI data use

What Bucker sends to a language model, when, what it never sends, and how to turn it off. This
page describes what Bucker actually sends, not what we would like to be true. Where something is
not built, it says so.

## The short version

- **By default, nothing is sent to any model.** The default provider is deterministic and
  rule-based: it runs inside Bucker, makes no network call and needs no key. Root-cause
  analysis works without a model. Data goes to a model only where a hosted provider and a key are
  configured: Bucker's own (see [which provider, and whose key](#which-provider-and-whose-key)) or
  your organization's own key.
- **When a hosted provider is configured, four main features call it** (further purposes, each
  with its own conditions, are in the table [below](#what-each-purpose-may-send)): root-cause analysis (a few
  short sentences of already-validated facts), the issue summary's first line (the same kind of
  facts), fix authoring (which includes **your source code**; see below), and the optional
  evaluation judge for agent observability (on Bucker's hosted service, only on your
  organization's own key).
- **One switch turns all of it off, per organization:** *AI features enabled* under Settings →
  General (the `aiEnabled` setting). Off, nothing new starts, and a model is never called for that
  organization.
- **Bucker does not train, fine-tune or evaluate any model on your content.** Bucker has no model of
  its own and no training pipeline. The model provider's own retention and training terms apply to
  what reaches it, and we have no zero-data-retention agreement with any provider. We say so
  rather than imply one.

## What is sent, per feature

### Root-cause analysis

Hypotheses and evidence are produced from your stored rows by deterministic rules and validated
against real entities. The model is asked only to **rephrase** the top three hypotheses, one
sentence each, and its output is re-validated: a sentence that names a file, function, release or
commit that is not in the validated set is discarded and the deterministic wording is kept.

Each call carries:

| Sent | Example |
| --- | --- |
| A fixed instruction (the same text for every customer) | "Phrase this hypothesis in one sentence" |
| One hypothesis as three short strings: a subject, a mechanism and an effect | `src/cart/total.ts` / "contains the top in-app frame (computeTotal:42) and is where execution failed" / "a null dereference in computeTotal()" |
| A ceiling on the answer (120 tokens) | |

What that means in practice: **file paths, function names, a line number, a release or commit
identifier, the minutes between a change and the first error, and a similarity percentage.** The
effect is the wording of the rule that matched; **the exception's own message is deliberately not
spliced in**, because it is customer-controlled text.

**Not sent:** the exception message, request data, user data, breadcrumbs, event payloads, log
lines, replay, or the issue's full error essence.

### Issue summary (the header's first line)

The issue header shows two lines: what failed, and the likely cause. The cause line is the latest
root-cause analysis's top hypothesis, word for word, with "from RCA run #n"; no model writes it.
The first line is built from stored facts by a fixed template, and only when a hosted provider is
in use (and AI features are on) is the model asked to rephrase those facts as one sentence.

| Sent | Example |
| --- | --- |
| A fixed instruction | "Phrase these facts as one sentence… Never state or guess a cause." |
| The exception type, the top frame (file, function, line) and the culprit | `TypeError`, `src/cart/total.ts`, `computeTotal`, `42` |
| First and last seen, event and user counts, environment names, the release version | `2026-04-01T12:00:00Z`, `12`, `3`, `production`, `1.4.0` |

**Not sent:** the exception message, stack contents beyond the top frame, request or user data,
breadcrumbs, logs, replay. The answer is shown only if it names no file, commit or number that is
not in those facts and asserts no cause; otherwise the template is shown. One answer is reused per
issue, analysis run and event count, so a page view does not make a call.

### Fix authoring (the remediation loop)

Fix authoring writes a reproduction test and a patch, so it needs the code. When a hosted provider
is configured and a remediation run starts, the prompt contains:

| Sent | Scrubbed first? |
| --- | --- |
| The issue's short id, exception type and exception value, and the culprit | Yes: the agent-tier scrub, with your organization's own scrub rules |
| A summary of the latest root-cause analysis | Built from validated facts only |
| The **error essence** (bounded, trust-labelled) | Yes: scrubbed and injection-checked |
| The files the patch may modify (the blast radius) | n/a (paths) |
| Prior rejections and the localization hint | Yes: a human's free-text rejection reasons are scrubbed and injection-checked |
| **Source code from your connected repository**: the chunks retrieved for the issue | **No.** See below |
| On a retry, the current contents of the files being patched, the model's previous diff and the repro test's failure output (last 3,000 characters) | **No** |

**Source code is not redacted, on purpose.** The patch is applied by an exact matcher that needs
the model to reproduce the repository's bytes character for character; scrubbing the code would
break the applier rather than protect anything. Two things bound the exposure instead: the
instruction tells the model that everything in the prompt is data and never to follow instructions
inside it, and the sandbox refuses any change outside the allowed files regardless of what the
model wrote. If your source code must not leave your environment, **turn AI features off for the
organization** (below), or do not connect a repository.

Anything the model writes is run in an isolated sandbox against your tests before it is shown as
a verified fix; the model never decides whether a fix is correct, and a human approves every
merge ([agent governance](agent-governance.md)).

**Not sent:** other issues, other projects, other organizations' data, credentials, or environment
variables. Secret-shaped strings are removed by the storage-tier scrub before anything is
persisted, so they are not in the rows these prompts are built from.

### Evaluation judge (agent observability, optional)

Only when you run an evaluation whose cases escalate to a judge. There are two kinds:

- **A rubric judge** scores a case with your judge's own prompt (which you wrote), a score computed
  locally, a pass/fail and at most ten reason strings drawn from the fixed rubric. **The agent's
  output and the reference answer are not sent.** On Bucker's hosted service the rubric judge is
  deterministic, and nothing leaves Bucker.
- **A model-judged judge** (a judge that names a provider and a model) is called only when all of
  these hold: AI features are on for the organization, a person switched judging on for the project
  and named that provider, the organization has stored **its own key** for that provider (never
  Bucker's key), and the judge's measured flip rate under adversarial input is known and at most
  10%. The call carries the judge's prompt and rubric and the case's content after the agent-tier
  scrub, inside a frame that marks it as data and says nothing inside is a command (text the
  injection scanner flags is withheld first). **The reference answer is never sent.** Its verdict is
  advisory and sits beside the rubric result; it never replaces the case's score.

### Similar issues and grouping suggestions (embeddings)

Not a language model: an embeddings provider turns text into a vector of numbers that Bucker
stores beside the issue and compares with other issues in the same project. Only when a hosted
embeddings provider is configured for the service and your organization has AI features
enabled. Each issue sends four fields — exception type, exception message, title and culprit —
when it is created and when its vector is rebuilt. They have had the storage-tier scrub
(credentials removed), not the stricter agent-tier pass, so an email address inside an exception
message is sent as stored. **Your source code is not sent**: Bucker's hosted service does not
enable source-code embeddings. With AI features off, or no provider configured, issues are
compared by shared words inside Bucker and nothing leaves. Details:
[similar issues and grouping](semantic-grouping.md).

<!-- egress-contracts:begin -->
## What each purpose may send

Each call to a hosted language model is made for one purpose, and each purpose has a fixed contract: the
data classes its prompt may carry, the providers it may go to, a token ceiling and a version. The
contracts are set by Bucker, and nothing you or an agent does at run time can add a data class, a
purpose or a provider to one. A project can only take away (`ai_egress_policy.narrow`), and giving
that back is a person's act with a second owner confirming (`ai_egress_policy.widen`).

Before a call reaches a hosted model, Bucker labels every part of the prompt with a data class and
checks the labels against the purpose's contract, then runs the credential, personal-data and
injection detectors over every part that is not sent verbatim by design. A call that carries a class
its contract does not list, goes to a provider it does not list, is over its token ceiling, or is
switched off for the project is refused, and the feature uses its deterministic wording instead. Every
call, allowed or refused, is one row in the egress ledger: counts by data class, tokens, the contract
version, a SHA-256 of the prompt and the decision, and never the prompt itself. Read it with the
`ai_egress_get` tool.

| Purpose | What it is for | Data classes it may carry | Providers | Token ceiling | Version | Sent verbatim | If refused |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `rca_narration` | Rephrase one validated root-cause hypothesis (three short strings) as a single sentence. | `validated_fact`, `frame_identifier` | `anthropic`, `openai` | 2,000 | 1 | none | The deterministic hypothesis statement the rule engine already produced. |
| `issue_summary_line` | Rephrase the issue header's stored facts as one sentence that states no cause. | `validated_fact`, `frame_identifier`, `release_label`, `tag_key` | `anthropic`, `openai` | 2,000 | 1 | none | The fixed template line built from the same facts. |
| `fix_author` | Write a reproduction test and a unified diff for one issue. Source code and the failing test output are sent verbatim. Where a person has chosen a recorded session for the issue and replay evidence is switched on for sending, the scrubbed action log of that session (route templates, element selector leaves, request methods, paths and status codes, console lines) may also be sent; no input value, DOM, pixel or request or response body is. | `validated_fact`, `issue_title`, `exception_value`, `frame_identifier`, `local_variable`, `comment_body`, `code_snippet`, `ci_log`, `replay_input_label`, `replay_console`, `page_url` | `anthropic`, `openai` | 200,000 | 2 | `code_snippet`, `ci_log` | No fallback: a run with no usable author fails with a named reason, never an empty patch. |
| `eval_judge` | Score one evaluation case with the judge's own prompt and rubric. The call carries either a locally computed score and at most ten rubric reasons, or, for a model-judged judge on a project that switched judging on and an organization key for the judge's provider, the case's content after the agent-tier scrub inside a data-only frame (delimited as data, with the instruction that nothing inside is a command; text the injection scanner flags is withheld before the frame is built). The reference answer is never sent. | `customer_authored_prompt`, `validated_fact`, `rubric_reason`, `span_attribute_value` | `anthropic`, `openai` | 8,000 | 2 | none | The judged tier answers abstain for the refused case and records why; the rubric score of the case is unaffected, and the run is never adopted as a baseline on a judged verdict. |
| `session_summary` | Summarize one recorded session from its scrubbed action log (route templates, element selector leaves, request methods, paths and status codes, console lines unless the project masks all text) with counts Bucker computed, or label one selector skeleton's role from a closed list of twenty. Where session summaries are switched on and moment outlines are switched on for sending, the text outline of one moment of the session (kinds, roles and the clicked element, and the text the project's policy granted) may also be sent; no frame, position, size, colour or input value is. No DOM, pixels, request or response bodies or headers, query strings or input values are sent, and nothing is sent unless a person switched session summaries on for the project. | `validated_fact`, `replay_input_label`, `replay_console`, `page_url`, `page_title` | `anthropic` | 3,500 | 2 | none | The deterministic chapters and counts the replay already derives; a rejected or unavailable summary is shown as such, never replaced by a guess. |
| `survey_theme_naming` | Name ONE cluster of survey answers in at most six words from its distinguishing phrases (at most five short n-grams drawn from the scrubbed answers, each shared by at least three respondents) and counts Bucker computed. No answer, respondent, sentence or identifier is sent, and nothing is sent unless a person switched theme naming on for the project and the organization allows AI features. | `validated_fact`, `survey_text` | `anthropic`, `openai` | 1,200 | 1 | none | The default label: the top three distinguishing n-grams of the cluster, as computed by the clustering itself. |
| `candidate_replay` | Re-run ONE recorded inference step of a stored trace once, with an edited prompt template or another model, on the organization's own key, so a person can compare the new response with the recorded one. The call carries the customer's own prompt template and the step's stored input messages after the agent-tier scrub, inside a data-only frame (text the injection scanner flags is withheld before the frame is built). Nothing is sent unless the project chose full capture and a person turned model use on for it; no tool is executed, no second turn is run, and the response is stored as untrusted text. | `customer_authored_prompt`, `validated_fact`, `span_attribute_value` | `anthropic`, `openai` | 16,000 | 1 | none | The replay of that recording is reported as not run, with the reason; nothing is substituted and the recorded response is left as it was. |
| `manifest_draft` | Draft one REST source manifest (table paths, pagination, primary keys, auth shape) from a provider's public API documentation a person supplied or allowed, plus the key names and types (never values) of recorded sample responses. The model has no tools and its output is JSON a strict schema checks; nothing is sent unless the organization's AI switch is on. | `validated_fact`, `http_response_text`, `plan_echo` | `anthropic` | 20,000 | 1 | none | No draft is made and nothing is stored: the caller is told the model call was refused, and writes the manifest by hand. |
| `assistant_chat` | Answer one question from the signed-in dashboard assistant, on the organization's own model key. The call carries a fixed instruction, the question and at most twelve earlier messages of this conversation as the person's browser resent them (each at most 2,000 characters), at most four short docs excerpts from the published Bucker documentation, and the results of at most six read-only tool calls the person's own permissions allowed (project names, issue titles, culprits, exception values, group keys, counts), each result passed through the agent-tier scrub and the injection scanner first, with text the scanner flags withheld, and every untrusted value delimited as data. The model has no tool of its own: it may ask Bucker to run one of five read tools and, only when the instance's separate assistant write switch is also on, may PROPOSE one of two triage changes (resolve or snooze one issue). The model never runs a proposal: Bucker stores it as a pending-action row (the tool, its validated arguments, the person it is for and, while it waits on an approval, a sealed retry handle), shows it to the person, and runs it only when that same person confirms it, with their own permissions and an audit entry; an unconfirmed proposal expires after ten minutes, and the row is kept for 90 days as an audit aid. Nothing else the model writes is executed. Nothing is sent unless the instance's assistant switch, the organization's AI switch and its assistant opt-in are all on and the organization stored a key of its own; apart from those pending-action rows, nothing is stored beyond the live turn. | `validated_fact`, `customer_authored_prompt`, `issue_title`, `service_name`, `exception_value`, `breadcrumb_text`, `tag_key`, `frame_identifier`, `release_label` | `anthropic`, `openai` | 24,000 | 2 | none | The deterministic answer the dashboard already gives (the docs search and the plain-language issue search); the panel says the model was not used and why. Over the plan's fair-use ceiling it says the assistant is unavailable and that docs search still works; nothing is queued for later. |

Reserved, with no contract yet and therefore refused if called:

- `cluster_label`: Label a cluster of similar items. Not built.

"Sent verbatim" lists the classes the detectors do not scan, because their exact bytes are what the call
is for (the fix author's patch has to match your source exactly, so source code cannot be redacted).
<!-- egress-contracts:end -->

## The dashboard assistant (off by default)

The signed-in dashboard assistant is a chat panel that can read your projects and issues on your behalf.
It is **off**: an instance switch, your organization's AI switch and a separate opt-in by an **owner** of
the organization all have to be on, and the organization has to have stored **its own model key**.
**Bucker's key is never used for it**, and an organization that opted in to Bucker's key for other
features and has none of its own gets the deterministic answer.

- **What is sent** is listed under `assistant_chat` above: the question, up to twelve earlier messages
  your browser resent, up to four short excerpts of the published documentation, and the results of up
  to six read-only tool calls. A tool call runs with **your own** permissions, as a five-minute token
  limited to this organization and to read scopes; the model cannot choose scopes, cannot call
  anything outside five read tools. With the separate write switch on, it may also **propose** one of two
  triage changes (resolve or snooze an issue); a proposal is shown to you and runs only when you
  confirm it, under your own permissions and with an audit entry, and nothing else it writes is executed.
- **Do not paste secrets** into the panel. The credential and personal-data detectors run on everything
  before it is sent and refuse the whole call on a finding; a refused call falls back to the
  deterministic answer.
- **What is kept**: Bucker does not store a transcript. The live turn's working state (the question, the
  messages your browser resent and the fenced tool results) is held encrypted on one row until the turn
  settles and is then deleted, with a one-hour backstop; the answer is deleted when your browser has
  read it. The one exception is a **proposed change**: it is held as a pending-action row (the tool, its
  arguments and who it is for, plus a sealed retry handle while it waits on an approval), expires after
  ten minutes if you do not confirm it, and is kept for 90 days as an audit aid. The egress ledger keeps counts and a digest, as for every purpose above.
- **Spend** is your key's, and it counts against the plan's fair-use token ceiling. Past the ceiling the
  assistant says it is unavailable and that docs search still works; nothing is queued for later.
- Whether sending this text to a model provider needs a notice or a sign-off has not been decided by
  counsel; the register is a draft, and nothing here is a legal opinion.

## Which provider, and whose key

- **On Bucker's hosted service, Bucker's own model key is used only for fix authoring and for the
  root-cause analysis Bucker starts on its own**: the analysis an alert rule's "investigate" action
  starts, and the one automatic remediation runs when a project's automation policy stops at
  analysis. Root-cause analysis you or your agent request (from the dashboard or the API), the
  issue summary and the evaluation judge never use Bucker's key, so for an organization without its
  own key they use the deterministic provider and nothing is sent.
- **Two hosted providers are supported**: **Anthropic** and **OpenAI** (the Chat Completions
  endpoint).
- **Each organization can bring its own key**: Agents → Model key, or
  `PUT /orgs/:orgSlug/llm-credential` with a provider, a key and an optional model. The key is
  encrypted at rest, bound to its purpose and to your organization, is never returned by any
  route or written to an audit row (the audit row carries the provider, the model and the last
  four characters), and revoking it wipes the ciphertext. While one is stored, that organization's
  **root-cause analysis, issue summary and fix authoring** run on it, and the provider relationship
  for those calls is the customer's. The rubric **evaluation judge** never uses it; a model-judged
  judge uses only the organization's own key (above).
- **Without an org key, Bucker's key applies** to the features that use it (above). That provider
  relationship is Bucker's.
- **An org key that cannot be used never falls back to Bucker's key.** Analysis falls back
  to the deterministic wording and records why it degraded (`org-llm-key-unusable`); a remediation
  run fails with a named reason. A configured provider that cannot be used likewise leaves
  analysis on the deterministic wording, and for fix authoring there is no silent fallback: with no
  key, the run fails with a named reason rather than producing an empty patch.

## Retention and training

- **Bucker stores results, not a transcript.** What is kept is the analysis row (verdict, ranked
  hypotheses, the evidence it assembled, a clipped summary), the proposal, and its evidence bundle.
  Bucker keeps no copy of what it sent to a model. It does keep an **egress ledger** for 400 days: one
  row per hosted-model call with the purpose, provider and model, how many items of each data class the
  prompt carried, the tokens, the contract version, a SHA-256 of the prompt and the decision. A row has no
  column that could hold prompt text, so the ledger can show *that* a call carried a stack frame and a
  count, never *which* frame. Your agent reads it with `ai_egress_get`.
- **The provider's retention applies to what reaches it.** We have **not** negotiated a
  zero-data-retention agreement with any provider and do not claim one. See the
  [privacy notice](https://www.bucker.io/en/legal/privacy) and the [trust page](https://www.bucker.io/en/trust).
- **Training.** Bucker does not use your content to train or fine-tune a model, and has no
  cross-tenant model or memory. (Cross-tenant fix memory is not built.) Whether the provider trains
  on API traffic is governed by the provider's own commercial terms; Bucker cannot change those and
  does not speak for them. If this is a procurement requirement, ask us for the provider terms that
  apply to Bucker's key, or store your organization's own key (above), which puts those calls
  under your own provider contract.

## Every call is metered and budgeted

Each model call is metered: a token budget is reserved before the call and charged after it, and a spend entry records the tokens and cost with the agent
principal, the user it acted for and the incident, where there are any. There is no path to the provider that skips
it. Budgets and the kill switch are in [agent governance](agent-governance.md). The same step
applies the egress check described above: a hosted call is checked against its purpose's contract and
recorded in the ledger before it is made, and a call that is refused spends no budget.

## Turning it off

| To | Do this |
| --- | --- |
| Stop all AI features for an organization | Settings → General → AI features off (`aiEnabled=false`), also shown as *AI features enabled* under Agents. RCA, fix authoring and automatic remediation all refuse for that organization |
| Stop agent-initiated pull requests only | `agentPrCreationEnabled=false`, independent of the switch above |
| Send this organization's calls under its own provider contract | Agents → Model key: store an Anthropic or OpenAI key; remove it to go back |
| Keep your source out of prompts | Turn AI features off, or do not connect a repository |

Any organization administrator or owner can change the switch; the change is written to the audit log with the before and after value.

## What we have not built

So that nothing here reads as a promise: a zero-data-retention agreement, a per-field opt-out
inside fix authoring (the choice today is all of it or none of it), the organization's own key for
the rubric evaluation judge, and a contract with any provider on training. Each is a known gap,
not a claim.

### Page content from moment replay in session summaries

Session summaries do not include page content from moment replay. The `session_summary` contract is at
version 2, which describes a text outline of one moment as a possible future input, but nothing of the
kind is sent today. If that ever changes it will be a new, versioned contract, announced in advance, and
a value a person typed into a field will never be part of it.
