# What leaves the machine during a Droid turn

See what a signed-in Droid CLI or SDK session sends to Factory, your model, and your own services, and how to control each flow.

Turning off Factory telemetry does **not** keep a prompt or file out of a model request or out of cloud session history. To exclude a new session from cloud sync, give it the `local-only` tag **at creation**. Set `telemetry.enabled` to `false` in managed settings to turn off Factory logs, operational traces, and metrics. Even with both controls, a signed-in turn still contacts Factory for identity, policy, feature flags, billing, and model provider and tool discovery, and sends a record of each MCP tool call; see [Identity, policy, and tools](#identity-policy-and-tools).

This page covers a connected `droid exec` run in CLI **1.21.0** and a Node `createSession()` turn in `@factory/droid-sdk` **0.11.0**. There is no single privacy level to set. If your requirement is **no public internet access**, start with the [airgapped network contract](/enterprise/airgapped-deployment#network-contract), not the two controls above.

## Prompts, files, and session history

Reading a file is a local operation. What happens to its **contents** is a different question: in a test turn that read one file, its text appeared in the next model request **and** in the cloud session transcript.

| Data and destination | Why it leaves | What controls it |
| --- | --- | --- |
| **Model input** → Factory's model API for a Factory-routed model, or the provider or gateway you select for a [custom model](/model-independence/byok). | To produce an answer, Droid sends the prompt, conversation context, tool definitions, and tool results. Those results can include file contents. An SDK session can also send the first message in a separate model request to generate a title. | Model selection changes the destination. Neither `local-only` nor turning off telemetry suppresses inference. |
| **Session transcript** → Factory's session API, `/api/apps/cloud-sync/sessions/batch`. | To make the session available in the cloud, Droid syncs messages, tool inputs and results, the title, working directory, settings, and token totals. Selecting your own model does not turn off sync. | `cloudSessionSync: false` stops content sync **if organization policy permits**. A user setting of `false` did not stop transcripts under an organization policy of `true`. |
| **Session registration** → the same session API. | With content sync off, Droid can still register the session ID, host ID, tags, machine connection type, and timestamps. If an administrator enables Store Session Titles (`allowSessionTitleInMetadata`), registration also sends the session title. | Leave Store Session Titles off to exclude titles, or create the session with `local-only` to skip registration and transcript sync. |
| **Custom-model usage** → Factory's billing API, `/api/llm/custom/usage`. | With a signed-in custom model, Droid checked the limit with a `GET`, then reported usage with a `POST`. The report contained input, output, cache and thinking token counts, model name, gateway URL, reasoning effort, and session, message, and event IDs. It did not contain the prompt or file text. | Neither the telemetry setting nor `local-only` stops this billing report. Do not put secrets in a gateway URL. |

The hosted routes above can use your organization's assigned backend: `prem.factory.ai` in the US or `prem.eu.factory.ai` in the EU. For example, the Factory-routed model in the test used `/api/llm/a/v1/messages`; the custom model received `/v1/chat/completions` at its configured gateway instead. These are destinations as seen from the machine, not a statement about downstream retention. Consult the <a href="https://trust.factory.com">Trust Center</a> for Factory's terms and review your provider's terms separately.

## Identity, policy, and tools

The following requests are separate from session sync and telemetry. API routes in this table use `api.factory.ai` (EU: `api.eu.factory.ai`).

| Data and destination | Purpose | What controls it |
| --- | --- | --- |
| **Identity and policy** → `/api/cli/whoami`, `/api/organization/managed-settings`. | Authenticated requests check the caller's identity and retrieve organization policy. They carry a credential in a header, not prompts or files in the body. | Both requests remained with telemetry off and the session tagged `local-only`. |
| **Feature flags and limits** → `/api/feature-flags`, `/api/billing/limits`. | Droid retrieves feature configuration and checks billing limits. The requests carried client and version headers and no body. | Both lookups remained with both controls applied. |
| **Provider and tool discovery** → `/api/integrations/model-providers`, `/api/connectors/tools/list`. | Droid looks up connected model providers and the connector tool catalog. The provider lookup had no body; the catalog request sent an `authenticatedOnly` filter, not tool arguments. | Both can run before you use a connector, including in a tagged session with telemetry off. |
| **Remote MCP** → the configured server; **invocation record** → `/api/mcp/tools/invocations`. | A server can receive discovery and authentication requests before any tool call (for example, `mcp.linear.app` for a configured Linear server). Calling a tool sends its arguments to that server. Factory separately received the server and tool names, session and message IDs, and outcome. | For a [user-configured server](/harness/mcp), set its `disabled` field to `true` to stop contact. When the server was enabled, the invocation record was sent even with Factory telemetry off and `local-only` set. |
| **Plugin marketplace** → the marketplace's Git host, through the machine's Git routing. | An organization-configured marketplace can trigger a Git fetch before the first tool call. Git uses the machine's Git configuration: it can contact an HTTPS proxy as well as the marketplace host, and can try SSH on port 22. | Review the [marketplace configuration](/enterprise/internal-plugin-marketplaces) and Git routing separately from Factory telemetry. |

## Telemetry and diagnostics

| Data and destination | Purpose | What controls it |
| --- | --- | --- |
| **Factory logs and operational traces** → `telemetry.factory.ai`, `/api/ingest` and `/api/otlp/traces/ingest`. | Logs record events, diagnostic messages, errors with their stack traces, version and platform. Operational spans describe startup, model and tool timing; the tool spans included tool name and input/result sizes. These are different from the message-content spans below. | Set `telemetry.enabled: false` in managed settings, or in user settings if the organization leaves the choice open. |
| **Factory metrics** → `otel-collector-123358924663.us-central1.run.app`, `/v1/metrics`. | Product and usage measurements include session and tool counts, execution times, and file-read counts. Usage metrics can carry organization, user and session IDs, user email, model, and OS. | The same Factory telemetry setting. Disabling it did not disable billing or session sync. |
| **Your metrics and optional message-content spans** → your OpenTelemetry collector (`/v1/metrics`, `/v1/traces`). | With `OTEL_TELEMETRY_ENDPOINT` set, the collector received usage metrics. With `OTEL_LOG_MESSAGE_CONTENT=true`, it also received the prompt, assistant response, tool arguments and file text. | Leave content logging off to collect metrics without message text. Under `OTEL_TELEMETRY_GRANULARITY=aggregate` the default export format sent metrics without user ID or email, and no message spans. A **user-level** Factory telemetry opt-out does not stop your collector. If the organization has not set `telemetry.enabled`, `OTEL_CUSTOMER_ENABLED=false` stops export to your collector and stops Factory activity metrics; it does not turn off Factory logs or operational traces. A managed `telemetry.enabled` value overrides the machine switch. See [telemetry privacy controls](/enterprise/telemetry/privacy). |
| **Errors and crashes** → `telemetry.factory.ai`, `/api/ingest`, as Factory logs. | Droid CLI 1.21.0 contains a Sentry client for `o4508485941854208.ingest.us.sentry.io` but never starts it. When `droid daemon` failed fatally on a port already in use, the log upload carried the error message and stack trace, and Droid made no connection to Sentry. | The same Factory telemetry setting. With `telemetry.enabled: false`, the same failure sent nothing to `telemetry.factory.ai`. |

## Set and check the controls

Set `telemetry.enabled: false` in [managed settings](/enterprise/hierarchical-settings-and-org-control) to stop Factory product logs, operational traces, and metrics, and export to your own collector. For a user whose organization does not set it, merge the same object into `~/.factory/settings.json` **before** starting the CLI or SDK process. A managed `true` overrides a user's `false`.

```json
{
  "telemetry": {
    "enabled": false
  }
}
```

For a new CLI session, add `--tag local-only` to `droid exec`. In Node, pass the tag to `createSession`:

```typescript
import { createSession } from '@factory/droid-sdk/node';

const session = await createSession({ tags: [{ name: 'local-only' }] });
try {
  for await (const event of session.stream('Reply with PONG.')) {
    if (event.type === 'result') console.log(event.subtype);
  }
} finally {
  await session.close();
}
```

**Verify with a synthetic prompt and a disposable file, not customer data.** Compare an untagged session with a newly tagged one using the same model and policy. Inspect the *outgoing* model request, the session batch, and your collector separately. Inspect the batch body: registration and transcript sync use the same route, so a request to that route alone does not prove messages were sent. With the tag, the model still received the file text but the session batch disappeared. With only Factory telemetry off, the logs, operational traces, and Factory metrics disappeared but the session batch still contained file text. Check at the receiver as well as your HTTPS proxy: a proxy log alone need not show the OpenTelemetry exporter.

<RelatedLinks>
  <RelatedLink href="/enterprise/network-and-deployment#outbound-network-allowlist" title="Outbound network allowlist">
    Plan firewall access for the rest of your deployment.
  </RelatedLink>
  <RelatedLink href="/enterprise/telemetry/data-reference" title="Telemetry data reference">
    Inspect metric names and span attributes.
  </RelatedLink>
</RelatedLinks>
