Fix CLI subagent task routing, Ctrl+C cancellation, and session restore reliability

- Construct ServerTask directly for Bedrock CLI subagents so messages route
  correctly without needing a server CreateTask upgrade
- Handle CliAgentUserQuery input type in both request translators, including
  running command context and terminal output
- Add force_cancel_all_streaming_exchanges fallback for when Ctrl+C finds no
  in-flight streams (stuck subagent / unexpected stream end)
- Cancel active conversation on Ctrl+C in agent view compose state
- Skip agent view entry when agent is tagged-in for a running command
- Set root_task_id on Bedrock requests for proper optimistic task upgrade
- Persist app state on will_terminate to avoid losing sessions
- Trust persisted CWD without is_dir() recheck (fixes network mount restore)
- Log warning instead of silently dropping tabs with unreadable root nodes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ryan Ward
2026-06-25 08:43:10 -05:00
co-authored by Claude Opus 4.6
parent 148c97eab1
commit 57c843d1de
11 changed files with 338 additions and 19 deletions
+11 -1
View File
@@ -2755,7 +2755,17 @@ fn read_sqlite_data(
let saved_tabs: Vec<_> = tabs_for_window
.into_iter()
.filter_map(|tab| {
let root = read_root_node(conn, tab.id).ok()?;
let root = match read_root_node(conn, tab.id) {
Ok(node) => node,
Err(err) => {
log::warn!(
"[session-restore] Failed to read root node for tab {}: {err}. \
This tab will not be restored.",
tab.id,
);
return None;
}
};
let panel = db_panels.get(&tab.id);
let left_panel = panel