diff --git a/src/openrtc/cli_app.py b/src/openrtc/cli_app.py index d98afe4..41ca56e 100644 --- a/src/openrtc/cli_app.py +++ b/src/openrtc/cli_app.py @@ -334,8 +334,12 @@ def main(argv: list[str] | None = None) -> int: previous_argv = sys.argv try: if argv is not None: + injected_args = inject_cli_positional_paths(list(argv)) + # Mirror a real CLI invocation so LiveKit handoff logic that + # inspects sys.argv sees the injected arguments (e.g. --reload). + sys.argv = [previous_argv[0], *injected_args] cli.main( - args=inject_cli_positional_paths(list(argv)), + args=injected_args, prog_name="openrtc", standalone_mode=True, ) diff --git a/src/openrtc/tui_app.py b/src/openrtc/tui_app.py index 55a4afc..273dfb8 100644 --- a/src/openrtc/tui_app.py +++ b/src/openrtc/tui_app.py @@ -17,10 +17,10 @@ def validate_metrics_watch_path(path: Path) -> None: resolved = path.resolve() if resolved.exists() and resolved.is_dir(): raise ValueError( - "'--watch' must be a JSONL file path (the same path you pass to " - "'--metrics-jsonl' on the OpenRTC worker). This value is a directory " - "— for example, use a file such as ./metrics.jsonl, not your agents " - f"folder. Got: {resolved}" + "The metrics watch path must be a JSONL file path (the same path you " + "pass to '--metrics-jsonl' on the OpenRTC worker). This value is a " + "directory — for example, use a file such as ./metrics.jsonl, not your " + f"agents folder. Got: {resolved}" )