Retain Codex interaction callbacks across server restarts

This commit is contained in:
2026-11-05 14:32:59 +00:00
parent c7e57973a0
commit c2a8f5ff16
20 changed files with 1356 additions and 18 deletions
+10
View File
@@ -0,0 +1,10 @@
// Command pipelines-codex-host retains the existing Codex App Server connection
// across Pipelines server restarts. The server starts it automatically.
package main
import (
"git.a-wan.net/alan/pipelines/internal/codexhost"
"os"
)
func main() { os.Exit(codexhost.Main(os.Args[1:])) }
+4 -1
View File
@@ -14,6 +14,7 @@ import (
"git.a-wan.net/alan/pipelines/internal/buildinfo"
"git.a-wan.net/alan/pipelines/internal/claude"
"git.a-wan.net/alan/pipelines/internal/codex"
"git.a-wan.net/alan/pipelines/internal/discovery"
"git.a-wan.net/alan/pipelines/internal/opencode"
"git.a-wan.net/alan/pipelines/internal/paths"
@@ -150,8 +151,10 @@ func main() {
// One manager routes each chat to its owning harness. OpenCode remains the
// default; Codex is attached when its app-server control socket is present.
// Claude Code chats run in detachable hosts scoped to this database, so a
// restart does not end them (internal/claudehost).
// restart does not end them (internal/claudehost). Codex hosts retain its
// original App Server connection so pending interactions remain answerable.
claude.ConfigureHosts(claude.DefaultHostDir(*db))
codex.ConfigureHosts(codex.DefaultHostDir(*db))
chats := server.NewChatManager(ctx, options.Chat, store)
if len(chats.Backends()) > 0 {
options.Chat = chats