Skip to content

Commit 00c257c

Browse files
authored
Update runner.py
1 parent c620a62 commit 00c257c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎app/controller/runner.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from dataclasses import dataclass
2323
from typing import Any
2424

25-
from ..core.config import HarnessSettings, get_settings
25+
from ..core.config import HarnessSettings, conversation_workspace, get_settings
2626

2727

2828
@dataclass
@@ -103,6 +103,9 @@ def _command(self) -> list[str]:
103103
cmd += ["serve"]
104104
return cmd
105105

106+
def _workspace_dir(self, conversation_id: str) -> str:
107+
return str(conversation_workspace(conversation_id))
108+
106109
def _spawn(self, sandbox_id: str, meta: dict[str, Any]) -> subprocess.Popen:
107110
env = dict(os.environ)
108111
env.setdefault("PAW_NONINTERACTIVE", "1")
@@ -125,7 +128,7 @@ def create(self, user_id: str, conversation_id: str) -> str:
125128
meta = {
126129
"user_id": user_id,
127130
"conversation_id": conversation_id,
128-
"workspace": self._harness.cwd or os.getcwd(),
131+
"workspace": self._workspace_dir(conversation_id),
129132
"created_ts": time.time(),
130133
"last_used": time.time(),
131134
# per-process stderr tail (bounded); drained by one thread

0 commit comments

Comments
 (0)