fix(acp): honor task cwd for foreground terminal commands

This commit is contained in:
Henkey 2026-05-01 09:57:43 +01:00 committed by Teknium
parent 550f6e2efc
commit b349ae1e4c
2 changed files with 78 additions and 3 deletions

View file

@ -2001,9 +2001,10 @@ def terminal_tool(
while retry_count <= max_retries:
try:
execute_kwargs = {"timeout": effective_timeout}
if workdir:
execute_kwargs["cwd"] = workdir
execute_kwargs = {
"timeout": effective_timeout,
"cwd": workdir or cwd,
}
result = env.execute(command, **execute_kwargs)
except Exception as e:
error_str = str(e).lower()