You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The check_task tool currently returns only status + last 200 chars of output for running tasks. A parent agent checking on a subagent sees "running" but has no idea if it is making progress or stalled. This makes it impossible for an autonomous system to detect and act on stuck subagents.
Proposed Solution
Extend TaskResult with three new fields for running tasks:
interfaceTaskResult{// ... existing fields ...stallDetected?: boolean// true if stall timeout exceededlastToolCalls?: {// last 3 tool callsname: string// tool name (e.g., "read", "edit")status: string// "running" | "completed" | "error"time: string// ISO timestamp when tool was invoked}[]lastActivity?: string// ISO timestamp of last meaningful stream event}
Data sources (all already exist in the codebase):
SessionStatus.get(sessionId) — busy/idle state
Session.messages({sessionID}) — message history with ToolPart entries that have state.time.start, state.time.end, state.status
This issue modifies the subagent monitoring system introduced by the async-tasks fork feature. Upon completion, update .fork-features/manifest.json entry async-tasks:
Motivation
The
check_tasktool currently returns onlystatus+ last 200 chars of output for running tasks. A parent agent checking on a subagent sees "running" but has no idea if it is making progress or stalled. This makes it impossible for an autonomous system to detect and act on stuck subagents.Proposed Solution
Extend
TaskResultwith three new fields for running tasks:Data sources (all already exist in the codebase):
SessionStatus.get(sessionId)— busy/idle stateSession.messages({sessionID})— message history withToolPartentries that havestate.time.start,state.time.end,state.statusImplementation approach:
checkSessionTask()(lines 87-91), when status is "busy", query the last 3-5 messages forToolPartentrieslastActivityfrom the stall detector metadata (or fall back to last message timestamp)Quality Gates (Non-Negotiable)
Acceptance Criteria
TaskResultinterface extended withstallDetected,lastToolCalls,lastActivitystallDetectedistruewhen the stall detector has fired for this sessionlastActivityreflects the timestamp of the last token or tool callDefinition of Done
Dependencies
stallDetectedfield populationFork Manifest Requirement
This issue modifies the subagent monitoring system introduced by the
async-tasksfork feature. Upon completion, update.fork-features/manifest.jsonentryasync-tasks:criticalCode: AddstallDetected,lastToolCalls,lastActivityabsorptionSignals: AddstallDetected,lastToolCalls,lastActivityThis ensures sync-time agents understand the visibility enhancement and can verify it survives upstream merges.