Skip to main content

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

Parallel execution is perfect for comparing approaches quickly!

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:
View metadata:

Handling Failed Attempts

View Failure Reason

Common Failure Reasons

Issue: Agent generated invalid codeSolutions:
  • Retry with more specific instructions
  • Try different agent
  • Add example code in task description
Issue: Tests didn’t passSolutions:
  • Check test output in logs
  • Add “make tests pass” to description
  • Use --agent "test-aware" profile
Issue: Agent took too longSolutions:
  • Increase timeout: --timeout 600
  • Break task into smaller pieces
  • Use faster agent (Haiku, Flash)
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
Save expensive models for complex tasks

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

Keeps your workspace tidy

Advanced: Attempt Hooks

Run custom scripts on attempt events:
.forge/hooks.yaml

Troubleshooting

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
Error: “Worktree path already exists”Solution:
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