File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed
Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -119,4 +119,4 @@ export const AGENT_NAME_TO_TYPES = Object.entries(AGENT_NAMES).reduce(
119119 { } as Record < string , string [ ] > ,
120120)
121121
122- export const MAX_AGENT_STEPS_DEFAULT = 40
122+ export const MAX_AGENT_STEPS_DEFAULT = 25
Original file line number Diff line number Diff line change 1+ import { MAX_AGENT_STEPS_DEFAULT } from '../constants/agents'
12import { z } from 'zod/v4'
23
34export const codebuffConfigFile = 'codebuff.json'
@@ -64,8 +65,6 @@ export const FileChangeHook = z
6465 } )
6566 . describe ( 'Defines a single file change hook.' )
6667
67- export const DEFAULT_MAX_AGENT_STEPS = 12
68-
6968export const CodebuffConfigSchema = z
7069 . object ( {
7170 description : z
@@ -83,7 +82,7 @@ export const CodebuffConfigSchema = z
8382 maxAgentSteps : z
8483 . number ( )
8584 . optional ( )
86- . default ( DEFAULT_MAX_AGENT_STEPS )
85+ . default ( MAX_AGENT_STEPS_DEFAULT )
8786 . describe (
8887 'Maximum number of turns agent will take before being forced to end' ,
8988 ) ,
Original file line number Diff line number Diff line change 1- import type { CodebuffConfig } from './constants'
1+ import { MAX_AGENT_STEPS_DEFAULT } from '../constants/agents'
2+ import { type CodebuffConfig } from './constants'
23
34export function getDefaultConfig ( ) : CodebuffConfig {
45 return {
56 description : '' ,
67 startupProcesses : [ ] ,
78 fileChangeHooks : [ ] ,
8- maxAgentSteps : 12 ,
9+ maxAgentSteps : MAX_AGENT_STEPS_DEFAULT ,
910 baseAgent : undefined ,
1011 spawnableAgents : undefined ,
1112 }
1213}
14+
Original file line number Diff line number Diff line change @@ -988,8 +988,10 @@ export class Client {
988988 } ,
989989 ] )
990990
991+ const codebuffConfig = loadCodebuffConfig ( )
992+
991993 this . sessionState . mainAgentState . stepsRemaining =
992- loadCodebuffConfig ( ) . maxAgentSteps
994+ codebuffConfig . maxAgentSteps
993995
994996 this . sessionState . fileContext . cwd = getWorkingDirectory ( )
995997 this . sessionState . fileContext . agentTemplates = await loadLocalAgents ( { } )
You can’t perform that action at this time.
0 commit comments