{"record":{"id":"b87c81454967c9a1","repo":"dbt-labs/dbt-core","slug":"the-start-paused-option-requires-the-current-th","errorCode":null,"errorMessage":"The `start_paused` option requires the `current_thread` runtime flavor. Use `#[{macro_name}(flavor = \"current_thread\")]`","messagePattern":"The `start_paused` option requires the `current_thread` runtime flavor\\. Use `#\\[(.+?)\\(flavor = \"current_thread\"\\)\\]`","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/dbt-runtime-macros/src/entry.rs","lineNumber":237,"sourceCode":"                worker_threads.map(|(val, _span)| val)\n            }\n            (F::Threaded, _) => {\n                let msg = if self.flavor.is_none() {\n                    \"The default runtime flavor is `multi_thread`, but the `rt-multi-thread` feature is disabled.\"\n                } else {\n                    \"The runtime flavor `multi_thread` requires the `rt-multi-thread` feature.\"\n                };\n                return Err(syn::Error::new(Span::call_site(), msg));\n            }\n        };\n\n        let start_paused = match (flavor, self.start_paused) {\n            (F::Threaded, Some((_, start_paused_span))) => {\n                let msg = format!(\n                    \"The `start_paused` option requires the `current_thread` runtime flavor. Use `#[{}(flavor = \\\"current_thread\\\")]`\",\n                    self.macro_name(),\n                );\n                return Err(syn::Error::new(start_paused_span, msg));\n            }\n            (F::CurrentThread | F::Local, Some((start_paused, _))) => Some(start_paused),\n            (_, None) => None,\n        };\n\n        let unhandled_panic = match (flavor, self.unhandled_panic) {\n            (F::Threaded, Some((_, unhandled_panic_span))) => {\n                let msg = format!(\n                    \"The `unhandled_panic` option requires the `current_thread` runtime flavor. Use `#[{}(flavor = \\\"current_thread\\\")]`\",\n                    self.macro_name(),\n                );\n                return Err(syn::Error::new(unhandled_panic_span, msg));\n            }\n            (F::CurrentThread | F::Local, Some((unhandled_panic, _))) => Some(unhandled_panic),\n            (_, None) => None,\n        };\n\n        Ok(FinalConfig {","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-runtime-macros/src/entry.rs#L219-L255","documentation":"This compile-time error comes from the dbt_runtime macro's config builder in crates/dbt-runtime-macros/src/entry.rs. It fires during `FinalConfig::build` (invoked from `build_config`) when the attribute is given `start_paused = true` while the resolved runtime flavor is `Threaded` (multi_thread). `start_paused` is a tokio testing/pausing feature that only exists on the current_thread (or Local) runtime, so the macro rejects the combination at macro-expansion time with a syn::Error pointing at the `start_paused` argument's span.","triggerScenarios":"Writing `#[dbt_runtime::main(flavor = \"multi_thread\", start_paused = true)]` (or `#[dbt_runtime::test(...)]` with the same combo), or relying on the default flavor being multi_thread while passing only `start_paused = true`. Raised in `build` when flavor == RuntimeFlavor::Threaded and self.start_paused is Some.","commonSituations":"Copying a test that uses `#[tokio::test(start_paused = true)]` and adding a multi_thread flavor for heavier tests; enabling start_paused to use tokio time auto-advance while forgetting that pause requires a single-threaded runtime; migrating tokio attribute args to dbt_runtime without knowing flavor constraints.","solutions":["Change the flavor attribute to `flavor = \"current_thread\"`: e.g. `#[dbt_runtime::main(flavor = \"current_thread\", start_paused = true)]`.","Remove the `start_paused = true` option if you actually need the multi_thread runtime.","If you need both worker threads and paused time, restructure: run the paused logic inside a `tokio::time::pause()`-friendly current_thread context spawned from the threaded entry, or split tests into current_thread tests."],"exampleFix":"// before\n#[dbt_runtime::test(flavor = \"multi_thread\", start_paused = true)]\nasync fn my_test() {\n    tokio::time::sleep(Duration::from_secs(3600)).await;\n}\n\n// after\n#[dbt_runtime::test(flavor = \"current_thread\", start_paused = true)]\nasync fn my_test() {\n    tokio::time::sleep(Duration::from_secs(3600)).await;\n}","handlingStrategy":"validation","validationCode":"// Compile-time check before using start_paused: it is only valid on current_thread/local flavors.\nconst FLAVOR: &str = \"current_thread\";\nconst START_PAUSED: bool = true;\nconst _: () = assert!(FLAVOR != \"multi_thread\" || !START_PAUSED, \"start_paused requires flavor = \\\"current_thread\\\"\");\n#[dbt_runtime::test(flavor = \"current_thread\", start_paused = true)]\nasync fn t() {}","typeGuard":"fn is_start_paused_compatible(flavor: &str) -> bool {\n    matches!(flavor, \"current_thread\" | \"local\")\n}","tryCatchPattern":null,"preventionTips":["Remember the pairing rule: start_paused <-> current_thread, worker_threads <-> multi_thread.","Never add start_paused to an entry that uses worker_threads or flavor = \"multi_thread\".","Keep paused-time tests on plain #[tokio::test]-style single-threaded entries."],"tags":["rust","macros","tokio","compile-time","runtime-flavor"],"backgroundTag":"conflicting-config-options","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}