Skip to content

fix(sse): replace synthesized kiro "Continue" turn with neutral filler (#5231) - #5303

Merged
diegosouzapw merged 1 commit into
release/v3.8.40from
fix/5231-kiro-continue-filler
Jun 29, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.40from
fix/5231-kiro-continue-filler

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Closes #5231

Problem

open-sse/translator/request/openai-to-kiro.ts (convertMessages) requires currentMessage to be a user turn. When an OpenAI→Kiro request ends on an assistant/tool turn (no trailing user turn to promote), the translator synthesizes one with literal content "Continue". Kiro/CodeWhisperer can read the word "Continue" as a real user instruction and take unintended agent action.

Fix

Replace the synthesized filler "Continue" → "..." (neutral). Single-string behavioral change at the synthesized trailing-turn site (openai-to-kiro.ts:415).

Scope (intentionally narrow)

  • A trailing tool-result turn is still promoted as-is — it already collapses to a real user turn (carrying its toolResults), so it never hits the synthesized-filler branch. Only the assistant-text-ending case changes.
  • No other behavior touched.

TDD / Validation (Hard Rule #18)

  • Updated the existing assertion in tests/unit/translator-openai-to-kiro.test.ts (Continue → neutral filler) — failed on the unfixed code, passes after the fix.
  • New dedicated guards tests/unit/kiro-continue-filler-5231.test.ts:
    • assistant-text-ending request never leaks the literal "Continue" filler;
    • a trailing tool-result turn is promoted as-is (carries its tool results), proving the change is surgically scoped.
  • node --test (kiro suites): 31/31 pass.
  • typecheck:core clean, eslint 0 errors, check:file-size clean (source kept net-neutral under the frozen cap; new tests in a fresh file), check:test-discovery OK.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

#5231)

When an OpenAI->Kiro request ends on an assistant/tool turn, convertMessages
synthesizes the protocol-required trailing user turn. The literal word
"Continue" could be read by Kiro/CodeWhisperer as a real user instruction and
trigger unintended agent action. Use a neutral filler ("...") instead.

A trailing tool-result turn is still promoted as-is (it already collapses to a
real user turn); only the assistant-text-ending case is affected.

Regression guards: tests/unit/kiro-continue-filler-5231.test.ts.
@diegosouzapw
diegosouzapw force-pushed the fix/5231-kiro-continue-filler branch from 7281027 to 25ec2f1 Compare June 29, 2026 06:48
@diegosouzapw
diegosouzapw merged commit c0f1ee2 into release/v3.8.40 Jun 29, 2026
6 of 7 checks passed
@diegosouzapw
diegosouzapw deleted the fix/5231-kiro-continue-filler branch June 29, 2026 07:24
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
diegosouzapw#5231) (diegosouzapw#5303)

Integrated into release/v3.8.40 (CHANGELOG re-resolved against post-diegosouzapw#5294/diegosouzapw#5304 tip; kiro code identical to the green commit)
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.

1 participant