{"record":{"id":"799004dc878ad5b7","repo":"Hmbown/CodeWhale","slug":"cloud-agents-are-not-available-for-this-account-yet-cloud","errorCode":null,"errorMessage":"Cloud agents are not available for this account yet; cloud dispatch fails closed (no sandbox, no push, no PR). | Cloud agents are included with your Codewhale membership. Sign in with `codewhale login` to enable `/dispatch`; cloud dispatch fails closed until then (no sandbox, no push, no PR).","messagePattern":"Cloud agents are not available for this account yet; cloud dispatch fails closed \\(no sandbox, no push, no PR\\)\\. \\| Cloud agents are included with your Codewhale membership\\. Sign in with `codewhale login` to enable `/dispatch`; cloud dispatch fails closed until then \\(no sandbox, no push, no PR\\)\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/cloud_dispatch.rs","lineNumber":1408,"sourceCode":"\n    /// A client scoped to one harness command: its total timeout is the\n    /// command's declared budget plus fixed slack. The declared turn budget\n    /// is an hour, so the 120s control-plane cap must NOT carry this call —\n    /// otherwise every dispatched turn longer than two minutes fails after\n    /// the spend has already started.\n    fn harness_client(command: &HarnessCommand) -> Result<reqwest::blocking::Client> {\n        Self::blocking_client_with_timeout(Self::harness_client_budget_secs(command))\n    }\n\n    /// The total-timeout budget for a harness-carrying client, in seconds.\n    /// Public to the crate so the runner's tests can pin it against the\n    /// declared `HARNESS_TIMEOUT_SECS`.\n    pub(crate) fn harness_client_budget_secs(command: &HarnessCommand) -> u64 {\n        u64::from(command.timeout_secs).saturating_add(Self::HARNESS_CLIENT_SLACK_SECS)\n    }\n\n    fn api_key() -> Result<String> {\n        read_api_key().ok_or_else(|| anyhow!(missing_credentials_message()))\n    }\n\n    /// Control-plane URL under the validated base.\n    fn control_plane_url(path: &str) -> Result<reqwest::Url> {\n        let base = validate_outbound_origin(&daytona_api_url())?;\n        join_api_path(base, path).context(\"failed to build the cloud agent request URL\")\n    }\n\n    /// Toolbox base for one sandbox: `{toolboxProxyUrl}/{sandboxId}`.\n    fn toolbox_base(receipt: &SandboxReceipt) -> Result<reqwest::Url> {\n        if !valid_sandbox_id(&receipt.sandbox_id) {\n            bail!(\"the sandbox id is not a usable path token\");\n        }\n        let fallback = format!(\"{}/toolbox\", DEFAULT_DAYTONA_API);\n        let raw = receipt.toolbox_url.as_deref().unwrap_or(&fallback);\n        let base = validate_outbound_origin(raw)?;\n        join_api_path(base, &receipt.sandbox_id).context(\"failed to build the sandbox toolbox URL\")\n    }","sourceCodeStart":1390,"sourceCodeEnd":1426,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/crates/tui/src/cloud_dispatch.rs#L1390-L1426","documentation":"Cloud dispatch refuses to run because Codewhale account credentials are missing: `api_key()` calls `read_api_key()` and, when absent, fails with `missing_credentials_message()`. That message states cloud agents are included with a Codewhale membership and that dispatch fails closed — no sandbox, no push, no PR — until the user signs in with `codewhale login`. The failure is deliberate: cloud dispatch must never run unauthenticated.","triggerScenarios":"Invoking `/dispatch` (or `execute_dispatch`/`confirm_job`) without a stored API key: never having run `codewhale login`, credentials deleted/expired from local storage, or running in an environment without the saved auth state.","commonSituations":"Fresh machine install before login; CI or container environments lacking the credential store; corrupted or cleared config directory; expired stored session removed by the credential reader.","solutions":["Run `codewhale login` to authenticate and store the API key","Verify the credential file exists in the Codewhale home (`CODEWHALE_HOME` / user home)","Set a valid API key if the credential reader supports environment fallback","Re-run `/dispatch` after authenticating"],"exampleFix":"# before\n$ codewhale  # then /dispatch -> fails closed\n# after\n$ codewhale login\n$ codewhale  # then /dispatch -> proceeds","handlingStrategy":"validation","validationCode":"# check credentials before dispatch\nif not codewhale_logged_in():\n    raise SystemExit(\"Run 'codewhale login' before /dispatch\")","typeGuard":"fn can_dispatch() -> bool { read_api_key().is_some() }","tryCatchPattern":"if let Err(e) = dispatch(job).await {\n    if e.to_string().contains(\"fails closed\") {\n        eprintln!(\"Not signed in. Run: codewhale login\");\n        return;\n    }\n    return Err(e);\n}","preventionTips":["Run `codewhale login` on every new machine/container","Check credential presence before starting dispatch workflows","Re-authenticate after credential rotation or expiry","Ensure CI/containers mount or provision the credential store"],"tags":["auth","cloud","credentials"],"backgroundTag":"missing-credentials","analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-22T11:17:16.035Z"}