Commit 465afa1
committed
fix(tui): swallow 404 when auto-syncing referenced subagent session
The Task tool component auto-syncs the referenced subagent session in
onMount. The sync calls sdk.client.session.get with throwOnError: true,
which throws Session not found if the subagent session has been deleted.
Because the call is fire-and-forget (`void sync.session.sync(...)`), the
rejection becomes an unhandled rejection on the TUI process, which logs
"process error" and exits with code 1. A single orphaned subagent task
in the message history is enough to make the parent session unloadable.
Swallow the rejection at the call site. Sessions whose subagent rows are
gone simply render without the inlined subagent message preview, which
is the same behavior as before sync resolves.1 parent 7703786 commit 465afa1
1 file changed
Lines changed: 5 additions & 2 deletions
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2061 | 2061 | | |
2062 | 2062 | | |
2063 | 2063 | | |
2064 | | - | |
2065 | | - | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
2066 | 2069 | | |
2067 | 2070 | | |
2068 | 2071 | | |
| |||
0 commit comments