pub enum InterruptionKind {
Prompt(String),
Tool,
}Expand description
Detected interruption state for a resumed session.
Returned by detect_interruption
after inspecting the tail of the message history.
§Design decision: banner, not auto-resume
Claude Code auto-continues interrupted turns (re-sends the prompt or injects “Continue from where you left off”). Koda deliberately shows a banner and lets the user decide, for three reasons:
- Safety — auto-resuming a destructive tool call (e.g.
rm -rf) after a VPN drop is surprising. The user should see the state first. - Stale context — the user may have fixed the issue manually while Koda was disconnected. Auto-resume wastes tokens re-doing work.
- Cost — resuming to check history shouldn’t burn an API call.
A single “type continue or rephrase” banner is near-zero friction
(one word + Enter) and handles all three cases.
Variants§
Prompt(String)
The user’s prompt was never answered (last message is Role::User).
Contains a preview of the unanswered prompt.
Tool
A tool finished but the assistant never processed the result
(last message is Role::Tool).
Trait Implementations§
Source§impl Clone for InterruptionKind
impl Clone for InterruptionKind
Source§fn clone(&self) -> InterruptionKind
fn clone(&self) -> InterruptionKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InterruptionKind
impl Debug for InterruptionKind
Source§impl PartialEq for InterruptionKind
impl PartialEq for InterruptionKind
impl StructuralPartialEq for InterruptionKind
Auto Trait Implementations§
impl Freeze for InterruptionKind
impl RefUnwindSafe for InterruptionKind
impl Send for InterruptionKind
impl Sync for InterruptionKind
impl Unpin for InterruptionKind
impl UnsafeUnpin for InterruptionKind
impl UnwindSafe for InterruptionKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more