-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
epicMilestone-level tracking issueMilestone-level tracking issue
Description
Problem
Currently Ctrl-C breaks the agent loop immediately with no cleanup:
- No farewell message to the user
- MCP servers left orphaned (
shutdown_all()exists but is never called) - Mid-stream LLM responses are not cancelled — process hangs until the stream finishes
Scope
- Add
Agent::shutdown()method with MCP cleanup and farewell message - Call
agent.shutdown()in main.rs afterrun()returns - Cancel-aware streaming loops (wrap
stream.next()withtokio::select!on shutdown signal)
Files
crates/zeph-core/src/agent/mod.rscrates/zeph-core/src/agent/streaming.rssrc/main.rs
Reuse
McpManager::shutdown_all()atcrates/zeph-mcp/src/manager.rs:190shutdown_signal()helper atcrates/zeph-core/src/agent/mod.rs:803
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
epicMilestone-level tracking issueMilestone-level tracking issue