-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
ai/llmAI workflows, agents, promptsAI workflows, agents, promptsbugSomething isn't workingSomething isn't working
Description
Summary
Loop sessions block indefinitely when Claude Code skills produce interactive prompts that require user input, but no user is present in automated mode.
Problem / Context
During the second agent test, the loop got stuck twice:
- Planning session:
superpowers:writing-plansskill outputs "Two execution options: 1. Subagent-Driven (this session) 2. Parallel Session (separate). Which approach?" — waits for user response - Finish phase:
superpowers:finishing-a-development-branchskill outputs "What would you like to do?" with merge/PR/cleanup options — waits for user response
Both prompts block the automated loop because Claude Code waits for stdin input that never comes.
Related to #93 (spec-aware skill injection engine).
Root Cause
- Skills loaded via Claude Code's skill system can contain interactive prompts
RALPH_AUTOMATED=1env var is set but skills don't check it- The loop has no timeout mechanism to detect and recover from blocked sessions
- No mechanism to control which skills are available to loop sessions
Proposed Solution
Short-term (P0):
- Add
--allowedToolsor skill blocklist toclaude -pinvocation in feature-loop.sh - Or: add CLAUDE.md instruction for the target project: "When RALPH_AUTOMATED=1, never invoke interactive skills"
Medium-term (P1, relates to #93):
- Implement skill injection engine that controls which skills are available per phase
- Planning phase: allow
writing-plansbut with--no-interactivemode - Implementation phase: allow
test-driven-developmentonly - PR phase: no skills needed
Long-term:
- Claude Code session timeout mechanism in feature-loop.sh
- Detect stalled sessions (no tool calls for N minutes) and kill/restart
Files to Modify
| File | Changes |
|---|---|
src/agent/tools/execution.ts |
Add skill control flags to claude invocation |
| Ralph prompt templates | Add RALPH_AUTOMATED awareness instructions |
Acceptance Criteria
- Loop sessions don't block on interactive skill prompts
- Planning phase completes without "Which approach?" blocking
- PR/finish phase completes without "What would you like to do?" blocking
- Automated sessions skip or auto-answer interactive prompts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ai/llmAI workflows, agents, promptsAI workflows, agents, promptsbugSomething isn't workingSomething isn't working