You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: deprecate max-turns and move timeout-minutes to YAML job property (#138)
- max-turns was specific to Claude Code and is not supported by Copilot CLI.
It is now ignored at compile time with a deprecation warning. Front matter
parsing is preserved for backwards compatibility.
- timeout-minutes no longer emits --max-timeout CLI arg. Instead it generates
timeoutInMinutes on the PerformAgenticTask job in both standalone and 1ES
templates.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+10-17Lines changed: 10 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,6 @@ target: standalone # Optional: "standalone" (default) or "1es". See Target Platf
104
104
engine: claude-opus-4.5 # AI engine to use. Defaults to claude-opus-4.5. Other options include claude-sonnet-4.5, gpt-5.2-codex, gemini-3-pro-preview, etc.
105
105
# engine: # Alternative object format (with additional options)
106
106
# model: claude-opus-4.5
107
-
# max-turns: 50
108
107
# timeout-minutes: 30
109
108
schedule: daily around 14:00 # Fuzzy schedule syntax - see Schedule Syntax section below
110
109
# schedule: # Alternative object format (with branch filtering)
@@ -296,7 +295,6 @@ engine: claude-opus-4.5
296
295
# Object format with additional options
297
296
engine:
298
297
model: claude-opus-4.5
299
-
max-turns: 50
300
298
timeout-minutes: 30
301
299
```
302
300
@@ -305,28 +303,19 @@ engine:
305
303
| Field | Type | Default | Description |
306
304
|-------|------|---------|-------------|
307
305
| `model` | string | `claude-opus-4.5` | AI model to use. Options include `claude-sonnet-4.5`, `gpt-5.2-codex`, `gemini-3-pro-preview`, etc. |
308
-
| `max-turns` | integer | *(none)* | Maximum number of agentic turns (tool-use iterations) the model is allowed per run. Maps to the `--max-turns` Copilot CLI argument. Use this to cap compute and prevent runaway loops. |
309
-
| `timeout-minutes` | integer | *(none)* | Maximum time in minutes the agent workflow is allowed to run. Maps to the `--max-timeout` Copilot CLI argument. Use this to cap long-running agent sessions. |
306
+
| `timeout-minutes` | integer | *(none)* | Maximum time in minutes the agent job is allowed to run. Sets `timeoutInMinutes` on the `PerformAgenticTask` job in the generated pipeline. |
310
307
311
-
#### `max-turns`
312
-
313
-
Each "turn" is one iteration of the model calling a tool and receiving its output. Setting `max-turns` places an upper bound on how many such iterations the agent can perform in a single pipeline run. This is useful for:
314
-
315
-
- **Cost control** — limiting expensive model invocations.
316
-
- **Safety** — preventing infinite loops where the agent repeatedly calls tools without converging on a result.
317
-
- **Predictability** — ensuring the pipeline completes within a reasonable time frame.
318
-
319
-
When omitted, the Copilot CLI uses its built-in default. When set, the compiler emits `--max-turns <value>` in the generated pipeline's copilot params.
308
+
> **Deprecated:** `max-turns` is still accepted in front matter for backwards compatibility but is ignored at compile time (a warning is emitted). It was specific to Claude Code and is not supported by Copilot CLI.
320
309
321
310
#### `timeout-minutes`
322
311
323
-
The `timeout-minutes` field sets a wall-clock limit (in minutes) for the entire agent session. It maps to the `--max-timeout` Copilot CLI argument. This is useful for:
312
+
The `timeout-minutes` field sets a wall-clock limit (in minutes) for the entire agent job. It maps to the Azure DevOps `timeoutInMinutes` job property on `PerformAgenticTask`. This is useful for:
324
313
325
314
- **Budget enforcement** — hard-capping the total runtime of an agent to control compute costs.
326
315
- **Pipeline hygiene** — preventing agents from occupying a runner indefinitely if they stall or enter long retry loops.
327
316
- **SLA compliance** — ensuring scheduled agents complete within a known window.
328
317
329
-
When omitted, the Copilot CLI uses its built-in default. When set, the compiler emits `--max-timeout <value>` in the generated pipeline's copilot params.
318
+
When omitted, Azure DevOps uses its default job timeout (60 minutes). When set, the compiler emits `timeoutInMinutes:<value>` on the agentic job.
330
319
331
320
### Tools Configuration
332
321
@@ -482,8 +471,6 @@ Should be replaced with the human-readable name from the front matter (e.g., "Da
482
471
483
472
Additional params provided to agency CLI. The compiler generates:
484
473
- `--model <model>` - AI model from `engine` front matter field (default: claude-opus-4.5)
485
-
- `--max-turns <n>`- Maximum agentic turns from `engine.max-turns` (omitted when not set)
486
-
- `--max-timeout <n>`- Workflow timeout in minutes from `engine.timeout-minutes` (omitted when not set)
487
474
- `--disable-builtin-mcps`- Disables all built-in MCPs initially
@@ -544,6 +531,12 @@ Generates a `dependsOn: SetupJob` clause for `PerformAgenticTask` if a setup job
544
531
545
532
If no setup job is configured, this is replaced with an empty string.
546
533
534
+
## {{ job_timeout }}
535
+
536
+
Generates a `timeoutInMinutes: <value>` job property for `PerformAgenticTask` when `engine.timeout-minutes` is configured. This sets the Azure DevOps job-level timeout for the agentic task.
537
+
538
+
If `timeout-minutes` is not configured, this is replaced with an empty string.
539
+
547
540
## {{ working_directory }}
548
541
549
542
Should be replaced with the appropriate working directory based on the effective workspace setting.
0 commit comments