Skip to content

feat(agent): add stop/start to free cluster resources#3

Merged
dmitriyzhuk merged 1 commit into
mainfrom
feat/agent-stop-start
Jun 23, 2026
Merged

feat(agent): add stop/start to free cluster resources#3
dmitriyzhuk merged 1 commit into
mainfrom
feat/agent-stop-start

Conversation

@dmitriyzhuk

Copy link
Copy Markdown
Contributor

Restart only redeployed the pod, so there was no way to free a slot on a full cluster. Add a true Stop (cancel workflow + delete pod, keep the agent as stopped) and a paired Start (deploy a fresh pod).

Backend:

  • POST /agents/:id/stop and /agents/:id/start (Owner/Admin)
  • AgentDeployService.stopAgent() with deploy-tracker guard so the dying pod's Failed event can't flip the row to failed
  • reconciler ignores a stale Running event for a stopped/restarting agent
  • syncStatus skips stopped; updateStatus can clear workflowId via null

Admin UI:

  • Stop/Start in the agents table row dropdown
  • Stop/Start in the agent detail header (top-right) + a "stopped" chat overlay with a Start button

Restart only redeployed the pod, so there was no way to free a slot on
a full cluster. Add a true Stop (cancel workflow + delete pod, keep the
agent as `stopped`) and a paired Start (deploy a fresh pod).

Backend:
- POST /agents/:id/stop and /agents/:id/start (Owner/Admin)
- AgentDeployService.stopAgent() with deploy-tracker guard so the dying
  pod's Failed event can't flip the row to `failed`
- reconciler ignores a stale Running event for a stopped/restarting agent
- syncStatus skips `stopped`; updateStatus can clear workflowId via null

Admin UI:
- Stop/Start in the agents table row dropdown
- Stop/Start in the agent detail header (top-right) + a "stopped" chat
  overlay with a Start button

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dmitriyzhuk dmitriyzhuk merged commit 1069903 into main Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant