Browse Cortex Code Starter Prompts
Need inspiration? Ask Cortex Code: “What can you do?”
Debug a pipeline failure
DAG pipeline failures can stem from connection timeouts, SQL errors, or other issues buried in task logs. Diagnosing the root cause requires sifting through run state, task instances, and logs across multiple tasks
Why did my_pipeline fail last night?Explore a DAG
New to a DAG or investigating an issue? Instead of jumping between tabs in the Airflow UI, run a single command to get the full picture — task graph, schedule, recent run history, and current state.
cortex airflow dags explore --dag-id daily_orders_etlAuthor a new DAG
Writing a new DAG means wiring up operators, setting dependencies, configuring connections, and writing boilerplate before you get to the actual logic. Describe what you need and Cortex Code builds it using your existing patterns and connections.
Create a DAG that loads CSV files from S3 into my raw schema every 6 hours using the Snowflake providerTrigger and wait
Trigger a DAG run and block until it completes — no switching to the UI, no polling. Useful for CI/CD pipelines, testing, or any workflow where you need the result before moving on.
cortex airflow runs trigger-wait --dag-id nightly_aggregationMigrate to Airflow 3
Upgrading from Airflow 2 to 3 means combing through every DAG for deprecated imports, context keys, and metadata access patterns. Cortex Code automates the migration, applying fixes across your project.
Migrate my DAGs from Airflow 2 to Airflow 3Check instance health
Catching environment issues early means checking import errors, DAG warnings, scheduler status, and run statistics, which usually requires clicking through multiple UI pages. Get it all in a single command.
cortex airflow healthWhat customers are saying about Cortex Code

“Cortex Code helps us reduce friction in everyday data and AI development while maintaining the controls and oversight we need in a regulated environment. Our teams can build faster with the context they need to be successful.”
Vibhor Gupta

“Cortex Code gives our teams a simple, in-platform way to move quickly from exploring ideas to delivering AI-driven workflows directly on Snowflake.”
Srinivas Madabushi

“Cortex Code helps our engineers improve the performance of our business intelligence tools, meaningfully reducing the time it takes to improve quality and speed of Natural Language Query responses.”
Tony Leopold
Frequently Asked Questions
If you're already a Snowflake customer, there's nothing new to sign up for — no separate contract, no subscription. Cortex Code CLI is billed on token consumption through your existing Snowflake account, the same way Cortex Agents and Snowflake Intelligence are billed. Rates are in the Service Consumption Table.
Any compute or storage the agent triggers (warehouses, tables, etc.) is billed separately at your normal Snowflake rates.
New to Snowflake? Sign up at signup.snowflake.com/cortex-code for a free trial with bundled usage. After 30 days it converts to a monthly paid subscription. You may cancel at any time (and manage other aspects of your subscription) through your Account Dashboard. Any compute or storage the agent triggers (warehouses, tables, etc.) is billed separately at your normal Snowflake rates.
Run cortex in your terminal and it walks you through picking (or creating) a connection and logging in — browser-based auth, SSO, whatever you already use. It reads the same connection files as the Snowflake CLI, so there's nothing extra to configure.
Cortex Code runs inside Snowflake's existing RBAC and governance — it can only touch what your roles allow. The CLI also sandboxes OS access, prompts before risky operations, and supports org-managed policies that lock down tools, accounts, and overrides. Inputs and outputs fall under Snowflake's AI and Pass-Through Terms. More detail in the Security best practices doc.
macOS, Linux (including WSL), and Windows. Run it in any terminal — standalone or inside VS Code, Cursor, etc. It works with your local repos, git, dbt, and other CLI tools while staying Snowflake-aware.