senpi-task: run process children as sessions of the shared daemon + `omo daemon` CLI + launch spec

Author: code-yeongyuCreated Sep 17, 2026Updated Sep 17, 2026

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|handoff CLI 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|handoff present
  • 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 daemon command
  • 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|handoff CLI
  • 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)

Source: code-yeongyu/oh-my-openagent