senpi-task: run process children as sessions of the shared daemon + `omo daemon` CLI + launch spec
Summary
Unify omo's task execution on POSIX by making every process-mode child a session of the shared daemon (not a separate OS process). Introduces:
- RpcHostRunner for senpi-task: children = daemon sessions
- Per-session self-gating: omo plugin reads sessionContext.role
- Plugin launch spec (daemon-launch-spec.json)
omo daemon run|attach|status|stop|handoffCLI wrapper- BUILD_EPOCH define in compile paths (CalVer ordinal tiebreaker)
- Curated read-only agents stay in-process
- Windows: per-child runner unchanged
This closes the gap where omo-started subagents are hidden from the shared daemon.
Reproduction
Start omo-ai with a task that spawns a child. The child becomes an OS process today. Upgrade the daemon while children are running; they are killed and reconnect.
Expected (ideal state)
- task.default_execution_mode defaults to
process(host session) on POSIX when daemon advertises required capabilities - Task children are daemon sessions
- Records carry host_session metadata
- Parent shutdown detaches gracefully; resume reattaches
- omo plugin's self-gating reads sessionContext.role
omo daemon run|attach|status|stop|handoffpresent- BUILD_EPOCH define in all compile paths
- Daemon visibility: list_sessions { include_workers: true } shows omo children
Actual
- Every omo task child is a separate OS process
- Daemon is only reached by omo CLI and desktop
- No plugin launch spec
- No
omo daemoncommand - No BUILD_EPOCH in omo binaries
Evidence
Plan-derived (file:line citations in the sections above); the execution evidence is held locally and summarized in the PR bodies.
Root cause
The task runner was written before the daemon model solidified. Each component grew its own daemon logic.
Scope + acceptance
MUST HAVE:
- RpcHostRunner class in packages/senpi-task
- Records include host_session { socket, routing_id, session_path, instance_id }
- Plugin self-gating based on sessionContext.role
- plugin/daemon-launch-spec.json produced at plugin build
omo daemon run|attach|status|stop|handoffCLI- BUILD_EPOCH define in all compile paths
- include_workers propagated for test awareness
Related
Related in this repo: #7459 (shared-host TUI regressions - risk for omo daemon attach), #7516 (interactive sessions under the shared host lost extension tools, closed).
Cluster (shared-daemon plan)
- code-yeongyu/senpi#1782 (https://github.com/code-yeongyu/senpi/issues/1782)
- code-yeongyu/omo-desktop-app#748 (https://github.com/code-yeongyu/omo-desktop-app/issues/748)
Source: code-yeongyu/oh-my-openagent