Skip to content

LangGraph adapter rejects typed outputs on tools with requires_confirmation #149

@spichen

Description

@spichen

What happens

When a tool has requires_confirmation=True and typed outputs, _ensure_checkpointer_and_valid_tool_config throws:

Invalid output schema for tool 'tool-name' requiring tool confirmation: json schema should be                                                                                                                                                
left unspecified when using tool confirmation, was [Property(...)].                                                                                                                                                                     
Please use outputs=[Property(title="bash", json_schema={})]                                                                                                                                                                             

Why the check isn't needed

_confirm_then returns the original typed output on approval and a plain string on rejection. Both are valid LangChain tool message content -LangGraph doesn't actually enforce output schemas at runtime. They're hints for the LLM, not validation contracts.

There's a TODO in the code that hints at this:

  # TODO: refine to only raise output property does not support string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions