@@ -206,6 +206,9 @@ impl CliRuntime {
206206 && !normalized
207207 . windows ( 2 )
208208 . any ( |args| args == [ "agent-task" , "promotion-provider" ] )
209+ && !normalized
210+ . windows ( 3 )
211+ . any ( |args| args == [ "agent-task" , "tool" , "dispatch" ] )
209212 {
210213 let _ = crate :: runner:: reconcile_terminal_runner_exec_runs ( ) ;
211214 }
@@ -503,13 +506,16 @@ impl CliRuntime {
503506 }
504507 }
505508
506- // This internal provider's request is carried on process stdin. Execute
507- // it before generic routing or startup work can consume that stream.
509+ // These internal adapters carry their requests on process stdin. Execute
510+ // them before generic routing or startup work can consume that stream.
508511 if let Some ( exit_code) =
509512 run_promotion_provider_dispatch ( & cli. command , output_file. as_deref ( ) , & command_identity)
510513 {
511514 return std:: process:: ExitCode :: from ( exit_code_to_u8 ( exit_code) ) ;
512515 }
516+ if let Some ( exit_code) = run_raw_agent_tool_dispatch ( & cli. command ) {
517+ return std:: process:: ExitCode :: from ( exit_code_to_u8 ( exit_code) ) ;
518+ }
513519
514520 // Capture controller pressure once before placement routing. The route
515521 // and persisted evidence reuse this preflight decision rather than
@@ -553,10 +559,6 @@ impl CliRuntime {
553559 cli. artifact_root . clone ( ) . or ( artifact_root_override) ,
554560 ) ;
555561
556- if let Some ( exit_code) = run_raw_agent_tool_dispatch ( & cli. command ) {
557- return std:: process:: ExitCode :: from ( exit_code_to_u8 ( exit_code) ) ;
558- }
559-
560562 run_startup_update_checks ( & cli. command ) ;
561563
562564 let exit_code = crate :: core:: notification_route:: with_current ( notification_route, || {
0 commit comments