Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 21, 2025

Summary

This PR implements automatic checkpoints after every message exchange, as requested in issue #5995.

Changes

  • Modified presentAssistantMessage.ts to save checkpoints after every assistant message, not just when files are modified
  • Added checkpoint saving in Task.ts after user messages to preserve any manual edits made between messages
  • Removed the conditional logic that only saved checkpoints when files were detected as modified

Benefits

  • User's manual changes between messages are always preserved
  • Provides better recovery points for the conversation history
  • Ensures no work is lost if something goes wrong between messages

Testing

  • All existing tests pass (2938 tests passing)
  • The checkpoint functionality continues to work as before, just more frequently

Fixes #5995


Important

Save checkpoints after every message exchange in presentAssistantMessage.ts and Task.ts, ensuring manual edits are preserved and removing conditional logic based on file modifications.

  • Behavior:
    • Save checkpoints after every message in presentAssistantMessage.ts and Task.ts, ensuring manual edits are preserved.
    • Removed conditional logic for checkpoint saving based on file modifications in presentAssistantMessage.ts.
  • Testing:
    • All existing tests pass (2938 tests passing).
    • Checkpoint functionality remains unchanged, but occurs more frequently.

This description was created by Ellipsis for a6888c0. You can customize this summary. It will automatically update as commits are pushed.

- Save checkpoints after every assistant message, not just when files are modified
- Save checkpoints after user messages to preserve manual edits
- Ensures user's manual changes between messages are always preserved
- Addresses issue #5995 requesting automatic checkpoints after every message
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 21, 2025 05:02
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Jul 21, 2025
TelemetryService.instance.captureConversationMessage(this.taskId, "user")

// Save checkpoint after user message to preserve any manual edits
await checkpointSave(this)
Copy link
Contributor

Choose a reason for hiding this comment

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

A new checkpoint is saved after processing a user message. Please ensure that this call respects the 'enableCheckpoints' flag and consider wrapping 'await checkpointSave(this)' in a try/catch block to log errors rather than interrupting the task flow.

@roomote roomote bot mentioned this pull request Jul 21, 2025
4 tasks
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 21, 2025
@daniel-lxs
Copy link
Member

This should be handled differently, instead of creating a new checkpoint after each message we should simply show the same checkpoint button on all subsequent messages from the point the checkpoint was created.

That way the change only needs to be made in the UI.

@daniel-lxs daniel-lxs closed this Jul 22, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 22, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 22, 2025
@daniel-lxs daniel-lxs deleted the feature/checkpoint-every-message branch July 22, 2025 22:04
@daniel-lxs daniel-lxs restored the feature/checkpoint-every-message branch July 22, 2025 22:06
@omagoduck
Copy link

This should be handled differently, instead of creating a new checkpoint after each message we should simply show the same checkpoint button on all subsequent messages from the point the checkpoint was created.

That way the change only needs to be made in the UI.

Can we have a manual checkpoint option? @daniel-lxs

@mrubens
Copy link
Collaborator

mrubens commented Jul 27, 2025

This should be handled differently, instead of creating a new checkpoint after each message we should simply show the same checkpoint button on all subsequent messages from the point the checkpoint was created.

That way the change only needs to be made in the UI.

@roomote-agent can you make this change?

@roomote
Copy link
Contributor Author

roomote bot commented Jul 27, 2025

Hi @mrubens! I understand the request - instead of creating a new checkpoint after each message, we should show the same checkpoint button on all subsequent messages from the point the checkpoint was created. This would be a UI-only change. Let me investigate the current implementation and make the necessary changes.

@roomote
Copy link
Contributor Author

roomote bot commented Jul 27, 2025

Hi @mrubens! I've implemented the requested change in PR #6273.

Instead of creating new checkpoints after each message, the UI now shows the same checkpoint button on all subsequent messages from the point the checkpoint was created. This is a UI-only change as you suggested.

Please take a look and let me know if this meets your requirements!

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

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add checkpoint after every message.

6 participants