openai/codex · error

POST {url} succeeded but no task id found; content-type={ct}

Error message

POST {url} succeeded but no task id found; content-type={ct}; body={body}

What it means

Error "POST {url} succeeded but no task id found; content-type={ct}; body={body}" thrown in openai/codex.

Source

Thrown at codex-rs/backend-client/src/client.rs:521

        let req = self
            .request(Method::POST, &url)
            .headers(self.headers())
            .header(CONTENT_TYPE, HeaderValue::from_static("application/json"))
            .json(&request_body);
        let (body, ct) = self.exec_request(req, "POST", &url).await?;
        // Extract id from JSON: prefer `task.id`; fallback to top-level `id` when present.
        match serde_json::from_str::<serde_json::Value>(&body) {
            Ok(v) => {
                if let Some(id) = v
                    .get("task")
                    .and_then(|t| t.get("id"))
                    .and_then(|s| s.as_str())
                {
                    Ok(id.to_string())
                } else if let Some(id) = v.get("id").and_then(|s| s.as_str()) {
                    Ok(id.to_string())
                } else {
                    anyhow::bail!(
                        "POST {url} succeeded but no task id found; content-type={ct}; body={body}"
                    );
                }
            }
            Err(e) => anyhow::bail!("Decode error for {url}: {e}; content-type={ct}; body={body}"),
        }
    }

    // rate limit helpers
    fn rate_limit_snapshots_from_payload(
        payload: RateLimitStatusPayload,
    ) -> Vec<RateLimitSnapshot> {
        let plan_type = Some(Self::map_plan_type(payload.plan_type));
        let rate_limit_reached_type = payload
            .rate_limit_reached_type
            .flatten()
            .and_then(|details| Self::map_rate_limit_reached_type(details.kind));
        let mut snapshots = vec![Self::make_rate_limit_snapshot(

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/backend-client/src/client.rs:521 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/0d0f6632b54dffcd. Report an issue: GitHub.