Overview
Each Forge task can have multiple attempts - different executions with different AI agents, prompts, or approaches. This is Forge’s superpower: experiment until you find what works!What Are Attempts?
An attempt is a single execution of a task by an AI coding agent in an isolated Git worktree.Each attempt runs in complete isolation - no conflicts, no mess!
Creating Attempts
First Attempt (via UI)
1
Create Task
Create a task in Forge with title and description
2
Click 'Start Task'
Click the task card → Start Task button
3
Choose Agent
Select your AI coding agent (Claude, Gemini, etc.)
4
Monitor Progress
Watch real-time logs as the agent works
Additional Attempts (via CLI)
Via MCP
Attempt Lifecycle
Status Explained
Running Attempts
Sequential Execution
Parallel Execution
Monitoring Attempts
View Attempt Status
Real-Time Logs
Web UI Monitoring
The Forge UI shows live progress:- Current file being edited
- Lines added/removed
- Test results (if running)
- Agent’s thinking process
Comparing Attempts
See Comparing Results for detailed guide. Quick comparison:Specialized Agent Profiles
Use the same task with different “personas”:Test Writer
Security Expert
Performance Optimizer
Documentation Writer
Specialized agents are just different system prompts applied to the base LLM!
Attempt Metadata
Each attempt stores:Handling Failed Attempts
View Failure Reason
Common Failure Reasons
Syntax Errors
Syntax Errors
Issue: Agent generated invalid codeSolutions:
- Retry with more specific instructions
- Try different agent
- Add example code in task description
Test Failures
Test Failures
Issue: Tests didn’t passSolutions:
- Check test output in logs
- Add “make tests pass” to description
- Use
--agent "test-aware"profile
Timeout
Timeout
Issue: Agent took too longSolutions:
- Increase timeout:
--timeout 600 - Break task into smaller pieces
- Use faster agent (Haiku, Flash)
API Errors
API Errors
Issue: LLM API failedSolutions:
- Check API key is valid
- Verify rate limits
- Check network connectivity
- Retry after a few minutes
Retry Failed Attempt
Cost Tracking
View Attempt Costs
Cost Optimization Strategies
Start Cheap
Use fast, cheap models first:
- Gemini Flash (free tier!)
- Claude Haiku
- GPT-3.5 Turbo
Cancel Bad Attempts
If agent is going wrong direction, cancel early:Saves tokens and money
Reuse Good Results
Once you find an approach that works, save it as a template:
Track Spending
Monitor total costs:Set budgets per project
Attempt Best Practices
1
Start with One Agent
Don’t create 5 attempts immediately. Start with your preferred agent (Claude or Gemini)
2
Review Before More Attempts
If first attempt is close but not perfect, fork it with specific feedback rather than starting fresh
3
Use Different Agents for Different Strengths
- Claude: Complex logic, architecture
- Gemini: Fast iterations, simple tasks
- Cursor: UI/UX focused work
- Local models: Privacy-sensitive work
4
Clean Up Rejected Attempts
Advanced: Attempt Hooks
Run custom scripts on attempt events:.forge/hooks.yaml
Troubleshooting
Can't start new attempt
Can't start new attempt
Error: “Maximum attempts reached for task”Solution:
- Default limit is 10 attempts per task
- Clean up old attempts:
forge task cleanup 1 - Or increase limit:
forge config set max-attempts 20
Worktree conflicts
Worktree conflicts
Error: “Worktree path already exists”Solution:
Attempt stuck in 'Running'
Attempt stuck in 'Running'
Issue: Attempt shows running but nothing happeningSolution:
Next Steps
Comparing Results
Learn to compare attempt outputs
Merging & Cleanup
Merge approved attempts to main branch
Specialized Agents
Create custom agent profiles
Git Worktrees
Deep dive into isolation strategy

