@@ -140,7 +140,7 @@ interface ActiveSession {
140140 acpSessionId : string ;
141141 acpConnection : InProcessAcpConnection ;
142142 clientConnection : ClientSideConnection ;
143- treeTracker : TreeTracker ;
143+ treeTracker : TreeTracker | null ;
144144 sseController : SseController | null ;
145145 deviceInfo : DeviceInfo ;
146146 logWriter : SessionLogWriter ;
@@ -510,12 +510,14 @@ export class AgentServer {
510510
511511 this . configureEnvironment ( ) ;
512512
513- const treeTracker = new TreeTracker ( {
514- repositoryPath : this . config . repositoryPath ,
515- taskId : payload . task_id ,
516- runId : payload . run_id ,
517- logger : new Logger ( { debug : true , prefix : "[TreeTracker]" } ) ,
518- } ) ;
513+ const treeTracker = this . config . repositoryPath
514+ ? new TreeTracker ( {
515+ repositoryPath : this . config . repositoryPath ,
516+ taskId : payload . task_id ,
517+ runId : payload . run_id ,
518+ logger : new Logger ( { debug : true , prefix : "[TreeTracker]" } ) ,
519+ } )
520+ : null ;
519521
520522 const posthogAPI = new PostHogAPIClient ( {
521523 apiUrl : this . config . apiUrl ,
@@ -594,7 +596,7 @@ export class AgentServer {
594596 }
595597
596598 const sessionResponse = await clientConnection . newSession ( {
597- cwd : this . config . repositoryPath ,
599+ cwd : this . config . repositoryPath ?? "/tmp/workspace" ,
598600 mcpServers : this . config . mcpServers ?? [ ] ,
599601 _meta : {
600602 sessionId : payload . run_id ,
0 commit comments