Skip to content

fix: correct docker workspace path in task prompt#401

Open
hobostay wants to merge 1 commit into
bytedance:mainfrom
hobostay:fix/docker-workspace-path-raw-string
Open

fix: correct docker workspace path in task prompt#401
hobostay wants to merge 1 commit into
bytedance:mainfrom
hobostay:fix/docker-workspace-path-raw-string

Conversation

@hobostay
Copy link
Copy Markdown

Summary

  • Fix raw string literal bug in trae_agent.py:133 where r"[Project root path]:\workspace\n\n" produced incorrect output

Problem

The raw string prefix r on line 133 caused two bugs:

  1. \n was NOT interpreted as newlines — producing literal \n characters in the prompt text sent to the LLM
  2. The workspace path used \workspace (backslash) instead of /workspace (forward slash), which is incorrect for Docker containers running Linux

Fix

Changed r"[Project root path]:\workspace\n\n" to "[Project root path]:/workspace\n\n"

Test plan

  • Run agent with docker config and verify the prompt contains proper newlines and /workspace path

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Test User seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants