Skip to content

fix: remove content rstrip in normalize_response to preserve TITO prefix match#1081

Merged
mikasenghaas merged 1 commit intomainfrom
fix/normalize-response-rstrip
Mar 31, 2026
Merged

fix: remove content rstrip in normalize_response to preserve TITO prefix match#1081
mikasenghaas merged 1 commit intomainfrom
fix/normalize-response-rstrip

Conversation

@mikasenghaas
Copy link
Copy Markdown
Member

@mikasenghaas mikasenghaas commented Mar 31, 2026

Summary

  • Removes the content.rstrip() call in normalize_response that was stripping trailing whitespace from message content, which broke TITO (think-in-turn-out) prefix matching downstream.

🤖 Generated with Claude Code


Note

Low Risk
Small, localized change to response normalization that only affects how assistant content is stored/compared; main risk is slightly different cache/prefix-hit behavior due to preserved trailing whitespace.

Overview
Stops stripping trailing whitespace from assistant message.content in OpenCodeEnv.normalize_response, so the stored trajectory matches the agent’s original output for TITO prefix cache hits.

Tool-call normalization (lowercasing tool names and compacting JSON arguments) remains unchanged; only the content trimming behavior is removed.

Written by Cursor Bugbot for commit 5197334. This will update automatically on new commits. Configure here.

…fix match

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mikasenghaas mikasenghaas requested review from rasdani and samsja March 31, 2026 11:09
@mikasenghaas mikasenghaas merged commit 5d75d97 into main Mar 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants