Skip to content

fix(server): recover assistant text when completion extends a prefix - #44

Closed
macodev00 wants to merge 1 commit into
mainfrom
cursor/codex-completion-prefix-874f
Closed

macodev00 wants to merge 1 commit into
mainfrom
cursor/codex-completion-prefix-874f

Conversation

@macodev00

Copy link
Copy Markdown
Owner

What Changed

When an assistant item.completed snapshot strictly extends text already accumulated (projected plus still buffered), ingestion persists only the missing suffix.

Equal, empty, and divergent snapshots keep the streamed text.

Why

Codex custom-provider replies were truncated even though item.completed carried the full message. Finalization preferred a nonempty buffer, and the completion call site withheld the snapshot whenever the projected message was already nonempty. A short prefix such as Hi! I was saved and marked complete.

Fixes pingdotgg#13436

UI Changes

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web Open in Cursor 

item.completed detail is a full snapshot. A nonempty buffered or already
projected prefix was kept and the rest of the reply was dropped. When detail
strictly extends that accumulated text, persist only the missing suffix.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 25, 2026
@macodev00 macodev00 closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Codex custom-provider replies truncated despite full text in item/completed

1 participant