pub struct BackgroundProgressConfig {
pub default_recent_blocks: usize,
pub block_text_limit: usize,
pub finished_tasks_cap: usize,
}Expand description
Configuration for the background task progress view.
The goal is to give the main agent a bird’s-eye view of what a subagent is
currently doing, not to flood the main agent’s context with the full text of
sub-turns. Therefore the defaults are conservative — assistant/thinking text is
omitted by default (block_text_limit = 0, reporting only metadata like “there is
an assistant text / thinking”); tool calls, which are naturally short, are kept as-is.
Users can increase block_text_limit when more detail is needed.
The source of truth for configuration lives on the agent side (here).
defect-config’s ToolsConfig.background reuses this struct directly (same
cross-crate reuse pattern as TurnConfig / SessionCapabilitiesConfig — config
depends on agent, not the other way around).
Fields§
§default_recent_blocks: usizeHow many recent message blocks inspect_background_task returns by default when
called without the recent_blocks argument.
0 is treated as 1 (at least one block is always returned, otherwise peek would
always be empty).
block_text_limit: usizeMaximum number of Unicode scalar values for the body of a single block,
applied to free-form text such as assistant messages, thinking blocks, and tool
results. Text exceeding this limit is truncated at the boundary with an ellipsis
marker. 0 means no body text is kept (only the block’s type and metadata, e.g.
tool name) — this is the default, and minimizes pollution of the main agent’s
context.
finished_tasks_cap: usizeHow many finished task entries to keep in the tasks table. Running entries
don’t count toward the cap — they must remain to be cancelable/peekable. When the
cap is exceeded, the oldest finished entry is evicted. Bounds the memory footprint
of long-lived sessions that spawn many background tasks.
Trait Implementations§
Source§impl Clone for BackgroundProgressConfig
impl Clone for BackgroundProgressConfig
Source§fn clone(&self) -> BackgroundProgressConfig
fn clone(&self) -> BackgroundProgressConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BackgroundProgressConfig
Source§impl Debug for BackgroundProgressConfig
impl Debug for BackgroundProgressConfig
Source§impl Default for BackgroundProgressConfig
impl Default for BackgroundProgressConfig
impl Eq for BackgroundProgressConfig
Source§impl PartialEq for BackgroundProgressConfig
impl PartialEq for BackgroundProgressConfig
Source§fn eq(&self, other: &BackgroundProgressConfig) -> bool
fn eq(&self, other: &BackgroundProgressConfig) -> bool
self and other values to be equal, and is used by ==.