Skip to content

Conversation append-back failures are hidden behind successful Responses results #837

Description

@leseb

Clawpatch finding

  • Severity: high
  • Category: data-loss
  • Confidence: high
  • Feature: feat_custom_apis_openai_core_protocol
  • Finding ID: fnd_sig-feat-custom-apis-openai-core_d07608fc36
  • Run ID: 20260831T083841-cf86ad
  • Reviewer model: gpt-5.6-sol via the local Codex provider at xhigh
  • Prior overlap: Re-reported from the immediately preceding run (fnd_sig-feat-custom-apis-openai-core_d12ff06d8b), where issue follow-up was not completed. Related to Responses associated with a conversation are never appended back to that conversation #410, but scoped to failures in the implemented append-back path rather than append-back being absent.

Evidence

  • apis/src/openai/conversations/filter.rs:472-481 (OpenaiConversationsFilter::on_response_body)
  • apis/src/openai/conversations/filter.rs:587-599 (persist_items)
  • apis/src/openai/conversations/filter.rs:602-613 (refresh_message_cache)

Description

When a non-streaming response associated with a conversation completes, failures inserting its input/output items are logged and discarded while the successful provider response continues to the client. Cache-refresh failures are independently swallowed. The client is told the conversation turn succeeded, but later conversation reads or continuations can omit that turn or observe stale messages, with no retry mechanism or error signal.

Reproduction

Arm append-back for a successful JSON response and use a store that returns StoreError from create_conversation_items or update_conversation_messages. on_response_body still returns Continue, preserving the successful response despite missing or stale conversation state.

Recommendation

Make append-back durable before exposing success: propagate the failure while the buffered response is still mutable, or enqueue the mutation in a durable retry/outbox mechanism. Cache refresh must either be atomic with item insertion or reliably retried.


Reported from a Clawpatch review of apis/src at commit 543259683b9ff9a3f42772703a6d9ca134948475.

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions