# How to Configure the Tool Approval Workflow in DeepSeek-Reasonix: Ask, Manual, and Auto Modes

> Learn how to configure DeepSeek-Reasonix tool approval workflows in ask manual and auto modes for controlled or automatic external tool execution. Master your AI agent's interactions.

- Repository: [YHH/DeepSeek-Reasonix](https://github.com/esengine/DeepSeek-Reasonix)
- Tags: how-to-guide
- Published: 2026-08-06

---

**DeepSeek-Reasonix provides three tool approval modes—**ask**, **auto**, and **yolo**—that control whether external tool executions require user confirmation, run automatically, or bypass all restrictions for the current session.**

The **tool approval workflow** in `esengine/DeepSeek-Reasonix` governs how the application handles external API calls and tool executions. According to the source code in [`src/lib/types.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/types.ts), the workflow is defined by the `ToolApprovalMode` type and respected by the front-end UI, internal state machine, and desktop backend bridge. Understanding these configuration layers allows you to customize security and automation levels for individual sessions, specific bots, or globally across the application.

## Understanding the Three Tool Approval Modes

The repository defines the `ToolApprovalMode` union type in [`src/lib/types.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/types.ts) with three distinct values that determine execution behavior:

### Ask Mode (Manual)

When set to `"ask"`, every tool execution triggers a user prompt for approval before the request is dispatched. This is the safest mode for reviewing potentially destructive or expensive operations. The UI typically labels this as **Ask** or **Manual**, and it serves as the default fallback when no other mode is specified.

### Auto Mode

Setting the mode to `"auto"` allows tools to execute without user intervention. The front-end automatically approves requests and streams results directly. This mode is ideal for trusted workflows where you want seamless integration with external APIs.

### YOLO Mode (Manual Override)

The third mode, `"yolo"`, functions as a session-level override that forces auto-approval regardless of other settings. While often labeled **YOLO** in the UI (sometimes referred to as *Manual* because it bypasses normal flow), this mode effectively enables a "yes-to-everything" behavior for the current session only. It is implemented as a toggleable state that preserves the previous mode for restoration later.

## Where Tool Approval Modes Are Stored

DeepSeek-Reasonix maintains tool approval configuration at three hierarchical levels, all defined in [`src/lib/types.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/types.ts):

- **Per-session**: Each tab stores its current mode in `TabMeta.toolApprovalMode`, allowing different conversations to have different approval behaviors.
- **Per-bot**: Individual bot connections can override defaults via `BotConnection.toolApprovalMode`, enabling specific AI agents to run with distinct approval requirements.
- **Global default**: The `settings.defaultToolApprovalMode` field persists the user’s preferred default in the settings file, applied to all newly created sessions.

## Normalizing and Validating Mode Values

Legacy configurations and malformed inputs are handled by the `normalizeToolApprovalMode` function in [`src/lib/types.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/types.ts) (lines 8-13). This utility ensures backward compatibility by checking deprecated flags and providing sensible fallbacks:

```typescript
export function normalizeToolApprovalMode(
  mode?: string,
  legacyMode?: Mode,
  legacyAutoApproveTools?: boolean,
  fallbackMode?: ToolApprovalMode,
): ToolApprovalMode {
  const normalized = typeof mode === "string" ? mode.trim().toLowerCase() : "";
  if (normalized === "auto" || normalized === "yolo" || normalized === "ask")
    return normalized as ToolApprovalMode;
  if (legacyAutoApproveTools || (legacyMode && modeHasAutoApproveTools(legacyMode)))
    return "yolo";
  if (fallbackMode === "auto" && normalized === "") return "auto";
  return "ask";
}

```

This function converts string inputs to valid `ToolApprovalMode` values and checks the legacy `autoApproveTools` flag to migrate old settings to the new `"yolo"` mode automatically.

## Configuring Modes Programmatically via the Bridge

The **Bridge** class in [`src/lib/bridge.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/bridge.ts) (lines 4166-4205) exposes methods for the front-end to communicate configuration changes to the desktop backend:

### Setting Global Defaults

To change the default mode for all new sessions:

```typescript
await bridge.SetDefaultToolApprovalMode("ask"); // or "auto"

```

Note that `SetDefaultToolApprovalMode` only accepts `"ask"` or `"auto"`; it does not accept `"yolo"` since YOLO is intended as a temporary session override rather than a permanent default.

### Per-Tab and Per-Bot Overrides

Target specific sessions or bot connections with dedicated methods:

```typescript
// Set mode for current active tab
await bridge.SetToolApprovalMode("auto");

// Set mode for a specific tab by ID
await bridge.SetToolApprovalModeForTab(tabId, "ask");

// Override settings for a specific bot connection
await bridge.SetBotConnectionToolApprovalMode(botConnId, "auto");

```

### Toggling YOLO Mode

The `toggleYoloToolApprovalMode` utility in [`src/lib/toolApprovalMode.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/toolApprovalMode.ts) manages the YOLO state transition while preserving the previous mode for restoration:

```typescript
import { toggleYoloToolApprovalMode } from "./toolApprovalMode";

const currentMode = "ask"; // Retrieved from TabMeta
const { mode, restore } = toggleYoloToolApprovalMode(currentMode);

// Enable YOLO
await bridge.SetToolApprovalModeForTab(tabId, mode);

// Later, restore previous mode
if (restore) {
  await bridge.SetToolApprovalModeForTab(tabId, restore);
}

```

When current mode is `"yolo"`, the function returns the previously saved restore value; otherwise, it returns `"yolo"` and stores the current mode as the restore value.

## Practical Configuration Examples

Force confirmation for all tool executions globally:

```typescript
await bridge.SetDefaultToolApprovalMode("ask");

```

Enable automatic approval for a specific high-trust bot while keeping others in ask mode:

```typescript
await bridge.SetBotConnectionToolApprovalMode(trustedBotId, "auto");

```

Temporarily disable all confirmation prompts for a debugging session, then revert:

```typescript
import { toggleYoloToolApprovalMode } from "./toolApprovalMode";

const tabId = "session-123";
const current = "ask"; // From tab metadata

// Enter YOLO mode
const yoloState = toggleYoloToolApprovalMode(current);
await bridge.SetToolApprovalModeForTab(tabId, yoloState.mode);

// ... perform automated operations ...

// Restore previous mode
if (yoloState.restore) {
  await bridge.SetToolApprovalModeForTab(tabId, yoloState.restore);
}

```

## Summary

- **Three modes control the workflow**: `"ask"` requires confirmation, `"auto"` executes silently, and `"yolo"` forces auto-approval for the current session only.
- **Configuration hierarchy**: Settings apply globally by default, but can be overridden per-tab via `TabMeta` or per-bot via `BotConnection`.
- **Key source files**: [`src/lib/types.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/types.ts) defines the types and normalization logic, [`src/lib/bridge.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/bridge.ts) provides the API surface (lines 4166-4205), and [`src/lib/toolApprovalMode.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/toolApprovalMode.ts) handles YOLO toggling.
- **Normalization function**: `normalizeToolApprovalMode` ensures backward compatibility with legacy settings.
- **Runtime changes**: Use `SetToolApprovalModeForTab` for immediate session changes and `SetDefaultToolApprovalMode` for persistent defaults.

## Frequently Asked Questions

### What is the difference between "yolo" and "auto" modes?

While both `"yolo"` and `"auto"` allow tools to execute without prompting the user, `"yolo"` is designed as a temporary session override that can be toggled on and off, preserving the previous mode for restoration. The `"auto"` mode is a persistent setting suitable for long-term configuration, whereas `"yolo"` acts as a manual bypass for the current session only.

### Can I set "yolo" as the global default for all new sessions?

No, the `SetDefaultToolApprovalMode` method in [`src/lib/bridge.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/bridge.ts) explicitly restricts global defaults to `"ask"` or `"auto"` only. The `"yolo"` mode is intentionally excluded from global defaults because it is meant to be a temporary, per-session override rather than a permanent security policy.

### How does DeepSeek-Reasonix handle invalid or legacy tool approval mode values?

The `normalizeToolApprovalMode` function in [`src/lib/types.ts`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/src/lib/types.ts) sanitizes inputs by trimming and lowercasing strings, checking against valid values, and falling back to `"ask"` if the input is invalid. It also checks legacy boolean flags like `legacyAutoApproveTools` to migrate older configurations to the appropriate modern mode.

### Where is the tool approval state stored when I change it for a specific tab?

Per-tab tool approval states are stored in the `TabMeta.toolApprovalMode` property, which is part of each tab's metadata structure. This allows different browser tabs or conversation sessions to maintain independent approval settings without affecting each other or the global default.