fix(tui): swallow 404 when auto-syncing referenced subagent session#29353
Closed
sjawhar wants to merge 1 commit into
Closed
fix(tui): swallow 404 when auto-syncing referenced subagent session#29353sjawhar wants to merge 1 commit into
sjawhar wants to merge 1 commit into
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Based on the search results, I found one potentially related PR: Related PR:
The current PR (#29353) is more specific about swallowing the 404 error during auto-sync, while #26944 deals with preventing crashes when tasks reference missing child sessions. They may be addressing complementary aspects of the same issue. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
…missing Cherry-picked from upstream PR anomalyco#26944 by @shalin-dev which is a superset of our prior local fix. Adds the .catch() on auto-sync (was our 1-line fix) plus a sessionMissing signal that disables Task onClick to prevent dead-link navigation.
465afa1 to
b9c6c04
Compare
Author
|
Closing in favor of #26944, which lands the same fix plus a navigation guard for the dead-link case. Cherry-picked their content into our fork locally so we get the fix without an extra upstream PR. |
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.
Issue for this PR
Closes #29350
Type of change
What does this PR do?
Subagent sessions are ephemeral — they can be GC'd, deleted, or never persisted depending on agent lifecycle. The parent session's Task message still references the subagent ID, and when the TUI auto-syncs that reference and the session is gone, the backend 404 propagates as an unhandled rejection.
One-line
.catch(() => {})on the auto-sync call. Comment explains the lifecycle reasoning. Task message still renders fine without the subagent message preview.How did you verify your code works?
Manual repro: opened a session with subagent Task references, removed the subagent session, reopened the parent. Pre-fix: error toast / failed render. Post-fix: clean render, no toast.
The auto-sync call is fire-and-forget by design so there's no existing test path covering the rejection — adding a unit test would require mocking the entire SDK client.
Checklist