Hmbown/CodeWhale · error

User-input request ' ' has an indeterminate terminal…

Error message

User-input request '{input_id}' has an indeterminate terminal receipt; inspect Runtime storage before retrying

What it means

User-input counterpart of the dynamic-tool guard: the input claim was in an indeterminate settling state, so the response is refused pending a storage inspection — answering blindly could satisfy a request that was already answered.

Solutions

  1. Inspect Runtime storage to determine whether the response was already recorded before retrying.
  2. Retry submit_user_input once storage shows no terminal receipt for the input id.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/tui/src/runtime_threads.rs:5701 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/2cccba615cc61490. Report an issue: GitHub.

Appendix: source

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

        input_id: &str,
        response: crate::tools::user_input::UserInputResponse,
    ) -> Result<bool> {
        let admission = self.config_admission.read().await;
        self.ensure_accepting_execution()?;
        let engine = {
            let active = self.active.lock().await;
            let Some(state) = active.engines.get(thread_id) else {
                bail!("thread '{thread_id}' not found");
            };
            state.engine.clone()
        };
        let request = match self.claim_pending_user_input(thread_id, input_id) {
            PendingUserInputClaim::Claimed(request) => request,
            PendingUserInputClaim::Missing | PendingUserInputClaim::Settling => {
                return Ok(false);
            }
            PendingUserInputClaim::Indeterminate => {
                bail!(
                    "User-input request '{input_id}' has an indeterminate terminal receipt; inspect Runtime storage before retrying"
                );
            }
        };

        // This child task deliberately outlives the HTTP future. Once a
        // request is claimed, client disconnect/cancellation cannot strand it
        // between durable acceptance and engine delivery.
        let manager = self.clone();
        let thread_id = thread_id.to_string();
        let (ack_tx, ack_rx) = oneshot::channel();
        let worker = tokio::spawn(async move {
            let result = manager
                .settle_claimed_user_input(
                    &thread_id,
                    Some(engine),
                    request,
                    UserInputTerminalOutcome::Answered(response),

View on GitHub (pinned to 73e0f67d83)