fix: restart backend under systemd and use .sproutclaw agent dir
Restart via systemctl when running as a service, set SPROUTCLAW_CODING_AGENT_DIR for the RPC subprocess, and add a frontend poll timeout for failed restarts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -80,7 +80,7 @@ func NewClient(piCmd string, piArgs []string, repoRoot, agentDir string, onExit
|
||||
args := append(append([]string{}, piArgs...), "--mode", "rpc")
|
||||
cmd := exec.Command(piCmd, args...)
|
||||
cmd.Dir = repoRoot
|
||||
cmd.Env = append(os.Environ(), fmt.Sprintf("PI_CODING_AGENT_DIR=%s", agentDir))
|
||||
cmd.Env = append(os.Environ(), fmt.Sprintf("SPROUTCLAW_CODING_AGENT_DIR=%s", agentDir))
|
||||
|
||||
log.Printf("[sproutclaw-web] launching pi RPC: %s %s (cwd=%s)", piCmd, strings.Join(args, " "), repoRoot)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user