Skip to content

Confusing error message: max-turns not supported example contradicts the error #17995

Description

@benvillalobos

Bug

The compilation error for max-turns on the Copilot engine is self-contradictory. It tells you max-turns is not supported, then shows an example using max-turns:

max-turns not supported: engine 'copilot' does not support the max-turns feature.
Use engine: copilot or remove max-turns from your configuration. Example:
engine:
  id: copilot
  max-turns: 5
✗ compilation failed

Expected behavior

The error message should either:

  1. Not include max-turns in the example (if Copilot genuinely doesn't support it):

    max-turns not supported: engine 'copilot' does not support the max-turns feature.
    Remove max-turns from your configuration.
    
  2. Or, if the example is meant to show valid usage, make it clear that the example is the fix (though currently it looks identical to what would cause the error).

Reproduction

Add max-turns to a Copilot engine workflow and compile:

engine:
  id: copilot
  max-turns: 5
gh aw compile

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions