@@ -54,7 +54,6 @@ pub struct Tab {
5454 pub label : String ,
5555 pub description : String ,
5656 pub status : Status ,
57- pub background : bool ,
5857 pub title : Option < String > ,
5958}
6059
@@ -92,7 +91,6 @@ struct Child {
9291 label : String ,
9392 description : String ,
9493 status : Status ,
95- background : bool ,
9694 title : Option < String > ,
9795 updated : f64 ,
9896 frames : Vec < ( String , Commit ) > ,
@@ -116,7 +114,6 @@ impl Child {
116114 label : FALLBACK_LABEL . to_owned ( ) ,
117115 description : String :: new ( ) ,
118116 status : Status :: Running ,
119- background : false ,
120117 title : None ,
121118 updated : 0.0 ,
122119 frames : Vec :: new ( ) ,
@@ -144,7 +141,6 @@ impl Child {
144141 self . description . clone ( )
145142 } ,
146143 status : self . status ,
147- background : self . background ,
148144 title : self . title . clone ( ) ,
149145 }
150146 }
@@ -164,7 +160,7 @@ impl Child {
164160 }
165161 }
166162
167- /// `applyMeta`: the subagent call's input names the agent, the task, and whether it runs in the background .
163+ /// `applyMeta`: the subagent call's input names the agent and the task .
168164 fn apply_meta ( & mut self , meta : Option < & IndexMap < String , Value > > ) {
169165 let Some ( meta) = meta else { return } ;
170166 if let Some ( agent) = text ( meta. get ( "agent" ) ) {
@@ -173,9 +169,6 @@ impl Child {
173169 if let Some ( description) = text ( meta. get ( "description" ) ) {
174170 self . description = description. to_owned ( ) ;
175171 }
176- if meta. get ( "background" ) == Some ( & Value :: Bool ( true ) ) {
177- self . background = true ;
178- }
179172 }
180173
181174 /// `userFrame`: a delivered prompt, once.
@@ -541,7 +534,6 @@ impl Tracker {
541534 } ;
542535 child. apply_meta ( call. as_ref ( ) ) ;
543536 if success == Some ( true ) && running {
544- child. background = true ;
545537 child. status = Status :: Running ;
546538 }
547539 if success == Some ( true ) && !running && child. status == Status :: Running {
@@ -776,13 +768,9 @@ impl Tracker {
776768 _ => return ,
777769 } ;
778770 let Some ( ( session, running) ) = child_session ( metadata) else { return } ;
779- let completed = matches ! ( tool. state, ToolPartState :: Completed ( _) ) ;
780771 let alive = self . active . contains ( & session) ;
781772 let Some ( child) = self . admit ( & session) else { return } ;
782773 child. apply_meta ( Some ( input) ) ;
783- if completed && running {
784- child. background = true ;
785- }
786774 if child. status == Status :: Running {
787775 child. status = if running && alive { Status :: Running } else { Status :: Completed } ;
788776 }
@@ -1238,7 +1226,7 @@ mod tests {
12381226 event ( kind, "ses_root" , data)
12391227 } ;
12401228 assert ! ( tracker. main( & call( "session.tool.input.started" , json!( { "name" : "subagent" } ) ) ) . is_empty( ) ) ;
1241- let input = json ! ( { "agent" : "general" , "description" : "Read the docs" , "background" : true } ) ;
1229+ let input = json ! ( { "agent" : "general" , "description" : "Read the docs" } ) ;
12421230 assert ! ( tracker. main( & call( "session.tool.called" , json!( { "input" : input, "executed" : false } ) ) ) . is_empty( ) ) ;
12431231 let metadata = json ! ( { "sessionID" : "ses_child" , "status" : "running" } ) ;
12441232 let fetches = tracker. main ( & call ( "session.tool.progress" , json ! ( { "metadata" : metadata } ) ) ) ;
@@ -1252,7 +1240,7 @@ mod tests {
12521240 assert ! ( tracker. take_changed( ) ) ;
12531241 let tab = & tracker. tabs ( ) [ 0 ] ;
12541242 assert_eq ! ( ( tab. label. as_str( ) , tab. description. as_str( ) ) , ( "General" , "Read the docs" ) ) ;
1255- assert_eq ! ( ( tab. status, tab . background ) , ( Status :: Running , true ) ) ;
1243+ assert_eq ! ( tab. status, Status :: Running ) ;
12561244 // A metadata without a child session names nothing.
12571245 let other = json ! ( { "assistantMessageID" : "msg_1" , "id" : "call_2" , "metadata" : { "status" : "running" } } ) ;
12581246 assert ! ( tracker. main( & event( "session.tool.progress" , "ses_root" , other) ) . is_empty( ) ) ;
@@ -1269,8 +1257,8 @@ mod tests {
12691257 assert_eq ! ( tracker. hydrate( & messages, & [ "ses_b" . into( ) , "ses_c" . into( ) ] , false ) , [ Fetch :: Family ] ) ;
12701258 let tabs = tracker. tabs ( ) ;
12711259 assert_eq ! ( tabs. len( ) , 2 ) ;
1272- // `ses_b` still runs and was started in the background ; `ses_a` finished.
1273- assert_eq ! ( ( tabs[ 0 ] . session_id. as_str( ) , tabs[ 0 ] . status, tabs [ 0 ] . background ) , ( "ses_b" , Status :: Running , true ) ) ;
1260+ // `ses_b` still runs; `ses_a` finished.
1261+ assert_eq ! ( ( tabs[ 0 ] . session_id. as_str( ) , tabs[ 0 ] . status) , ( "ses_b" , Status :: Running ) ) ;
12741262 assert_eq ! ( ( tabs[ 1 ] . session_id. as_str( ) , tabs[ 1 ] . status) , ( "ses_a" , Status :: Completed ) ) ;
12751263 let fetches = tracker. family ( vec ! [ session( "ses_d" , "ses_root" , "plan" , 9.0 ) ] ) ;
12761264 assert ! ( fetches. iter( ) . any( |fetch| matches!( fetch, Fetch :: Discover { session, .. } if session == "ses_c" ) ) ) ;
0 commit comments