---
title: Bits Remediation
description: >-
  Learn how Bits provides actionable remediation next steps for root cause
  investigations.
breadcrumbs: Docs > Bits AI > Bits Remediation
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Bits Remediation

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com

{% callout %}
##### Join the Preview!

Bits Remediation includes capabilities in Preview. Click **Request Access** to join the Preview program.

[Request Access](https://www.datadoghq.com/product-preview/bits-remediation/)
{% /callout %}

{% /callout %}

## Automate code fixes{% #automate-code-fixes %}

After Bits helps you identify a root cause from an investigation, it can also help you take action as quickly as possible.

Bits Investigation integrates with [Bits Code](https://docs.datadoghq.com/bits_ai/bits_code.md) to generate code fixes. Bits connects to your source code provider to create, update, and iterate on production-ready pull requests, based on existing issues detected by Datadog.

By default, Bits automatically generates code fixes for investigations with code-related root causes. To manually generate code fixes instead, disable automatic code fix generation in [Settings](https://app.datadoghq.com/bits-ai/settings/source-code-integration).

To start using code fixes:

1. [Set up Bits Code](https://docs.datadoghq.com/bits_ai/bits_code/setup.md). After Bits determines a code-related root cause, Bits generates a suggested code fix in Next Steps by default.
1. If automatic code fixes are disabled, manually generate a code fix from Next Steps.
1. Chat with Bits within the code session to update the suggested code fix.
1. Create a pull request for review and merge when ready.

With code fixes enabled, you can close the loop and resolve issues directly from a Bits Investigation.

{% image
   source="https://docs.dd-static.net/images/bits_ai/bits_remediation/suggested_code_fix.377722a551e52a33bbd34bc86d953ecc.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/bits_ai/bits_remediation/suggested_code_fix.377722a551e52a33bbd34bc86d953ecc.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Bits Investigation hypothesis tree showing a root cause conclusion with a suggested code fix and other next steps" /%}

## Run triage actions{% #run-triage-actions %}

From chat, you can trigger triage actions without leaving the investigation workflow.

Supported actions include:

- Sending Slack and Microsoft Teams messages
- Creating incidents in Datadog and PagerDuty
- Paging engineers using Datadog On-Call
- Creating work items in Datadog Work Management
- Opening Jira tickets

Bits can pull relevant context from the investigation and your connected integrations to prefill messages, incident descriptions, and ticket metadata. This reduces manual effort, helps ensure consistency, and accelerates response time.

## Take action on your infrastructure{% #take-action-on-your-infrastructure %}

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com

{% callout %}
##### Join the Preview!

One-click actions are in Preview.Request Access
{% /callout %}

{% /callout %}

For infrastructure-related issues, Bits can recommend a remediation action, such as scaling a deployment, restarting a pod, or patching a resource.

- **Manual recommendations**: Copy the suggested command (for example, a `kubectl patch` command) and run it in your own CLI.
- **One-click actions (Preview)**: Click **Run** to let Bits execute the suggested remediation action directly from the investigation context.

{% image
   source="https://docs.dd-static.net/images/bits_ai/bits_remediation/one_click_action.ad263b92f32bbbece8d3a0d7ea888580.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/bits_ai/bits_remediation/one_click_action.ad263b92f32bbbece8d3a0d7ea888580.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="A suggested remediation action with instructions to restart a deployment and a Run button" /%}

Kubernetes actions are supported in Preview. See the [Action Catalog](https://docs.datadoghq.com/actions/actions_catalog.md) for the full list of supported actions and how to enable them in Datadog.

To run one-click Kubernetes actions, your organization needs:

- A [Private Action Runner](https://docs.datadoghq.com/actions/private_actions.md) with network access to your Kubernetes cluster, paired with a [Connection](https://docs.datadoghq.com/actions/connections.md) to the Kubernetes integration.
- A user role with permission to run actions and resolve the Kubernetes connection.

## Govern how Bits takes remediation action{% #govern-how-bits-takes-remediation-action %}

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com

{% callout %}
##### Join the Preview!

Bits Guardrails are in Preview.Request Access
{% /callout %}

{% /callout %}

[Bits Guardrails](https://app.datadoghq.com/bits-ai/settings/remediation-guardrails) let admins define which remediation actions Bits can take, where those actions apply, and who needs to approve them.

Guardrails require the `Guardrails Read` and `Guardrails Write` permissions, which can be enabled in [Organizational Settings > Roles](https://app.datadoghq.com/organization-settings/roles).

To create a guardrail:

1. **Choose the actions to target**: Select one or more available actions for an integration (for example, Kubernetes) for the guardrail to target.
1. **Define guardrail scope**: Specify the environment, service, and resource tags the guardrail applies to.
1. **Set the enforcement level**: For the selected actions and scope, decide when Bits can take action.
   - **Ask**: Requires user approval before Bits executes actions. Choose which teams, roles, or individuals can approve.
   - **Deny**: Bits can recommend an action but cannot take it.

## Validate that issues are resolved{% #validate-that-issues-are-resolved %}

Bits can verify whether a remediation action was applied successfully, and whether the original issue was resolved. Click **Verify Resolution** to validate the status of remediation action and issue.
