Skip to content

fix(core): omit standalone signed-empty reasoning - #47357

Closed
Rocklis wants to merge 1 commit into
anomalyco:v2from
Rocklis:empty-reasoning
Closed

Rocklis wants to merge 1 commit into
anomalyco:v2from
Rocklis:empty-reasoning

Conversation

@Rocklis

@Rocklis Rocklis commented Sep 4, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #46881

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

V2 keeps a reasoning message in model history even when it contains only a provider signature. These empty messages accumulate and get sent again on later requests.

Drop the standalone empty message, but keep its signature when the same message also contains text or a tool call. This changes history replay only. #45839 handles the separate legacy replay path.

How did you verify your code works?

  • bun test test/session-runner-message.test.ts in packages/core: 24 passed. Covers standalone signatures and signatures paired with text or a tool call.
  • bun typecheck in packages/core: passed.
  • The broader core suite has unrelated failures that also reproduce on clean v2; it is not fully green locally.

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

Related PR:

However, this is a different fix targeting a different scope (opencode vs core) and the current PR (47357) appears to be the primary fix for issue #46881 about handling standalone signed-empty reasoning turns.

No other direct duplicates found.

@Rocklis
Rocklis changed the base branch from dev to v2 September 5, 2026 04:39
@Rocklis

Rocklis commented Sep 5, 2026

Copy link
Copy Markdown
Author

@rekram1-node This is now based on v2; the earlier dev base was my mistake. The diff is limited to history replay and its regression test.

Standalone signature-only messages are omitted, but signatures alongside text or a tool call are preserved. The 24 replay tests and the package typecheck pass. Could you review this for #46881 and approve the fork CI when you have a chance?

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core: standalone signed-empty reasoning turns are replayed into later requests

1 participant