Repository navigation
fix(chat): prevent silent launch failure on async task executions (#279) - #280
Merged
Merged
Conversation
Async background tasks never called mark_execution_dispatched(), leaving claude_session_id NULL. The cleanup service then killed in-flight executions after 60s as "silent launch failures" even though the agent call was still running. Also adds a done callback on asyncio.create_task to log any unhandled exceptions that would otherwise be silently swallowed. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chat.pynever calledmark_execution_dispatched(), leavingclaude_session_idNULLmark_execution_dispatched()call beforeagent_post_with_retry()in the async path (matching the syncTaskExecutionServicepattern)add_done_callback()on the background task to log any silently swallowed exceptionsChanges
src/backend/routers/chat.py— 2 fixes in the async task dispatch pathTest Plan
claude_session_idis set to'dispatched'immediately after task is acceptedCloses #279
Generated with Claude Code