openai/codex · error · anyhow::Error

duplicate tool call start for {tool_call_id}

Error message

duplicate tool call start for {tool_call_id}

What it means

Error "duplicate tool call start for {tool_call_id}" thrown in openai/codex.

Source

Thrown at codex-rs/rollout-trace/src/reducer/tool.rs:58

    pub(super) invocation_payload: Option<RawPayloadRef>,
}

impl TraceReducer {
    /// Starts a tool call and links it to model-visible items or runtime parents when available.
    ///
    /// Some tools also create richer domain objects, such as terminal operations, from
    /// the same invocation payload. The generic ToolCall remains the common index.
    pub(super) fn start_tool_call(
        &mut self,
        seq: RawEventSeq,
        wall_time_unix_ms: i64,
        thread_id: Option<String>,
        codex_turn_id: Option<String>,
        started: ToolCallStarted,
    ) -> Result<()> {
        let tool_call_id = started.tool_call_id.clone();
        if self.rollout.tool_calls.contains_key(&tool_call_id) {
            bail!("duplicate tool call start for {tool_call_id}");
        }
        self.ensure_unique_model_visible_tool_call(
            started.model_visible_call_id.as_deref(),
            &tool_call_id,
        )?;

        let thread_id = self.tool_thread_id(thread_id, codex_turn_id.as_deref())?;
        self.validate_tool_turn(&thread_id, codex_turn_id.as_deref())?;

        let model_visible_call_id = started.model_visible_call_id.clone();
        let requester = self.reduce_tool_call_requester(&thread_id, started.requester.clone())?;
        let model_visible_call_item_ids = model_visible_call_id
            .as_deref()
            .map(|call_id| {
                self.model_visible_tool_item_ids(
                    &thread_id,
                    call_id,
                    &[

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/rollout-trace/src/reducer/tool.rs:58 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/b6613aea2a92fbc0. Report an issue: GitHub.