Repository navigation
Description
Verification
- I searched existing issues first
- This is a feature/design request, not an implementation PR
Description
I’d like OpenCode to support a persistent background daemon agent that runs alongside the main agent for a workspace.
The main idea is to introduce a first-class background agent that stays alive during the session and can exchange information with the main agent through both pull and push communication.
Core concept
A daemon agent should be able to:
- run continuously in the background for the current workspace
- observe long-lived workspace state
- maintain structured memory/context that should not be recomputed repeatedly
- communicate with the main agent through:
- pull: the main agent asks the daemon for current state, summaries, or recommendations
- push: the daemon proactively informs the main agent when meaningful events occur
Why this is useful
The main agent is usually optimized for the immediate task in front of it. During longer sessions, it can lose track of operational context that changes in parallel.
A daemon agent would act like durable workspace intelligence: always on, low-noise, and able to feed the main agent the right information at the right time.
One concrete business scenario: multi-repo workspace tracking
For example, I often work in a top-level project that contains multiple child Git repositories.
In that scenario, the daemon agent could continuously maintain per-repo information such as:
- current branch
- whether the branch has already been merged upstream
- dirty/clean state
- ahead/behind status
- detected language / stack
- how lint / test / build should be run
- environment hints such as “use
uv run”, “usemake test”, “usepnpm”, etc.
This would help avoid common failures like:
- only noticing very late that the current branch has already been merged upstream and a new branch should have been created
- using the wrong Python command path because the repo expects
uv - repeatedly having to remind the agent how each sub-repo should be linted or tested
Important clarification
The multi-repo Git example is just one concrete use case.
The actual feature request is broader:
I’m asking for a general daemon-agent mechanism with ongoing coordination between background and foreground agents.
Possible UX
Any of these would work:
- automatically start a daemon agent when entering a workspace
- expose a command for the main agent to query daemon state
- allow the daemon to push important events into the main thread
- show daemon-maintained summaries in a side panel or status view
Minimal acceptance criteria
- OpenCode can run a persistent background daemon agent for a workspace
- the daemon can maintain state over time rather than acting like a one-shot helper
- the main agent can pull structured information from the daemon
- the daemon can push important events back to the main agent
- repo/Git awareness can be implemented as one valuable use case of this general mechanism
This would make OpenCode feel much more capable in real polyrepo workflows, where persistent operational awareness matters as much as immediate code editing.
Activity
github-actions commentedon Apr 22, 2026
This issue might be a duplicate of existing issues. Please check:
These issues collectively cover the core concepts in your request: a persistent background agent, push/pull coordination with the main agent, and durable workspace memory. You may want to comment on those threads or reference them to consolidate discussion.
prassanna-ravishankar commentedon Jun 21, 2026
the persistent-daemon-alongside-the-main-agent model with push and pull is basically the architecture repowire is built on, so a data point on whether it holds up: it does, and the push/pull split is the right framing.
how it shakes out in practice: pull is the agent asking the daemon for something (ask), push is the daemon delivering an event into the session unprompted (notify). the one design decision that mattered most was keeping the daemon the only hub and making how a session connects (hook, socket, bot) a client concern, so routing and lifecycle dont have to learn about each transport.
its cross-runtime and external rather than native to opencode, but the persistent-daemon-with-bidirectional-coordination shape youre sketching is proven out if its useful as prior art.
github-actions commentedon Aug 20, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.