> ## Documentation Index
> Fetch the complete documentation index at: https://ade-ac1c6011-ade-im-seeing-error-messag-eright-58df792e.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Guardrails & Security

> Secure your automations with tool palette restrictions, budget caps, and preflight controls. Covers agent-session, worker run, and built-in-task execution.

## Tool Palette Security

Every automation can restrict its ADE tool surface with a **tool palette**. This is the primary safety mechanism for unattended execution.

| Palette       | Capabilities                                         | When to Use                                  |
| ------------- | ---------------------------------------------------- | -------------------------------------------- |
| `read-only`   | Read files, read git history, read context packs     | Review, summarization, analysis              |
| `write-files` | `read-only` + write and create files                 | Code/document edits, lightweight maintenance |
| `full-git`    | `write-files` + all git operations                   | Commit/branch automation, PR prep            |
| `full-ade`    | All ADE tools including worker run/Linear/gh actions | Complex orchestration automation             |
| Custom        | Explicitly listed tools                              | Precise scope for a specific workflow        |

<Warning>
  Avoid granting `full-ade` permissions unless the workflow needs end-to-end orchestration.
  Start with the narrowest palette that can complete the task.
</Warning>

***

## Context Modes

Control how much execution state an automation carries between runs.

<Tabs>
  <Tab title="stateless">
    Each execution starts fresh with no history carried forward. This is the default and safest for infrequent, security-sensitive automations.

    ```yaml theme={null}
    context: stateless
    ```
  </Tab>

  <Tab title="stateful">
    Automation state is retained per rule for this execution family. Useful for watchlists or recurring hygiene tasks.

    ```yaml theme={null}
    context: stateful
    ```
  </Tab>
</Tabs>

***

## Built-in budget controls

Automation budgets are enforced from shared settings in **Settings > Usage** and apply across:

* Background automations
* Workers
* Chat and terminal automation helpers
* Linear and GitHub maintenance jobs

Budget controls include:

* **Per-rule budget cap** for token or USD spend
* **Global budget cap** for project-wide usage policy
* **Daily / weekly policy** tied to the user-selected spending model

When caps are reached, ADE stops new queueing and marks runs as budget-gated. You can resume by increasing the shared budget or re-running the rule manually when limits reset.

***

## Verification controls

Automations can run at different confidence levels:

* **Automatic**: proceed when clear output is produced.
* **Manual verify**: pause before side-effect actions such as committing, opening PRs, changing branch state, or sending external updates.

Verification settings should be configured per automation and are visible in the rule's run options.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Automation is not firing" icon="circle-question">
    1. Confirm the automation is **enabled** in the Automations list.
    2. Verify the trigger definition and trigger filters.
    3. Check the **Run History** in Automations for errors in trigger evaluation.
    4. Confirm required connectors are healthy in Settings (webhook secret, GitHub auth, etc.).
    5. Review the trigger event shape if using `webhook` or `github.webhook`.
  </Accordion>

  <Accordion title="Budget exceeded" icon="circle-dollar-to-slot">
    The rule hit a shared budget limit and stopped execution.

    1. Open **Automations → History** and find the blocked run.
    2. Review how much budget was consumed.
    3. Adjust shared budget policy under **Settings > Usage**, or
       move this automation to a smaller-scope execution surface.
    4. Re-run if the work is still needed.
  </Accordion>

  <Accordion title="Guardrail blocked a file write" icon="lock">
    The execution attempted a file change outside its configured tool scope.
    This is working as designed.

    * Expand the tool palette to include the specific operation.
    * Or switch to a workflow that writes in a narrower directory.
  </Accordion>

  <Accordion title="Linear action failed" icon="list">
    For action-based triggers or outputs that call Linear:

    1. Ensure the project connector is healthy in Settings.
    2. Confirm the workflow only requests actions within allowed scopes.
    3. Run with a tighter action palette before broadening to full Linear access.
  </Accordion>
</AccordionGroup>
