Open
Conversation
Add setWaiting, resume, and getWaitingForUser methods to TaskQueue. Update dequeue, listActive, cancel, and resetStale queries to handle the new waiting_user status. This is the foundation for long-lived streaming sessions where tasks can pause waiting for user input. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add StreamEvent, StreamingSession types to runner.ts. Add resumeSessionId to RunOptions and sessionId to RunResult. Add buildStreamingArgs method to ClaudeRunner (with --input-format stream-json, without --disallowed-tools AskUserQuestion). Update buildArgs and run() to support session resume and capture session_id from result messages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add runStreaming() method to ClaudeRunner that spawns Claude with stdin pipe for bidirectional communication. Parses stream-json events, detects AskUserQuestion tool_use blocks to emit ask_user StreamEvents, captures session_id from system/result messages, and returns a StreamingSession handle with sendMessage(), kill(), sessionId, and done promise. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a user has a streaming session waiting for input (waiting_user status), intercept their next message before any parsing and route it directly to the session's stdin. This enables the conversational flow where Claude asks a follow-up question and the user replies naturally. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After a cron task completes successfully, check if it created a PR and whether CI passed. If CI failed, resume the session and retry up to 3 times, waiting for CI between attempts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reconcile PR #20 (parallel tasks) with waiting_user blocking. Only block dequeuing from repos that have a waiting_user task (live session waiting for input), not from repos with running tasks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d3195ca to
d08f8da
Compare
- Show waiting_user tasks in handleListTasks display - Add updateResult() to queue for CI retry updates (avoids overwriting completed_at on already-completed tasks) - Wrap sendMessage stdin write in try/catch for closed pipe safety - Simplify setWaiting() signature (remove redundant status param) - Add waiting_user to repoBreakdown in metrics() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
waiting_usertask status for tasks blocked on user inputSessionManager— routes user replies back to waiting Claude sessions--resumesupportChanges
src/runner.tsStreamEvent,StreamingSessiontypes,resumeSessionIdto RunOptions,sessionIdto RunResultsrc/runners/claude.tsbuildStreamingArgs()(enables AskUserQuestion, adds--input-format stream-json),runStreaming()with bidirectional stdin/stdoutsrc/queue.tswaiting_userstatus,setWaiting(),resume(),getWaitingForUser(),setSessionId(),sessionIdcolumnsrc/session-manager.tssrc/worker.tscheckRecentPR()helper, autonomous CI retry loop for cron taskssrc/handlers.tssrc/index.tsTest plan
waiting_usertransitions, resume, dequeue blocking, cancel, resetStale, stats (9 tests)sessionIdtracking (2 tests)Closes #21
🤖 Generated with Claude Code