@@ -28,6 +28,7 @@ def make_session(
2828 project_dir : str ,
2929 config_path : str | None = None ,
3030 model : str | None = None ,
31+ stream : bool | None = None ,
3132) -> AgentSession :
3233 """Create an AgentSession from config file + env (no env required).
3334
@@ -70,6 +71,7 @@ def make_session(
7071 temperature = settings ["temperature" ],
7172 max_tokens = settings ["max_tokens" ],
7273 reasoning_effort = settings ["reasoning_effort" ],
74+ stream = settings ["stream" ] if stream is None else stream ,
7375 registry = default_registry (),
7476 context_path = paths .get ("context_path" ),
7577 skill_path = paths .get ("skill_path" ),
@@ -80,7 +82,10 @@ def cmd_run(args: argparse.Namespace) -> int:
8082 from .tui import Tui
8183
8284 project_dir = args .project or os .getcwd ()
83- session = make_session (project_dir , config_path = args .config )
85+ session = make_session (
86+ project_dir , config_path = args .config ,
87+ stream = False if getattr (args , "no_stream" , False ) else None ,
88+ )
8489 Tui (session ).run ()
8590 session .close ()
8691 return 0
@@ -108,6 +113,7 @@ def cmd_config(args: argparse.Namespace) -> int:
108113 print (f"temperature: { settings ['temperature' ]} " )
109114 print (f"max_tokens: { settings ['max_tokens' ]} " )
110115 print (f"reasoning_effort: { settings ['reasoning_effort' ]} " )
116+ print (f"stream: { settings ['stream' ]} " )
111117 print (f"timeout: { settings ['timeout' ]} " )
112118 print (f"context_path: { paths ['context_path' ] or '(auto-discover)' } " )
113119 print (f"skill_path: { paths ['skill_path' ] or '(auto-discover)' } " )
@@ -135,6 +141,10 @@ def build_parser() -> argparse.ArgumentParser:
135141
136142 p_run = sub .add_parser ("run" , help = "interactive TUI agent session" )
137143 _add_config_arg (p_run , suppress = True )
144+ p_run .add_argument (
145+ "--no-stream" , action = "store_true" ,
146+ help = "disable streaming (one-shot responses; overrides config file)" ,
147+ )
138148 p_run .add_argument ("project" , nargs = "?" , help = "project directory (default: cwd)" )
139149
140150 p_config = sub .add_parser (
0 commit comments