# Genie Code runs as a job task, with approval always on

> The Genie Code task runs an autonomous agent from a natural-language prompt inside a Lakeflow job, with auto-approval that cannot be turned off.

Feature: Genie Code. Release stage: Beta, as of 8 October 2026 (https://docs.databricks.com/aws/en/jobs/tasks/genie-code). Documentation: https://docs.databricks.com/aws/en/jobs/tasks/genie-code
By Sergey Ustimenko, 8 October 2026. Databricks Field Guide, TechFabric. Canonical: https://databricks.techfabric.com/features/genie-code/

Genie Code is the AI coding and data assistant for developers and technical practitioners in the Databricks workspace, and it can run as a task type inside a Lakeflow job. The Genie Code task takes a natural-language prompt, launches a new Genie Code chat with it, and produces a response; the agent reads data, calls tools and acts on the prompt without asking for input or approval along the way. This feature is in Beta. Databricks suggests it for work like summarising overnight job results and emailing a report, flagging anomalies in incoming data, investigating a Jira ticket and proposing a fix, or generating a weekly compliance audit.

Interactively, Genie Code runs in notebooks, the SQL editor, the Lakeflow Pipelines Editor, AI/BI dashboards and MLflow, and it is governed by your Unity Catalog permissions, so it reaches only data and operations you are entitled to.

## How it works

You add the task from the Tasks tab in the Jobs UI: click **Add task**, name it, select **Genie Code** in the Type drop-down, then write the prompt. The prompt is the task. For example:

```text
Check the most recent results in the batch_errors table. If error_count is above 5, create a summary of the errors by type and severity, then post a summary to #data-ops Slack channel.
```

To reuse one prompt across runs, reference job parameters with `{{name}}`, where `name` is the parameter's key:

```text
Summarize yesterday's sales for {{region}} and flag anomalies.
```

Job parameters are pushed down to the task automatically, so you define them on the job through **Edit parameters** in the Job details sidebar and configure nothing on the task itself. At run time Databricks replaces each placeholder with its value, and a placeholder with no matching parameter is left unchanged. A parameter's value can be static or a dynamic value reference, such as an upstream task's value.

The task inherits your Genie Code settings and any custom Model Context Protocol connections you have configured, so the agent has the same tools and data sources as your interactive sessions. It can also read the outputs of upstream tasks in the same job; describe the upstream data in the prompt and the agent retrieves it during the run.

## A worked example

Each run produces a continuable conversation thread. The Run output shows a link to the conversation, the task prompt and the latest response, so reviewing what the agent did means opening the thread, where you can ask follow-up questions or carry on the work interactively.

## Limits and availability

Genie Code is in Beta as a Lakeflow Jobs task, documented as of 8 October 2026 and announced as a task type on 27 August 2026. Your workspace must have access to Genie Code's agentic capabilities, and prompts must comply with Genie Code usage policies.

Auto-approval is always on for job tasks and can't be disabled, so you never confirm tool calls during a run. An AI classifier checks each action against the prompt and blocks risky operations outside the intended scope, but Databricks is explicit that auto-approve is a productivity feature and not a security boundary. Because the task runs unattended, be deliberate about which production data, sensitive workspaces and shared resources the prompt can reach.

Since 8 July 2026 at 00:00 UTC, Genie Code is billed pay-as-you-go with a per-user free monthly allowance, and account administrators can manage budgets and cost controls. Genie One and Genie Agents usage by users is free through 31 January 2027, with service principals excluded from that promotion and billed. Genie Code is a Designated Service that uses Geos to manage data residency when processing customer content.

## When to use it

Reach for this when the work genuinely needs judgement between steps, investigating why something failed, triaging anomalies, writing up a result, and when a deterministic task would mean encoding rules you cannot yet write down. For anything whose output a downstream table depends on, keep the deterministic task and let Genie Code do the reporting around it. The chapter on [Genie](/guide/genie/#what-genie-is-now) covers where the Genie family splits between Genie One, Genie Agents and Genie Code.

The unavoidable constraint is the one Databricks names: an unattended agent with auto-approval you cannot switch off. Scope the prompt and the workspace it runs in accordingly.

## Related in the Field Guide

- [ai_decide is the cheap model you put in front of the expensive one](/notes/ai-decide-is-the-cheap-model-you-put-in/)
- [Databricks retired Gemini 2.5 without a grace period](/notes/databricks-retired-gemini-2-5-without-a-grace/)

## Questions people ask

### What is Genie Code in Databricks?

Genie Code is the AI coding and data assistant for developers and technical practitioners in the Databricks workspace. It generates and runs code, builds pipelines and AI/BI dashboards, debugs errors, and works with Unity Catalog tables, columns and lineage, running in notebooks, the SQL editor, the Lakeflow Pipelines Editor, AI/BI dashboards and MLflow.

### Is the Genie Code job task generally available?

The Genie Code task for Lakeflow Jobs is in Beta. Databricks announced it as a job task on 27 August 2026.

### Can you turn off auto-approval for a Genie Code job task?

No. Job tasks always run with auto-approval on, and it cannot be disabled or set to review actions before they execute. Databricks states that auto-approve is a productivity feature, not a security boundary.

### How much does Genie Code cost?

Since 8 July 2026 at 00:00 UTC, Genie Code is billed under a pay-as-you-go pricing model that includes a per-user free monthly allowance, and account administrators can manage budgets and cost controls.
