pub(crate) enum ResumeGate {
Allow,
Redirect {
head: String,
},
Refuse {
head: String,
},
Relocate {
head: String,
from_config_dir: String,
},
Fork {
head: String,
},
ForkFrom {
head: String,
from_config_dir: String,
from_cwd: String,
},
}Expand description
What the resume gate decided for a session a spawn is about to --resume
(SPEC_RESUME_GATE_AND_SAME_IDENTITY_CONTINUATION_2026_09_25.md §4.2).
Variants§
Allow
Resume the candidate: it is the chain head, or the chain can’t say otherwise.
Redirect
The conversation moved on to head, reachable here: resume that.
Refuse
The conversation moved on to head, which this spawn can’t reach:
resume nothing, so the spawn starts fresh and carries the record.
Relocate
head lives under another login of the same identity, readable at
from_config_dir: copy it in and resume it with --fork-session
(spec §4.3).
Fork
head is reachable here, but its file grew after AgentMux last saw
it: the conversation continued outside AgentMux. Resume it with
--fork-session, so that branch is never appended to by a second
writer (spec §4.4, H4).
ForkFrom
This agent has no conversation of its own yet, and the agent it was
forked from is at the candidate (GateInput::fork_source): copy that
session in from from_config_dir / from_cwd (a fork works in its own
directory, so the CLI can’t find it there) and resume it with
--fork-session, so the fork starts from its parent’s conversation and
never writes to it (the fork-isolation report in #4744, F5).
Trait Implementations§
Source§impl Clone for ResumeGate
impl Clone for ResumeGate
Source§fn clone(&self) -> ResumeGate
fn clone(&self) -> ResumeGate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResumeGate
impl Debug for ResumeGate
impl Eq for ResumeGate
Source§impl PartialEq for ResumeGate
impl PartialEq for ResumeGate
impl StructuralPartialEq for ResumeGate
Auto Trait Implementations§
impl Freeze for ResumeGate
impl RefUnwindSafe for ResumeGate
impl Send for ResumeGate
impl Sync for ResumeGate
impl Unpin for ResumeGate
impl UnsafeUnpin for ResumeGate
impl UnwindSafe for ResumeGate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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