aaif-goose/goose · error

Responses tool calls contain duplicate ID after Unicode tag

Error message

Responses tool calls contain duplicate ID after Unicode tag sanitization

What it means

Error "Responses tool calls contain duplicate ID after Unicode tag sanitization" thrown in aaif-goose/goose.

Source

Thrown at crates/goose-provider-types/src/formats/openai_responses.rs:795

        value => Ok(value),
    }
}

fn parse_tool_arguments(arguments: &str) -> anyhow::Result<Value> {
    if arguments.is_empty() {
        Ok(json!({}))
    } else {
        match serde_json::from_str(arguments) {
            Ok(value) => sanitize_tool_arguments(value),
            Err(_) => Ok(json!({})),
        }
    }
}

fn sanitize_tool_request_id(id: &str, seen_ids: &mut HashSet<String>) -> anyhow::Result<String> {
    let id = strip_unicode_tags(id);
    if !seen_ids.insert(id.clone()) {
        return Err(anyhow!(
            "Responses tool calls contain duplicate ID after Unicode tag sanitization"
        ));
    }
    Ok(id)
}

pub fn responses_api_to_message(response: &ResponsesApiResponse) -> anyhow::Result<Message> {
    let mut content = Vec::new();
    let mut tool_request_ids = HashSet::new();

    for item in &response.output {
        match item {
            ResponseOutputItem::Reasoning { summary, .. } => {
                content.extend(reasoning_from_summary(summary));
            }
            ResponseOutputItem::Message {
                content: msg_content,
                ..

View on GitHub (pinned to 3810898a74)

When it happens

Trigger: Thrown at crates/goose-provider-types/src/formats/openai_responses.rs:795 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of aaif-goose/goose@3810898a74 (2026-08-16). Data as JSON: /api/errors/76a7a97842aa8714. Report an issue: GitHub.