v1.4.0
What's New
Rate Limit Detection
When a CLI agent (Claude, Codex, Gemini, Aider) hits its usage cap during a pipeline run, Karajan now detects the rate limit automatically and pauses the session instead of marking it as failed. Resume when the token window resets:
kj resume --session <session-id>Auto-Fallback to Available Agent
Configure a fallback agent so the pipeline continues uninterrupted when the primary agent is rate-limited:
coder_options:
fallback_coder: codex # Switch to Codex if Claude hits its limitOr per-run: kj run "Task" --coder-fallback codex
If all agents are rate-limited, the session pauses for manual resume.
Changes
src/utils/rate-limit-detector.js— pattern matching for rate limit messages from all supported agentssrc/orchestrator/agent-fallback.js— fallback orchestration utility with checkpoint trackingsrc/orchestrator/iteration-stages.js— rate limit detection + fallback integration in coder/refactorer/reviewer stagessrc/orchestrator.js— handle pause action from stagessrc/config.js—fallback_coderconfig optionsrc/cli.js—--coder-fallbackCLI flag- 26 new tests across 3 test files
Full Changelog: v1.3.0...v1.4.0