From d429757967daf9022b8fd8fa737d6dc1db29982c Mon Sep 17 00:00:00 2001 From: GuDaStudio Date: Mon, 10 Nov 2025 18:42:33 +0800 Subject: [PATCH] =?UTF-8?q?v0.4.5=EF=BC=9A=E4=BF=AE=E5=A4=8DWindows?= =?UTF-8?q?=E4=B8=8B=E9=95=BF=E6=96=87=E6=9C=AC=E6=97=A0=E6=B3=95=E5=9B=9E?= =?UTF-8?q?=E7=AD=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/codexmcp/server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/codexmcp/server.py b/src/codexmcp/server.py index 20882e0..b400a73 100644 --- a/src/codexmcp/server.py +++ b/src/codexmcp/server.py @@ -119,7 +119,7 @@ async def codex( skip_git_repo_check: Annotated[ bool, "Allow codex running outside a Git repository (useful for one-off directories).", - ] = True, + ] = False, return_all_messages: Annotated[ bool, "Return all messages (e.g. reasoning, tool calls, etc.) from the codex session. Set to `False` by default, only the agent's final reply message is returned.", @@ -127,13 +127,15 @@ async def codex( ) -> Dict[str, Any]: """Execute a Codex CLI session and return the results.""" # Build command as list to avoid injection - cmd = ["codex", "exec", PROMPT, "--sandbox", sandbox, "--cd", str(cd), "--json"] + cmd = ["codex", "exec", "--sandbox", sandbox, "--cd", str(cd), "--json"] if skip_git_repo_check: cmd.append("--skip-git-repo-check") if SESSION_ID is not None: cmd.extend(["resume", str(SESSION_ID)]) + + cmd += ['--', PROMPT] all_messages: list[Dict[str, Any]] = [] agent_messages = ""