Two limits answer different questions
The maximum step setting controls how many turns the agent may take before it stops with a max-steps reason. A turn can include tool calls, so the count is not simply the number of visible messages or individual tools. Use this limit to keep a task bounded when the agent might otherwise continue exploring or revising.
The credit budget controls cost across the run, including tool costs reported to the agent. One limit does not replace the other: a run can reach its step cap while credits remain, or reach its spending threshold before using all possible turns. Set both according to the task's depth and acceptable cost.
Make a stopped run actionable
If a run stops at the step limit, review its report and identify the remaining concrete work. Continue with a focused prompt that supplies the conclusions already reached and asks for the next stage, rather than repeating the same broad request. If the task genuinely needs more turns, increase the step limit deliberately.
A higher limit does not correct a missing input, inaccessible source, or repeated tool error. Narrow the task, provide the needed context, or fix the failed dependency before continuing. This helps the additional turns produce new work instead of repeating an unproductive cycle.