Bug: Invalid prompt at compaction #6462

Closed
opened 2026-02-16 18:04:18 -05:00 by yindo · 5 comments
Owner

Originally created by @jerome-benoit on GitHub (Jan 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

At compaction with latest git on a regular basis:

AI_InvalidPromptError: Invalid prompt: The messages must be a ModelMessage[]. If you have passed a UIMessage[], you can use convertToModelMessages to convert them.

Plugins

No response

OpenCode version

git

Steps to reproduce

  1. Use GitHub Copilot provider (Claude Opus 4.5, but does not matter) with high reasoning
  2. Prompt until compaction is triggered
  3. Repeat until the error occurs

Screenshot and/or share link

No response

Operating System

GNU/Linux

Terminal

tmux

Originally created by @jerome-benoit on GitHub (Jan 16, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description At compaction with latest git on a regular basis: `AI_InvalidPromptError: Invalid prompt: The messages must be a ModelMessage[]. If you have passed a UIMessage[], you can use convertToModelMessages to convert them.` ### Plugins _No response_ ### OpenCode version git ### Steps to reproduce 1. Use GitHub Copilot provider (Claude Opus 4.5, but does not matter) with high reasoning 2. Prompt until compaction is triggered 3. Repeat until the error occurs ### Screenshot and/or share link _No response_ ### Operating System GNU/Linux ### Terminal tmux
yindo added the bug label 2026-02-16 18:04:18 -05:00
yindo closed this issue 2026-02-16 18:04:18 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6446: Empty message content causes Anthropic API errors during compaction (related error handling and message conversion at compaction)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #6446: Empty message content causes Anthropic API errors during compaction (related error handling and message conversion at compaction) Feel free to ignore if none of these address your specific case.
Author
Owner

@jerome-benoit commented on GitHub (Jan 16, 2026):

Cannot reproduce with update to latest git ...

@jerome-benoit commented on GitHub (Jan 16, 2026): Cannot reproduce with update to latest git ...
Author
Owner

@jerome-benoit commented on GitHub (Jan 16, 2026):

Just occurred again with latest git ...

@jerome-benoit commented on GitHub (Jan 16, 2026): Just occurred again with latest git ...
Author
Owner

@rekram1-node commented on GitHub (Jan 16, 2026):

Ah ur building off of dev sorry about that, hsould be fixed

@rekram1-node commented on GitHub (Jan 16, 2026): Ah ur building off of dev sorry about that, hsould be fixed
Author
Owner

@jerome-benoit commented on GitHub (Jan 16, 2026):

Ah ur building off of dev sorry about that, hsould be fixed

dev is meant to break and dev users meant to report breakage before release ;)

@jerome-benoit commented on GitHub (Jan 16, 2026): > Ah ur building off of dev sorry about that, hsould be fixed dev is meant to break and dev users meant to report breakage before release ;)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6462