Skip to content

llm.ts: MAX_STEPS=25 hard cutoff with no partial-result preservation #30865

@LifetimeVip

Description

@LifetimeVip

Description

File: packages/core/src/session/runner/llm.ts:80,256-263

const MAX_STEPS = 25
// ...
for (let step = 0; step < MAX_STEPS; step++) {
  needsContinuation = yield* runTurn(input.sessionID, promotion)
  if (!needsContinuation) break
}
if (needsContinuation)
  return yield* new StepLimitExceededError({ sessionID: input.sessionID, limit: MAX_STEPS })

Hard 25-turn limit with zero graceful degradation. No partial-result summary, no continuation token, no way to extend. AI's half-finished edits, partial refactors, and uncommitted changes are abandoned mid-flight. The comment on L79 (// QUESTION: Did this exist previously, or did we add this limit? Does it make sense?) shows the author was unsure about this limit.

OpenCode version

v1.16.0 (commit 3cf1cef)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions