Feature: Interactive Session Input Handling and Error Recovery As a developer I want interactive sessions to handle help, exit, empty input, interrupts, EOF, and stream/graph commands correctly So that the CLI session remains responsive and recovers from user input errors Background: Given a fresh interactive coverage test context (aic) Scenario: start_interactive_session enters while loop and processes exit Given an app with config and pure_graph for interactive testing (aic) When I call start_interactive_session with input "exit" (aic) Then the session should print goodbye and complete without error (aic) Scenario: start_interactive_session processes help command Given an app with config and pure_graph for interactive testing (aic) When I call start_interactive_session with input "help, exit" (aic) Then the help message should be printed during the session (aic) Scenario: start_interactive_session processes empty input Given an app with config and pure_graph for interactive testing (aic) When I call start_interactive_session with input " , exit" (aic) Then empty input should be skipped in the session (aic) Scenario: start_interactive_session handles EOFError Given an app with config and pure_graph for interactive testing (aic) When I call start_interactive_session with EOFError input (aic) Then the session should print goodbye and complete (aic) Scenario: start_interactive_session handles KeyboardInterrupt Given an app with config and pure_graph for interactive testing (aic) When I call start_interactive_session with KeyboardInterrupt then exit input (aic) Then the keyboard interrupt help message should be printed (aic) Scenario: run_single_shot with stream path triggers on_error callback Given an app with config and stream_router set up (aic) When I call run_single_shot that triggers on_error via stream message (aic) Then the on_error should log the stream error (aic) Scenario: start_interactive_session saves user and assistant messages to context_manager Given an app with config, pure_graph, and context_manager for interactive (aic) When I call start_interactive_session with context_manager and input "hello,exit" (aic) Then user and assistant messages should be saved to context_manager (aic) Scenario: run_single_shot processes context_updates from tools Given an app with config and stream_router set up (aic) When I call run_single_shot that handles context_updates from tools (aic) Then global_context from tools should be updated via _CONTEXT_UPDATES (aic) Scenario: _handle_graph_command with invalid graph route lists available graphs Given an app with config and graph routes for interactive commands (aic) When I call _handle_graph_command for a missing route "nonexistent" (aic) Then available graph routes should be printed (aic) Scenario: _handle_stream_command with config=None handles safely Given an app without config but with streams for interactive (aic) When I call _handle_stream_command with "valid_stream test" (aic) Then the message should be delivered to the stream (aic)