Hmbown/CodeWhale · error

Dynamic tool call ' ' has an indeterminate terminal…

Error message

Dynamic tool call '{call_id}' has an indeterminate terminal receipt; inspect Runtime storage before retrying

What it means

deliver_dynamic_tool_result hit an indeterminate claim state: the call was neither cleanly claimable nor absent, so delivery is refused and the operator is directed to Runtime storage because a blind retry could double-settle the call.

Solutions

  1. Inspect Runtime storage (turn items, task state) to determine whether the call actually settled before retrying.
  2. Retry only after confirming the previous deliver attempt did not commit a terminal receipt.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/tui/src/runtime_threads.rs:5667 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/ce3b0d0825bbc86a. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/runtime_threads.rs:5667

        }
    }

    pub async fn deliver_dynamic_tool_result(
        &self,
        thread_id: &str,
        turn_id: &str,
        call_id: &str,
        result: DynamicToolCallResult,
    ) -> Result<bool> {
        let admission = self.config_admission.read().await;
        self.ensure_accepting_execution()?;
        let claim = match self.claim_pending_dynamic_tool(thread_id, turn_id, call_id) {
            PendingDynamicToolClaim::Claimed(claim) => claim,
            PendingDynamicToolClaim::Settling(_) | PendingDynamicToolClaim::Missing => {
                return Ok(false);
            }
            PendingDynamicToolClaim::Indeterminate => {
                bail!(
                    "Dynamic tool call '{call_id}' has an indeterminate terminal receipt; inspect Runtime storage before retrying"
                );
            }
        };
        let ack =
            self.spawn_dynamic_tool_settlement(claim, DynamicToolTerminalOutcome::Resolved(result));
        drop(admission);
        Ok(Self::await_dynamic_tool_settlement(ack)
            .await?
            .result_accepted)
    }

    pub async fn submit_user_input(
        &self,
        thread_id: &str,
        input_id: &str,
        response: crate::tools::user_input::UserInputResponse,
    ) -> Result<bool> {

View on GitHub (pinned to 73e0f67d83)