{"record":{"id":"2ef43f4675c42113","repo":"warpdotdev/warp","slug":"timed-out-refreshing-workspace-metadata","errorCode":null,"errorMessage":"Timed out refreshing workspace metadata","messagePattern":"Timed out refreshing workspace metadata","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/model.rs","lineNumber":41,"sourceCode":"            Ok(())\n        }\n    }\n}\n\n/// Singleton model for running async work as part of model CLI commands.\nstruct ModelCommandRunner;\n\nimpl ModelCommandRunner {\n    fn list(&self, global_options: GlobalOptions, ctx: &mut ModelContext<Self>) {\n        let output_format = global_options.output_format;\n\n        // Ensure workspace metadata is refreshed so LLM preferences are up-to-date.\n        let refresh_future = super::common::refresh_workspace_metadata(ctx);\n\n        ctx.spawn(refresh_future, move |_, refresh_result, ctx| {\n            if refresh_result.is_err() {\n                super::report_fatal_error(\n                    anyhow::anyhow!(\"Timed out refreshing workspace metadata\"),\n                    ctx,\n                );\n                return;\n            }\n\n            let llm_prefs = LLMPreferences::as_ref(ctx);\n            let mut ids = BTreeSet::new();\n            for info in llm_prefs.get_base_llm_choices_for_agent_mode(ctx) {\n                ids.insert(info.id.to_string());\n            }\n\n            let items = ids\n                .into_iter()\n                .map(|id| ModelListItem { id })\n                .collect::<Vec<_>>();\n\n            output::print_list(items, output_format);\n","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/model.rs#L23-L59","documentation":"`warp model list` first refreshes workspace metadata so LLM preferences are current, wrapping the refresh in WORKSPACE_METADATA_REFRESH_TIMEOUT. If the refresh future resolves to Err (timeout), the command reports this fatal error before listing any models.","triggerScenarios":"`warp model list` when the workspace-metadata request to warp-server exceeds its timeout: slow or blocked network, server-side latency, or a large workspace syncing for the first time after login.","commonSituations":"Flaky connections (VPN, tethering); warp-server under load; first-run sync of a big workspace; egress-filtered CI networks.","solutions":["Retry the command — transient slowness is the usual cause","Check network/proxy access to the warp-server URL","Confirm auth and server health with a lighter command such as `warp whoami`","If persistent, report with timing details; the timeout is a code constant, not user-configurable"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"for i in 1 2 3; do\n  out=$(warp model list 2>&1) && { echo \"$out\"; exit 0; }\n  case \"$out\" in *'Timed out refreshing workspace metadata'*) wait $((i * 5));; *) echo \"$out\" >&2; exit 1;; esac\ndone\necho 'workspace metadata refresh kept timing out' >&2; exit 1","preventionTips":["Warm the network path (VPN/proxy) before first CLI calls of a session","Retry once before investigating — most occurrences are transient","Correlate persistent timeouts with server status before bug reports"],"tags":["network","timeout","model-list","workspace"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}