From 81a9a66578b3c59c257153b89affddc0d083f9ec Mon Sep 17 00:00:00 2001 From: Mowenhao13 <3611893928@qq.com> Date: Wed, 18 Mar 2026 09:52:09 +0800 Subject: [PATCH 1/7] fix: fix wrong live terminal display for claude code --- codex_autoloop/live_updates.py | 45 +++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/codex_autoloop/live_updates.py b/codex_autoloop/live_updates.py index 3f36885..4140346 100644 --- a/codex_autoloop/live_updates.py +++ b/codex_autoloop/live_updates.py @@ -17,20 +17,41 @@ def extract_agent_message(stream: str, line: str) -> tuple[str, str] | None: return None if not isinstance(payload, dict): return None - if payload.get("type") != "item.completed": - return None - item = payload.get("item", {}) - if not isinstance(item, dict): - return None - if item.get("type") != "agent_message": - return None - text = item.get("text", "") - if not isinstance(text, str): + + # Codex format: item.completed with agent_message + if payload.get("type") == "item.completed": + item = payload.get("item", {}) + if not isinstance(item, dict): + return None + if item.get("type") != "agent_message": + return None + text = item.get("text", "") + if not isinstance(text, str): + return None + message = text.strip() + if message: + return actor, message return None - message = text.strip() - if not message: + + # Claude format: assistant message + if payload.get("type") == "assistant": + message_obj = payload.get("message", {}) + if not isinstance(message_obj, dict): + return None + content = message_obj.get("content", []) + if not isinstance(content, list): + return None + parts: list[str] = [] + for c in content: + if isinstance(c, dict) and c.get("type") == "text": + text = c.get("text", "") + if isinstance(text, str) and text.strip(): + parts.append(text.strip()) + if parts: + return actor, "\n".join(parts) return None - return actor, message + + return None @dataclass From e164163886a2622c703254fbb0a6a394ea26c684 Mon Sep 17 00:00:00 2001 From: Mowenhao13 <3611893928@qq.com> Date: Wed, 18 Mar 2026 10:41:00 +0800 Subject: [PATCH 2/7] refactor: change run_codex_bin to run_runner_bin and mock prompt_runner_backend_choice --- codex_autoloop/apps/daemon_app.py | 8 ++++---- codex_autoloop/codexloop.py | 8 ++++---- codex_autoloop/copilot_proxy.py | 8 ++++---- codex_autoloop/setup_wizard.py | 2 +- codex_autoloop/telegram_daemon.py | 11 +++++------ tests/test_codexloop.py | 12 +++++++++--- tests/test_copilot_proxy.py | 2 +- tests/test_telegram_daemon.py | 2 +- 8 files changed, 29 insertions(+), 24 deletions(-) diff --git a/codex_autoloop/apps/daemon_app.py b/codex_autoloop/apps/daemon_app.py index e30e5e5..1b0d710 100644 --- a/codex_autoloop/apps/daemon_app.py +++ b/codex_autoloop/apps/daemon_app.py @@ -71,7 +71,7 @@ def __init__(self, args: argparse.Namespace) -> None: self.btw_agent = BtwAgent( runner=build_codex_runner( backend=getattr(args, "run_runner_backend", DEFAULT_RUNNER_BACKEND), - codex_bin=getattr(args, "run_codex_bin", None), + runner_bin=getattr(args, "run_runner_bin", None), config=run_copilot_proxy, ), config=BtwConfig( @@ -640,9 +640,9 @@ def build_child_command( else: cmd.append("--no-copilot-proxy") cmd.extend(["--runner-backend", getattr(args, "run_runner_backend", DEFAULT_RUNNER_BACKEND)]) - run_codex_bin = str(getattr(args, "run_codex_bin", "") or "").strip() - if run_codex_bin: - cmd.extend(["--runner-bin", run_codex_bin]) + run_runner_bin = str(getattr(args, "run_runner_bin", "") or "").strip() + if run_runner_bin: + cmd.extend(["--runner-bin", run_runner_bin]) run_copilot_proxy_dir = str(getattr(args, "run_copilot_proxy_dir", "") or "").strip() if run_copilot_proxy_dir: cmd.extend(["--copilot-proxy-dir", run_copilot_proxy_dir]) diff --git a/codex_autoloop/codexloop.py b/codex_autoloop/codexloop.py index 8c88776..c0e0314 100644 --- a/codex_autoloop/codexloop.py +++ b/codex_autoloop/codexloop.py @@ -376,7 +376,7 @@ def run_interactive_config(*, home_dir: Path, run_cd: Path) -> dict[str, Any]: "run_plan_record_file": None, "run_resume_last_session": True, "run_runner_backend": runner_backend, - "run_codex_bin": runner_bin, + "run_runner_bin": runner_bin, "run_main_reasoning_effort": None, "run_reviewer_reasoning_effort": None, "run_main_model": None, @@ -795,9 +795,9 @@ def build_daemon_command(*, config: dict[str, Any], home_dir: Path, token_lock_d cmd.extend(["--run-model-preset", run_model_preset]) run_runner_backend = str(config.get("run_runner_backend") or DEFAULT_RUNNER_BACKEND).strip() or DEFAULT_RUNNER_BACKEND cmd.extend(["--run-runner-backend", run_runner_backend]) - run_codex_bin = str(config.get("run_codex_bin") or "").strip() - if run_codex_bin: - cmd.extend(["--run-runner-bin", run_codex_bin]) + run_runner_bin = str(config.get("run_runner_bin") or "").strip() + if run_runner_bin: + cmd.extend(["--run-runner-bin", run_runner_bin]) if bool(config.get("run_copilot_proxy")): cmd.append("--run-copilot-proxy") else: diff --git a/codex_autoloop/copilot_proxy.py b/codex_autoloop/copilot_proxy.py index 8dcc6c9..0a9ddf9 100644 --- a/codex_autoloop/copilot_proxy.py +++ b/codex_autoloop/copilot_proxy.py @@ -213,20 +213,20 @@ def ensure_proxy_running( def build_codex_runner( *, backend: RunnerBackend, - codex_bin: str, + runner_bin: str | None, config: CopilotProxyConfig, event_callback=None, ) -> CodexRunner: if not backend_supports_copilot_proxy(backend): return CodexRunner( - codex_bin=codex_bin, + codex_bin=runner_bin, backend=backend, event_callback=event_callback, ) if not config.enabled: - return CodexRunner(codex_bin=codex_bin, backend=backend, event_callback=event_callback) + return CodexRunner(codex_bin=runner_bin, backend=backend, event_callback=event_callback) return CodexRunner( - codex_bin=codex_bin, + codex_bin=runner_bin, backend=backend, event_callback=event_callback, default_extra_args=codex_config_overrides(config), diff --git a/codex_autoloop/setup_wizard.py b/codex_autoloop/setup_wizard.py index 9ebc035..9c6b508 100644 --- a/codex_autoloop/setup_wizard.py +++ b/codex_autoloop/setup_wizard.py @@ -206,7 +206,7 @@ def main() -> None: "run_yolo": args.run_yolo, "run_resume_last_session": args.run_resume_last_session, "run_runner_backend": runner_backend, - "run_codex_bin": runner_bin, + "run_runner_bin": runner_bin, "run_main_reasoning_effort": main_reasoning_effort, "run_reviewer_reasoning_effort": reviewer_reasoning_effort, "run_main_model": main_model, diff --git a/codex_autoloop/telegram_daemon.py b/codex_autoloop/telegram_daemon.py index a07a8b2..85e324d 100644 --- a/codex_autoloop/telegram_daemon.py +++ b/codex_autoloop/telegram_daemon.py @@ -326,7 +326,7 @@ def main() -> None: btw_agent = BtwAgent( runner=build_codex_runner( backend=args.run_runner_backend, - codex_bin=args.run_codex_bin, + runner_bin=args.run_runner_bin, config=run_copilot_proxy, ), config=BtwConfig( @@ -1349,9 +1349,9 @@ def build_child_command( else: cmd.append("--no-copilot-proxy") cmd.extend(["--runner-backend", getattr(args, "run_runner_backend", DEFAULT_RUNNER_BACKEND)]) - run_codex_bin = str(getattr(args, "run_codex_bin", "") or "").strip() - if run_codex_bin: - cmd.extend(["--runner-bin", run_codex_bin]) + run_runner_bin = str(getattr(args, "run_runner_bin", "") or "").strip() + if run_runner_bin: + cmd.extend(["--runner-bin", run_runner_bin]) run_copilot_proxy_dir = str(getattr(args, "run_copilot_proxy_dir", "") or "").strip() if run_copilot_proxy_dir: cmd.extend(["--copilot-proxy-dir", run_copilot_proxy_dir]) @@ -2017,8 +2017,7 @@ def build_parser() -> argparse.ArgumentParser: ) parser.add_argument( "--run-runner-bin", - "--run-codex-bin", - dest="run_codex_bin", + dest="run_runner_bin", default=None, help="CLI binary path for the selected child execution backend.", ) diff --git a/tests/test_codexloop.py b/tests/test_codexloop.py index 54f1294..cc5f6ac 100644 --- a/tests/test_codexloop.py +++ b/tests/test_codexloop.py @@ -99,12 +99,14 @@ def test_is_config_usable_requires_token_and_run_cd() -> None: def test_run_interactive_config_uses_passed_run_cd(monkeypatch, tmp_path: Path) -> None: monkeypatch.setattr(codexloop, "prompt_control_channel", lambda default="telegram": "telegram") + monkeypatch.setattr(codexloop, "prompt_runner_backend_choice", lambda default="codex": "codex") monkeypatch.setattr(codexloop, "prompt_token", lambda: "123:abc") monkeypatch.setattr(codexloop, "prompt_chat_id", lambda: "auto") monkeypatch.setattr(codexloop, "prompt_input", lambda prompt, default: "") monkeypatch.setattr(codexloop, "prompt_model_choice", lambda: None) monkeypatch.setattr(codexloop, "prompt_copilot_proxy_choice", lambda preferred=False: (False, None, 18080)) monkeypatch.setattr(codexloop, "prompt_play_mode", lambda: codexloop.PLAY_MODES[1]) + monkeypatch.setattr(codexloop.shutil, "which", lambda x: "/usr/bin/" + x) config = codexloop.run_interactive_config(home_dir=tmp_path / ".argusbot", run_cd=tmp_path) assert config["run_cd"] == str(tmp_path.resolve()) assert config["feishu_app_id"] is None @@ -119,17 +121,19 @@ def test_run_interactive_config_uses_passed_run_cd(monkeypatch, tmp_path: Path) assert config["run_full_auto"] is False assert config["run_copilot_proxy"] is False assert config["run_runner_backend"] == "codex" - assert config["run_codex_bin"] + assert config["run_runner_bin"] def test_run_interactive_config_supports_feishu_channel(monkeypatch, tmp_path: Path) -> None: - answers = iter(["1", "cli_xxx", "oc_123", ""]) + answers = iter(["cli_xxx", "oc_123", ""]) monkeypatch.setattr(codexloop, "prompt_control_channel", lambda default="telegram": "feishu") + monkeypatch.setattr(codexloop, "prompt_runner_backend_choice", lambda default="codex": "codex") monkeypatch.setattr(codexloop, "prompt_input", lambda prompt, default: next(answers)) monkeypatch.setattr(codexloop, "prompt_secret", lambda prompt: "secret") monkeypatch.setattr(codexloop, "prompt_model_choice", lambda: None) monkeypatch.setattr(codexloop, "prompt_copilot_proxy_choice", lambda preferred=False: (False, None, 18080)) monkeypatch.setattr(codexloop, "prompt_play_mode", lambda: codexloop.PLAY_MODES[1]) + monkeypatch.setattr(codexloop.shutil, "which", lambda x: "/usr/bin/" + x) config = codexloop.run_interactive_config(home_dir=tmp_path / ".argusbot", run_cd=tmp_path) assert config["telegram_bot_token"] is None assert config["telegram_chat_id"] is None @@ -147,12 +151,14 @@ def fake_prompt_copilot_proxy_choice(preferred=False): return False, None, 18080 monkeypatch.setattr(codexloop, "prompt_control_channel", lambda default="telegram": "telegram") + monkeypatch.setattr(codexloop, "prompt_runner_backend_choice", lambda default="codex": "codex") monkeypatch.setattr(codexloop, "prompt_token", lambda: "123:abc") monkeypatch.setattr(codexloop, "prompt_chat_id", lambda: "auto") monkeypatch.setattr(codexloop, "prompt_input", lambda prompt, default: "") monkeypatch.setattr(codexloop, "prompt_model_choice", lambda: "copilot") monkeypatch.setattr(codexloop, "prompt_copilot_proxy_choice", fake_prompt_copilot_proxy_choice) monkeypatch.setattr(codexloop, "prompt_play_mode", lambda: codexloop.PLAY_MODES[1]) + monkeypatch.setattr(codexloop.shutil, "which", lambda x: "/usr/bin/" + x) codexloop.run_interactive_config(home_dir=tmp_path / ".argusbot", run_cd=tmp_path) @@ -299,7 +305,7 @@ def test_build_daemon_command_uses_config(monkeypatch, tmp_path: Path) -> None: "run_resume_last_session": True, "run_model_preset": "quality", "run_runner_backend": "claude", - "run_codex_bin": "/opt/homebrew/bin/claude", + "run_runner_bin": "/opt/homebrew/bin/claude", "run_copilot_proxy": True, "run_copilot_proxy_dir": "/home/v-boxiuli/copilot-proxy", "run_copilot_proxy_port": 18080, diff --git a/tests/test_copilot_proxy.py b/tests/test_copilot_proxy.py index 79986a0..c0b3478 100644 --- a/tests/test_copilot_proxy.py +++ b/tests/test_copilot_proxy.py @@ -117,7 +117,7 @@ def test_build_codex_runner_skips_proxy_overrides_for_claude_backend() -> None: ) runner = copilot_proxy.build_codex_runner( backend="claude", - codex_bin="claude", + runner_bin="claude", config=config, ) assert runner.backend == "claude" diff --git a/tests/test_telegram_daemon.py b/tests/test_telegram_daemon.py index 309387f..c8ce9ae 100644 --- a/tests/test_telegram_daemon.py +++ b/tests/test_telegram_daemon.py @@ -36,7 +36,7 @@ def test_build_child_command_includes_core_args() -> None: codex_autoloop_bin="argusbot-run", run_max_rounds=8, run_runner_backend="claude", - run_codex_bin="/opt/homebrew/bin/claude", + run_runner_bin="/opt/homebrew/bin/claude", run_model_preset="quality", run_main_model=None, run_main_reasoning_effort=None, From 5621872e4437181eaba3176cd475792348e4d1b0 Mon Sep 17 00:00:00 2001 From: Mowenhao13 <3611893928@qq.com> Date: Wed, 18 Mar 2026 10:44:42 +0800 Subject: [PATCH 3/7] test: use claude-sonnet preset with claude backend in daemon command test --- tests/test_codexloop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_codexloop.py b/tests/test_codexloop.py index cc5f6ac..ddfe666 100644 --- a/tests/test_codexloop.py +++ b/tests/test_codexloop.py @@ -303,7 +303,7 @@ def test_build_daemon_command_uses_config(monkeypatch, tmp_path: Path) -> None: "run_plan_auto_execute_delay_seconds": 600, "follow_up_auto_execute_seconds": 900, "run_resume_last_session": True, - "run_model_preset": "quality", + "run_model_preset": "claude-sonnet", "run_runner_backend": "claude", "run_runner_bin": "/opt/homebrew/bin/claude", "run_copilot_proxy": True, From cef24cb3c0864ee546426fcc493094113747a746 Mon Sep 17 00:00:00 2001 From: Mowenhao13 <3611893928@qq.com> Date: Wed, 18 Mar 2026 10:52:30 +0800 Subject: [PATCH 4/7] fix: use datetime.timezone.utc for Python 3.10 compatibility --- codex_autoloop/telegram_daemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex_autoloop/telegram_daemon.py b/codex_autoloop/telegram_daemon.py index 85e324d..f967d18 100644 --- a/codex_autoloop/telegram_daemon.py +++ b/codex_autoloop/telegram_daemon.py @@ -1481,7 +1481,7 @@ def set_force_fresh_session_marker(state_file: str | None, *, enabled: bool, rea payload[FORCE_FRESH_SESSION_KEY] = bool(enabled) if enabled: payload["session_id"] = None - payload["force_fresh_updated_at"] = dt.datetime.now(dt.UTC).isoformat().replace("+00:00", "Z") + payload["force_fresh_updated_at"] = dt.datetime.now(dt.timezone.utc).isoformat().replace("+00:00", "Z") if reason: payload[FORCE_FRESH_REASON_KEY] = reason else: From 424506971ebad8e2dfa0cf049a7d1f296557a62d Mon Sep 17 00:00:00 2001 From: Mowenhao13 <3611893928@qq.com> Date: Wed, 18 Mar 2026 11:01:00 +0800 Subject: [PATCH 5/7] fix: include subpackages (core, adapters, apps) in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0fdb665..5d1b3ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ argusbot-setup = "codex_autoloop.setup_wizard:main" argusbot-models = "codex_autoloop.model_catalog:main" [tool.setuptools] -packages = ["codex_autoloop"] +packages = ["codex_autoloop", "codex_autoloop.core", "codex_autoloop.adapters", "codex_autoloop.apps"] [tool.setuptools.package-data] codex_autoloop = ["planner_schema.json", "reviewer_schema.json"] From d7c9f8747c1958a5cb59c8fa4e7de4615820fa17 Mon Sep 17 00:00:00 2001 From: Mowenhao13 <3611893928@qq.com> Date: Wed, 18 Mar 2026 11:12:11 +0800 Subject: [PATCH 6/7] fix: change codexloop into argusbot --- Feishu_readme/Feishu_readme.md | 24 ++++++++++++------------ Feishu_readme/Feishu_readme_CN.md | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Feishu_readme/Feishu_readme.md b/Feishu_readme/Feishu_readme.md index 14a8c6f..5597be2 100644 --- a/Feishu_readme/Feishu_readme.md +++ b/Feishu_readme/Feishu_readme.md @@ -1,9 +1,9 @@ -# Feishu Setup Guide up to Entering the `chat_id` in `codexloop init` +# Feishu Setup Guide up to Entering the `chat_id` in `argusbot init` This document focuses on one specific task only: -starting from scratch, preparing all information required for a Feishu bot, and then running `codexloop init` in the current project until the `Feishu chat id` field is filled in. +starting from scratch, preparing all information required for a Feishu bot, and then running `argusbot init` in the current project until the `Feishu chat id` field is filled in. It does **not** cover subsequent steps such as `/run`, `/inject`, message delivery validation, or troubleshooting. @@ -15,14 +15,14 @@ Enter the current repository directory: cd ./ArgusBot ``` -Confirm that both codex and codexloop are available: +Confirm that both codex/claude and argusbot are available: ```bash -codex --help -codexloop help +codex --help # or claude: claude --help +argusbot help ``` -If codexloop is not available in your PATH, install the current repository in editable mode first: +If argusbot is not available in your PATH, install the current repository in editable mode first: ```bash pip install -e . @@ -41,7 +41,7 @@ You will need the following two values later: - `App ID` - `App Secret` -Please save them, as `codexloop init` will later prompt you for: +Please save them, as `argusbot init` will later prompt you for: - `Feishu app id` - `Feishu app secret` @@ -98,7 +98,7 @@ A typical chat_id looks like: oc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` -## 5. Run `codexloop init` in the Current Project +## 5. Run `argusbot init` in the Current Project Make sure you are inside the target project directory: @@ -109,7 +109,7 @@ cd ./ArgusBot Then run: ```bash -codexloop init +argusbot init ``` During initialization, you will see prompts similar to the following: @@ -142,7 +142,7 @@ At this point, this document ends. ## 6. Where the Configuration Will Be Written -After `codexloop init` completes, the configuration will be written to: +After `argusbot init` completes, the configuration will be written to: ```text .codex_daemon/daemon_config.json @@ -160,11 +160,11 @@ The Feishu-related fields are: ## 7. Minimal Checklist -Before running `codexloop init`, you only need to confirm the following four items: +Before running `argusbot init`, you only need to confirm the following four items: - a Feishu custom app has been created - the `App ID` has been obtained - the `App Secret` has been obtained - the target group `chat_id` has been obtained -Once these four values are ready, you can start `codexloop init` and enter the `Feishu chat id`. +Once these four values are ready, you can start `argusbot init` and enter the `Feishu chat id`. diff --git a/Feishu_readme/Feishu_readme_CN.md b/Feishu_readme/Feishu_readme_CN.md index 29de572..8f3f1b2 100644 --- a/Feishu_readme/Feishu_readme_CN.md +++ b/Feishu_readme/Feishu_readme_CN.md @@ -1,9 +1,9 @@ -# Feishu 配置到 `codexloop init` 输入 `chat id` 为止 +# Feishu 配置到 `argusbot init` 输入 `chat id` 为止 这份文档只覆盖一件事: -从 0 开始准备飞书机器人所需信息,然后在当前项目里执行 `codexloop init`,并把 `Feishu chat id` 填进去为止。 +从 0 开始准备飞书机器人所需信息,然后在当前项目里执行 `argusbot init`,并把 `Feishu chat id` 填进去为止。 不展开后续 `/run`、`/inject`、消息收发验证和故障排查。 @@ -15,14 +15,14 @@ cd ./ArgusBot ``` -确认 `codex` 和 `codexloop` 可用: +确认 `codex`/`claude` 和 `argusbot` 可用: ```bash -codex --help -codexloop help +codex --help # 检查claude: claude --help +argusbot help ``` -如果 `codexloop` 不在 PATH,先在当前仓库安装: +如果 `argusbot` 不在 PATH,先在当前仓库安装: ```bash pip install -e . @@ -41,7 +41,7 @@ pip install -e . - `App ID` - `App Secret` -把它们记下来,后面 `codexloop init` 会要求输入: +把它们记下来,后面 `argusbot init` 会要求输入: - `Feishu app id` - `Feishu app secret` @@ -100,7 +100,7 @@ pip install -e . oc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` -## 5. 在当前项目里执行 `codexloop init` +## 5. 在当前项目里执行 `argusbot init` 确认你当前就在目标项目目录下: @@ -111,7 +111,7 @@ cd ./ArgusBot 然后执行: ```bash -codexloop init +argusbot init ``` 初始化过程中会出现类似下面这些问题: @@ -144,7 +144,7 @@ Feishu chat id: ## 6. 你填完以后,配置会写到哪里 -`codexloop init` 会把配置写到当前项目下的: +`argusbot init` 会把配置写到当前项目下的: ```text .codex_daemon/daemon_config.json @@ -162,11 +162,11 @@ Feishu chat id: ## 7. 一个最短检查清单 -在执行 `codexloop init` 之前,你只需要确认这 4 件事: +在执行 `argusbot init` 之前,你只需要确认这 4 件事: - 已创建飞书自建应用 - 已拿到 `App ID` - 已拿到 `App Secret` - 已拿到目标群的 `chat_id` -如果这 4 个值齐了,就可以开始 `codexloop init` 并把 `Feishu chat id` 填进去。 +如果这 4 个值齐了,就可以开始 `argusbot init` 并把 `Feishu chat id` 填进去。 From e85d3c87cb2e339dfa9744040b4a26e81b9a5e90 Mon Sep 17 00:00:00 2001 From: Mowenhao13 <3611893928@qq.com> Date: Wed, 18 Mar 2026 11:34:56 +0800 Subject: [PATCH 7/7] fix: use runner_bin parameter instead of codex_bin in cli_app and cli --- codex_autoloop/apps/cli_app.py | 4 ++-- codex_autoloop/cli.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/codex_autoloop/apps/cli_app.py b/codex_autoloop/apps/cli_app.py index 75837cd..e1c7ca7 100644 --- a/codex_autoloop/apps/cli_app.py +++ b/codex_autoloop/apps/cli_app.py @@ -241,7 +241,7 @@ def reply_to_source(source: str, message: str) -> None: btw_agent = BtwAgent( runner=build_codex_runner( backend=args.runner_backend, - codex_bin=args.codex_bin, + runner_bin=args.runner_bin, config=copilot_proxy, ), config=BtwConfig( @@ -424,7 +424,7 @@ def on_control_command(command) -> None: event_sink = CompositeEventSink(sinks) runner = build_codex_runner( backend=args.runner_backend, - codex_bin=args.codex_bin, + runner_bin=args.runner_bin, config=copilot_proxy, event_callback=event_sink.handle_stream_line, ) diff --git a/codex_autoloop/cli.py b/codex_autoloop/cli.py index 376d109..315a3d7 100644 --- a/codex_autoloop/cli.py +++ b/codex_autoloop/cli.py @@ -88,8 +88,7 @@ def build_parser() -> argparse.ArgumentParser: ) parser.add_argument( "--runner-bin", - "--codex-bin", - dest="codex_bin", + dest="runner_bin", default=None, help="CLI binary path for the selected execution backend.", )