Skip to content

fix(goal): allow goals to replace running responses - #13942

Merged
marius-kilocode merged 3 commits into
mainfrom
fix-goal-send-bad-request
Sep 9, 2026
Merged

marius-kilocode merged 3 commits into
mainfrom
fix-goal-send-bad-request

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Starting a Goal while an ordinary response is running returned a Bad Request because Goal admission rejected the busy session before the replacement path could cancel it.

Why This Change Was Made

Goal submission is an explicit replacement action from the composer. The runner now validates the request and attachments first, cancels the in-flight response, then performs the existing idle admission checks before starting the Goal. Archived and reverted sessions, pending blockers, and invalid requests remain rejected.

User Impact

Users can submit a Goal while the agent is working. The current response is interrupted and the validated Goal starts instead of showing a Bad Request error.

Evidence

  • Focused busy Goal regression: bun test test/kilocode/session/goal.test.ts -t ordinary
  • CLI typecheck: bun run typecheck
  • Full Goal suite previously passed: 76 tests
  • CLI Goal tests previously passed: 7 tests

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