Expand description
This controller’s side of the segment index
(backend::continuity_segments): each spawn is one segment of its
agent’s conversation. Best-effort throughout: a failed write is logged and
never affects the process.
Functions§
- forked_
outcome 🔒 - The outcome of a relocated resume (spec §4.3): the fork reports its own
id, which
persistent_resumereads as the CLI starting fresh. Carrying the whole conversation into a new id is the resume succeeding. - kept_
relocated_ 🔒id - A relocated resume the CLI kept under the attempted id, resumed in place
rather than forked. Capture skips an id the controller already holds, so
this is settled on its own, once a result frame proves the resume worked
(an earlier frame echoes the attempted id even when the resume goes on to
fail). Left unsettled, the segment would hold no session (a relocated
Start records none) and the next spawn would sweep the live copy.
holds_current: the reader’s generation is still current and holds the id; a superseded one’s copy path may already be the replacement’s. - provider_
bytes_ 🔒for_ segment - The provider session file’s size for segment
id, from what its own record says about where it ran (spec §4.4). Claude only. - provider_
file_ 🔒size - The segment’s process went away.
zoneis its global transcript zone. Size of the Claude session filesidforcwdunderconfig_dir;Nonewhen it isn’t there. - record_
segment_ 🔒end - record_
segment_ 🔒session - A fresh process reported its provider session id.
- settle_
relocated_ 🔒copy - Once a relocated resume reports its session: a fork (a new id) never wrote the copy, so it goes. The same id back means the CLI resumed the copy in place instead of forking; it is live now, so only its marker goes, and the duplicate is logged (spec §3 I4). Returns whether the copy was still this spawn’s: a replacement’s sweep may have taken it and placed its own at the same path, which is then left alone.
- spawn_
config_ 🔒dir - The config dir the spawn gives its provider: the provider’s own
auth_config_dir_env_var(Gemini’s isGEMINI_CLI_HOME, not theGEMINI_CONFIG_DIRa hand-kept list here once named), else the first known provider’s variable the env carries. - zone_
size 🔒 - Size of
outputin the global zone, read from the database rather than this process’s cache, so another channel’s appends count.
Type Aliases§
- Segment
Ref 🔒 - The segment a spawned process belongs to:
(agent_uid, segment_id).