Skip to content

Conversation

@tonybase
Copy link
Member

@tonybase tonybase commented Dec 1, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 1, 2025 08:59
@tonybase tonybase changed the title fix(runner): Runner session message refactor(runner): ensure message author is set and improve history handling Dec 1, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the session message management by moving message persistence responsibilities from individual agents to the Runner, and simplifies the action/interruption handling system.

  • Consolidates message persistence logic in the Runner rather than distributed across agents
  • Removes the ResumeHistory configuration option and related functionality
  • Moves the ActionHandoffToAgent constant to the internal/handoff package and removes the now-unused ActionInterrupted constant and Interrupted() helper function
  • Replaces middleware-specific error (ErrConfirmDenied) with a common ErrInterrupted error

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
runner.go Removes ResumeHistory field, adds nil check for messages in buildInvocation, updates Run to persist completed messages, refactors RunStream to use invocation-based history filtering, and renames historySets to historyByInvocation with corrected filtering logic
agent.go Removes calls to appendMessageToSession from the handle method, replacing them with simple Author field assignment, and removes early termination checks for interrupted actions
action.go Deletes the entire file containing ActionInterrupted, ActionHandoffToAgent constants and Interrupted() helper function
internal/handoff/handoff.go Adds ActionHandoffToAgent constant (moved from action.go) and updates usage to reference the local constant
flow/routing.go Updates import to reference handoff.ActionHandoffToAgent instead of blades.ActionHandoffToAgent
middleware/confirm.go Removes ErrConfirmDenied error definition and updates to use blades.ErrInterrupted instead
errors.go Adds new ErrInterrupted error for indicating interrupted execution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tonybase tonybase merged commit 3298b5d into main Dec 1, 2025
1 check passed
@tonybase tonybase deleted the runner-session-message branch December 1, 2025 10:03
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