Skip to content

[Question] Should /monitor, /agent, bridges survive REPL exit? #68

@mxh1999

Description

@mxh1999

Hi, following up on #44 — after the prompts/ refactor I started looking at direction (3) "stronger autonomy on /monitor /worker /agent" and noticed a lifecycle question I'd like to align on before writing any code.

Several features feel like "always-on background services" to users, but they run as daemon threads inside the REPL process, so closing the REPL kills them silently:

  • /monitor subscribe ... --schedule daily --telegram then /exit → scheduler thread dies; daily digest never arrives until REPL is reopened
  • /agent start paper_writer over SSH, connection drops → agent_runner thread dies; in-memory AgentState.messages is lost (only iteration summaries survive in ~/.cheetahclaws/agents/<name>/log.jsonl)
  • /telegram <token> <chat_id> then close laptop → bot stops responding to phone messages
  • /proactive 5m then /exit → sentinel dies

tmux / nohup workarounds exist but I'm not sure the "personal AI assistant" positioning can assume users know to use them.

The good news is most of the daemon-shaped infrastructure is already there — session_store.py (SQLite + FTS5), health.py (/healthz /readyz /metrics), jobs.py, monitor/scheduler.py, quota.py, circuit_breaker.py. The gap looks like just the process model.

Two questions before I draft anything:

  1. Is this a real product issue you want to address in the next few months, or is "REPL is everything" intentional for now?
  2. If we should solve it, does the (still in progress) web UI direction prefer a headless cheetahclaws serve that REPL/web/bridges all connect to (opencode-style), or a detached daemon process that owns the long-running services with REPL staying a CLI client?

Happy to write up a phased plan once direction is clear.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions