Skip to content

Default CLAUDE_TIMEOUT_MINUTES=15 too short for complex stories #143

@LarsCowe

Description

@LarsCowe

Problem

When Ralph starts a complex story that requires significant codebase exploration, the default 15-minute timeout (CLAUDE_TIMEOUT_MINUTES=15) kills the Claude Code process mid-execution (exit code 124).

This is especially problematic for:

  • First loop on a new story (Claude needs to read many files to understand context)
  • Stories with broad scope (e.g., "Timezone Detection & Display")
  • Ultimate review mode where the review itself consumes part of the time budget

Reproduction

  1. Start Ralph on a story that touches multiple files/modules
  2. Claude begins exploring the codebase in loop [P0] mergeClaudeMd truncates user content after BMAD section #1
  3. After 15 minutes, the timeout command kills Claude (exit 124)
  4. Ralph logs show "stopped (exit 124)" with no progress

Suggestion

Increase default to 25-30 minutes

Modern Claude Code sessions with Opus regularly take 15-25 minutes on complex tasks. A 15-minute default causes premature termination on any non-trivial story.

Suggested default: CLAUDE_TIMEOUT_MINUTES=25

Consider adaptive timeouts

  • First loop on a new story: Allow extra time (1.5x-2x) since context loading is heavier
  • Subsequent loops with session continuity: Context is already loaded, so the default timeout is more appropriate
  • Review loops: These are typically shorter — could use a separate REVIEW_TIMEOUT_MINUTES setting

Better feedback on timeout

When exit code 124 occurs, Ralph should:

  1. Log clearly that a timeout happened (not just "stopped (exit 124)")
  2. Not count a timeout as "no progress" for the circuit breaker — it's a config issue, not stagnation
  3. Suggest increasing CLAUDE_TIMEOUT_MINUTES in the error message

Environment

  • bmalph version: 2.10.0
  • Platform: Windows 11 (bash via Git Bash)
  • Driver: claude-code
  • Model: Claude Opus 4.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions