feat(agents): auto-wake idle/stopped agents on incoming message + visual state feedback
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Problem
Agents do not start automatically and must be manually started each session. When an agent is stopped or idle, sending a message to its DM/chat produces **no response and no visual feedback** — the user stares at a blank screen with no indication of why nothing is happening.
This creates two distinct UX failures:
1. **No auto-wake on message.** If a user sends a message to a stopped or idle agent, the agent should wake up and respond. Currently, the user must manually navigate to agent settings and start it before the conversation can begin.
2. **No visual state feedback.** When an agent is stopped or idle, there is no clear indicator in the chat view that explains the silence. The user has no way to distinguish "agent is processing" from "agent is off and will never respond."
## Proposed Behavior
- **Sleep/wake lifecycle:** If an agent has nothing to work on for a configurable idle period, it should transition to a "sleeping" state (freeing resources). When a message arrives in that agent's DM or a channel where it's mentioned, it should automatically wake and process the message.
- **Visual state indicator in chat:** The chat view should show the agent's current state (running, sleeping, stopped) so users know what to expect. A sleeping agent could show something like "Agent is sleeping — send a message to wake it up." A stopped agent could show "Agent is stopped — click to start."
- **Graceful startup on first message:** On a fresh session (app launch), agents that receive a message should auto-start without requiring the user to manually start them first.
## Current Workaround
Manually start the agent before every conversation. If the agent stops (due to idle timeout or session restart), manually restart it again.
## Related
- #1743 — Agent @mentions silently fail when mentioned agent is offline (same root cause, narrower scope)
- #5183 — Agent activity indicator misreads state after completed bursts (related visual feedback gap)
Contributor guide
Research direction
No files or tests are named. Start by reviewing #1743 and #5183, then map agent lifecycle, DM/channel mention handling, and chat state rendering; done means messages wake eligible agents and the chat clearly distinguishes running, sleeping, and stopped states.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100