Skip to content

Improve schedule execution visibility for recipes that failed#5346

Closed
amed-xyz wants to merge 4 commits intomainfrom
amed/failed-scheduler-message
Closed

Improve schedule execution visibility for recipes that failed#5346
amed-xyz wants to merge 4 commits intomainfrom
amed/failed-scheduler-message

Conversation

@amed-xyz
Copy link
Collaborator

@amed-xyz amed-xyz commented Oct 23, 2025

Summary

Problem

When a recipe has no prompt field, the scheduler:

  1. Creates a session in the database
  2. Skips agent execution (logs warning)
  3. Updates session with schedule_id
  4. Returns "success" with empty session
  5. Sessions with 0 messages don't appear in UI
  6. Users have no visibility that their schedule failed

Solution

Create visible failed sessions with error messages that show up in the UI, so users can see what went wrong.

Note

This is primarily for backwards compatibility. The root cause issue is that we allow schedules to be created off recipes with empty prompts, but that'll be addressed in a follow up PR.

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

Related Issues

Relates to #5045

Screenshots/Demos (for UX changes)

Before:
Screenshot 2025-10-23 at 4 29 03 PM

After:
Screenshot 2025-10-23 at 4 29 35 PM

@amed-xyz amed-xyz self-assigned this Oct 23, 2025
@iandouglas
Copy link
Contributor

Question on an adjacent workflow: if a user turns a session into a recipe, or asks goose to make a recipe, does a prompt get added? It might seem odd for a user to ask goose to make them a recipe, then try to schedule it, and then see a message that it didn't run because there was no prompt. In the GitHub issue thread I think we had talked about having goose inject a prompt like "go follow the user instructions" if no prompt was present.

#5045 (comment)

}
schedule_sessions.sort_by(|a, b| b.0.cmp(&a.0));
// Sort by created_at timestamp, newest first
schedule_sessions.sort_by(|a, b| b.1.created_at.cmp(&a.1.created_at));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Newer sessions were at the bottom of the list, again causing a confusing UX

@amed-xyz
Copy link
Collaborator Author

amed-xyz commented Oct 24, 2025

Question on an adjacent workflow: if a user turns a session into a recipe, or asks goose to make a recipe, does a prompt get added? It might seem odd for a user to ask goose to make them a recipe, then try to schedule it, and then see a message that it didn't run because there was no prompt. In the GitHub issue thread I think we had talked about having goose inject a prompt like "go follow the user instructions" if no prompt was present.

#5045 (comment)

@iandouglas good point. Next thing I was planning to do was to explicitly validate recipe prompt presence for schedules and ask the user for it, but adding "go follow the user instructions" sounds even simpler as long as the instructions provide enough guidance

@amed-xyz
Copy link
Collaborator Author

@iandouglas any thoughts on #5359 instead?

@iandouglas
Copy link
Contributor

@iandouglas any thoughts on #5359 instead?

left a comment over there, yeah that sounds perfect.

@amed-xyz
Copy link
Collaborator Author

Closing in favour of #5359

@amed-xyz amed-xyz closed this Oct 24, 2025
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