Agent timeout handling #137
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Implement configurable timeout to automatically kill hanging or idle agents.
Problem
When running parallel dev agents, sometimes agents appear active but are actually stuck/idle:
Solution
Track agent activity and kill them after configurable idle time.
Configuration
Tracking
Track per active session:
Timeout Handling
now - last_activity > TASK_TIMEOUT_HOURS, kill agentkugetsu continue)Integration with Queue Daemon
The queue daemon should also handle timeout checking:
last_activityagainstTASK_TIMEOUT_HOURSImplementation Notes
ps aux | grep opencode | grep <worktree_path>to find processeskill <pid>to terminate"state": "timeout"Session State Values
Related Issues