File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ export const FileChangeHook = z
6464 } )
6565 . describe ( 'Defines a single file change hook.' )
6666
67+ export const DEFAULT_MAX_AGENT_STEPS = 12
68+
6769export const CodebuffConfigSchema = z
6870 . object ( {
6971 description : z
@@ -81,7 +83,7 @@ export const CodebuffConfigSchema = z
8183 maxAgentSteps : z
8284 . number ( )
8385 . optional ( )
84- . default ( 12 )
86+ . default ( DEFAULT_MAX_AGENT_STEPS )
8587 . describe (
8688 'Maximum number of turns agent will take before being forced to end' ,
8789 ) ,
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ All notable changes to the @codebuff/sdk package will be documented in this file
1212
1313- Automatic parsing of ` knowledgeFiles ` if not provided
1414
15+ ### Fixed
16+
17+ - ` maxAgentSteps ` resets every run
18+
1519## [ 0.1.8] - 2025-08-13
1620
1721### Added
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111 type ServerAction ,
1212} from '../../common/src/actions'
1313import { API_KEY_ENV_VAR } from '../../common/src/constants'
14+ import { DEFAULT_MAX_AGENT_STEPS } from '../../common/src/json-config/constants'
1415
1516import type { AgentDefinition } from '../../common/src/templates/initial-agents-dir/types/agent-definition'
1617import type { PrintModeEvent } from '../../common/src/types/print-mode'
@@ -131,7 +132,7 @@ export class CodebuffClient {
131132 projectFiles,
132133 knowledgeFiles,
133134 agentDefinitions,
134- maxAgentSteps,
135+ maxAgentSteps = DEFAULT_MAX_AGENT_STEPS ,
135136 } : {
136137 agent : string
137138 prompt : string
@@ -154,6 +155,7 @@ export class CodebuffClient {
154155 projectFiles,
155156 maxAgentSteps,
156157 } )
158+ sessionState . mainAgentState . stepsRemaining = maxAgentSteps
157159 const toolResults = previousRun ?. toolResults ?? [ ]
158160 if ( handleEvent ) {
159161 this . promptIdToHandleEvent [ promptId ] = handleEvent
You can’t perform that action at this time.
0 commit comments