From b316a7f4627b94850faf8e37d8c7b5eb7a36ca6a Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 21 Apr 2026 19:34:58 +0800 Subject: [PATCH] fix: correct docker workspace path in task prompt The raw string literal `r"[Project root path]:\workspace\n\n"` had two bugs: 1. `\n` was not interpreted as newlines due to the `r` prefix, producing literal `\n` characters in the output 2. The workspace path used backslash `\workspace` instead of forward slash `/workspace`, which is incorrect for Docker containers running Linux Co-Authored-By: Claude Opus 4.7 --- trae_agent/agent/trae_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trae_agent/agent/trae_agent.py b/trae_agent/agent/trae_agent.py index c414117c..9ca38391 100644 --- a/trae_agent/agent/trae_agent.py +++ b/trae_agent/agent/trae_agent.py @@ -130,7 +130,7 @@ def new_task( self.project_path = extra_args.get("project_path", "") if self.docker_config: - user_message += r"[Project root path]:\workspace\n\n" + user_message += "[Project root path]:/workspace\n\n" else: user_message += f"[Project root path]:\n{self.project_path}\n\n"