Commit Graph

17 Commits

Author SHA1 Message Date
alan 08b247de68 Document durable background recovery and legacy replay limits 2026-11-07 16:42:55 +00:00
alan b15597662f Preserve independent background sessions through owner shutdown and idle cleanup 2026-11-07 16:23:20 +00:00
alan 1a0f999fb1 Show prompts delivered into the running reply distinctly 2026-11-07 01:42:48 +00:00
alan 1e886faa41 Complete the Codex host initialization handshake once 2026-11-05 15:49:44 +00:00
alan c2a8f5ff16 Retain Codex interaction callbacks across server restarts 2026-11-05 14:32:59 +00:00
alan a627b38ef3 Merge main; use the shared chatShutdownDetacher for OpenCode and Codex
OpenCode and Codex chats implement Detach (called by chatManager.Close)
instead of a parallel DetachSessions interface. Docs follow the Claude Code
host and the systemd KillMode=process unit. The opt-in live restart check
copies only the stage provider's login row into its scratch OpenCode
database, builds the CLI for skill install and removes its scratch tree.
2026-11-04 16:24:17 +00:00
alan aa8eddd686 Keep OpenCode/Codex chat and stage sessions running across server restarts
A stopping server no longer interrupts harness sessions. Runs are canceled
with a shutdown cause, so stage clients leave admitted sessions running and
owned; start-up recovery re-adopts live OpenCode V2 stage sessions (wait,
read back the result, continue the graph), restarts unadmitted visits,
continues runs between stages, and falls back to interrupted with a reason
when the harness is gone. Chats with live work are recorded on shutdown and
reattached on start; turns that ended during the downtime are folded in
from history. The server-spawned V2 chat serve is now a detached owned
service. PIPELINES_SHUTDOWN_SESSIONS=stop restores the old behaviour.
2026-11-04 16:17:08 +00:00
alan 6b22389cae Merge: Claude Code chats survive server restarts via a detachable host 2026-11-04 16:15:06 +00:00
alan c810437aa5 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.
2026-11-04 16:09:56 +00:00
alan 1b98877d88 Chat list activity: turn running and background tasks on every row, pushed to every connection
chat_sessions rows carry activity (turn_running, background_tasks, seq) from
the hub's own state, and chat_activity is pushed to every connection when a
session's turn starts or ends or its running background-task count changes.
A room whose last viewer left stays observed while background tasks run,
bounded by the unattended limits; a Claude Code process exit ends its tasks.
2026-11-03 19:45:43 +00:00
alan ad4233f7b8 Chat: /new continues the same chat on a fresh session
The composer's /new used to create a separate chat. It now sends
chat_new_session. The server starts a fresh native session on the chat's
own harness (OpenCode, Codex or Claude Code) and re-keys the
operator_sessions row in one transaction. The chat keeps its title,
directory, backend, colour, star, model and mode. The old row is kept
unlisted with replaced_by, and its native session stays resumable.

The reply and the chat_session_changed push carry previous_id, so every
client swaps the row in place and an open conversation follows it to the
fresh, empty transcript with a notice.
2026-11-03 14:06:44 +00:00
alan 0acd7346bb feat(chat): add Claude Code chat backend 2026-10-22 18:20:10 +01:00
alan 03a508fa2b fix(codex): load persisted threads only on explicit send after refusal 2026-10-20 18:46:17 +01:00
alan d564765ca5 fix(codex): reconcile cold connections without resuming queued goals 2026-10-20 18:33:20 +01:00
alan 855de19a35 test(chat): require interactive tool parity across advertised harnesses 2026-10-20 18:12:59 +01:00
alan 35329e4022 feat(chat): broker Codex approvals and complete typed tool interactions 2026-10-20 17:41:35 +01:00
alan f7a3a49f94 chat: add the Codex backend
Store a chat's harness with its operator session, expose chat_backends and a
backend choice in New chat, and route each session through a manager. The Codex
adapter uses the App Server's Unix WebSocket for threads, turns, history,
questions and interrupt; OpenCode remains the default and Claude is not
advertised until its sidecar and login are wired.
2026-10-20 12:10:39 +01:00