Claude Code chats survive server restarts in a detachable host
A pipelines-claude-host process owns each claude -p CLI and its pipes, spools its stream-json output with offsets and serves a private Unix socket. The server detaches on shutdown and reattaches on start, replaying the spool to rebuild turns, approvals, questions, background tasks and the live model. Explicit close, idle release and CLI exit stop the host; a crashed host falls back to --resume with a notice.
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ def package(output, version, target):
|
||||
if system not in ("darwin", "linux") or arch not in ("arm64", "amd64"):
|
||||
raise ValueError("Supported: source, darwin-arm64/amd64, linux-arm64/amd64")
|
||||
env = dict(os.environ, GOOS=system, GOARCH=arch, CGO_ENABLED="0")
|
||||
for command, binary in (("pipelines-server", "pipelines-server"), ("pipelines-tui", "pipelines-tui"), ("pipelines", "pipelines")):
|
||||
for command, binary in (("pipelines-server", "pipelines-server"), ("pipelines-tui", "pipelines-tui"), ("pipelines", "pipelines"), ("pipelines-claude-host", "pipelines-claude-host")):
|
||||
subprocess.run(["go", "build", "-trimpath", "-o", str(binaries / binary), "./cmd/" + command],
|
||||
cwd=ROOT, env=env, check=True)
|
||||
(binaries / "platform.json").write_text(json.dumps({"os": "Darwin" if system == "darwin" else "Linux", "arch": "arm64" if arch == "arm64" and system == "darwin" else "aarch64" if arch == "arm64" else "x86_64"}))
|
||||
|
||||
Reference in New Issue
Block a user