Preserve independent background sessions through owner shutdown and idle cleanup

This commit is contained in:
2026-11-07 16:23:20 +00:00
parent 4ead2abdbf
commit b15597662f
9 changed files with 360 additions and 51 deletions
+2 -3
View File
@@ -7,7 +7,6 @@ import (
"os"
"os/signal"
"syscall"
"time"
)
// Main is the detached bridge's command entry point.
@@ -15,8 +14,8 @@ func Main(args []string) int {
flags := flag.NewFlagSet("pipelines-codex-host", flag.ContinueOnError)
dir := flags.String("dir", "", "private per-server host directory")
upstream := flags.String("upstream", "", "existing Codex App Server Unix socket")
idle := flags.Duration("idle", 20*time.Minute, "exit after this long detached without pending interactions")
maxDetached := flags.Duration("max-detached", 24*time.Hour, "maximum detached lifetime, including pending interactions")
idle := flags.Duration("idle", 0, "optional detached idle expiry (0 keeps the upstream session connection)")
maxDetached := flags.Duration("max-detached", 0, "optional detached lifetime limit (0 keeps live sessions)")
if err := flags.Parse(args); err != nil {
return 2
}