Skip to content

[upstream #16961] 16961: Persist the reviewer's approval decision on resumed tool calls #321

Open

Description

@berry-13

Codex finding on LibreChat-AI#16961: LibreChat-AI#16961 (comment)

LibreChat-AI#16961 maps a tool call's approval.decision (and reason) to the AI SDK states approval-responded and output-denied, but no producer writes that field yet. The client stamps approval on the live cache in client/src/utils/approval.ts without the decision, the final SSE merge in client/src/hooks/SSE/steps/content.ts rebuilds the tool call without approval, and the resume path persists only the tool output. So a real resumed call reaches the mapper with no decision and maps exactly as it did before LibreChat-AI#16961 (approval-requested while unresolved, output-available/output-error once ended); the new states are reachable only through hand-built stored calls.

Fix: record the submitted decision and reason on the resumed tool call (stamp it client-side when the decision is submitted, keep approval through the final SSE merge, and persist it on the server-side resume so a reload carries it), then cover reject and respond through a resume end to end.

Activity

  1. added
    enhancementNew feature or request
    area: clientreviewctl followups state
    readyreviewctl followups state
    and removed on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: clientreviewctl followups statearea: packagesreviewctl followups stateenhancementNew feature or requestreadyreviewctl followups state

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions