A technical deep dive into BB's operation, tools, and configuration options.
BB maintains context through a hierarchical objectives system:
- Conversation Goal: Set at start, provides overall context and purpose
- Statement Objectives: Generated for each user input, guides immediate tasks
- Turn Counter: Tracks progress within maximum allowed turns (default: 25)
BB employs a variety of tools for different operations:
- File Discovery: Uses
search_projectfor finding files,request_filesfor adding to conversation - Content Changes: Employs
search_and_replacefor precise changes,rewrite_filefor complete rewrites - Project Management: Uses
move_filesandrename_filesfor organization
Token usage directly affects operation costs:
- Conversation limit: 200,000 tokens total
- Cost increases with conversation length
- Each turn adds to the token count
- File content contributes to token usage
- Use conversation summaries for long sessions
- Start new conversations for distinct tasks
- Remove unnecessary files from context
- Break large tasks into focused conversations
BB can work in throw-away git branches for safe experimentation:
bb/task-description-timestamp
Example:
bb/update-readme-20240324
Benefits of using throw-away branches:
- Safe experimentation without affecting main code
- Easy to abandon changes if needed
- Can keep branches for reference
- No cleanup required
{
"api.maxTurns": 25 // Default value
}{
"api.toolConfigs.run_command.allowedCommands": [
"git branch",
"git checkout",
"ls",
"cd",
"pwd",
"mv",
"cp",
"mkdir",
"cat",
"find",
"grep",
"tree"
// ... and more
]
}Common causes:
- Whitespace or indentation differences
- Hidden characters
- Line ending variations
- Content changed by previous operations
Solution: This is normal behavior. BB will adjust and retry with modified patterns.
What's happening:
- BB making incremental changes
- Verifying each change
- Adjusting approach based on results
Solution: This is normal. Let BB complete its process unless it exceeds the turn limit.
Solutions:
- Use the conversation summary tool
- Start a new conversation
- Remove unnecessary files
- Break task into smaller parts