Skip to content

Conversation

@Mr-Neutr0n
Copy link

Summary

  • Set SessionStatus to busy before the fire-and-forget SessionPrompt.prompt() call in the prompt_async route, so clients see the correct status immediately
  • Add error handler to reset status to idle if the async prompt fails
  • Add null check for Agent.get() in createUserMessage to throw a clear error when an invalid agent name is provided

Closes #12860

Test plan

  • Call prompt_async and verify SessionStatus is busy immediately after the call returns
  • Verify that when the prompt completes, status transitions correctly
  • Verify that if the prompt fails, status resets to idle
  • Pass an invalid agent name and verify a clear error message is returned instead of a crash

Set SessionStatus to busy before fire-and-forget in prompt_async
so clients see the correct status immediately. Also add a null
check for Agent.get() in createUserMessage to prevent crashes when
an invalid agent name is provided.

Closes anomalyco#12860
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

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.

/session/status potentially not reporting properly

1 participant