Linear-mode agent coverage and task-lifecycle fixes #690: covers MCP tools, confirmations, delegation,
compaction, commands, and clean exit; tracks memorizer tasks with
fire_and_forget, cancels background and sub-agent work at exit, and clears
stale agent state.
The offline harness exercises the real async path without provider or network
variability. The transcript invariant makes tui: false safe for logs, pipes,
scripts, and terminals that cannot support cursor movement; spinners are
disabled because they redraw existing cells.
Bare asyncio.create_task calls left memorizer work unowned at shutdown.
Using the existing fire_and_forget helper retains each task, captures its
failure, and registers it for cancellation. Sub-agent tasks and service state
have separate owners, so exit also cancels and clears them explicitly. The
documentation records these tested guarantees instead of leaving tui: false
as an accidental fallback.
Activity