Skip to content

Commit 7a21fe8

Browse files
committed
fix(v1.10.1): smooth-sail default — bump recursion_limit 25 → 100
Customer-demo setup caught the DEMO research agent returning `completed_empty` on a realistic 2-part query ("latest Claude + API pricing per million tokens"). Root cause: blueprint agents inherited the 25-default recursion_limit, which exhausts on research-heavy multi-step tool loops. - `tier1BlueprintToAgentPayload` (Tier 1 / `af agent init`): sets `recursion_limit: 100` on every create body - `blueprintToAgentSpecs` (Tier 3 / `af workforce init` slots): same - 100 is the server-side cap, verified via live agent update against the backend. Clears every reasonable research / content / multi- step prompt on first attempt - `af workforce runs get` and `runs stop` accept `--workforce-id` as an optional flag for parity with `runs list` — previously hit `cli_parse_error` when AI operators reached for it by analogy Verified on-box: the exact 2-part query that previously returned `completed_empty` at limit=25 now completes with cited pricing data (Claude Opus $25/$125 per M tokens) on first attempt at limit=100.
1 parent 66b8ef5 commit 7a21fe8

5 files changed

Lines changed: 25 additions & 1 deletion

File tree

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pixelml/agenticflow-cli",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"description": "AgenticFlow CLI for agent-native API operations.",
55
"license": "Apache-2.0",
66
"repository": {

packages/cli/src/cli/blueprint-to-agent.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ export function tier1BlueprintToAgentPayload(
150150
model,
151151
tools: [],
152152
plugins,
153+
// recursion_limit 100 (backend max) — PDCA rounds caught the 25-default
154+
// exhausting on multi-step research questions. Tier 1 agents are
155+
// tool-heavy by design (web_search → web_retrieval → synthesize), so
156+
// ship them with headroom. Every reasonable customer-demo prompt
157+
// converges well under 100 tool calls; 100 is the server-side cap.
158+
recursion_limit: 100,
153159
};
154160

155161
const pluginNames = plugins.map((p) => p.plugin_id).join(", ");

packages/cli/src/cli/blueprint-to-workforce.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ export function blueprintToAgentSpecs(
199199
model,
200200
description: `${slot.role} for "${blueprint.name}" workforce`,
201201
system_prompt: buildSystemPrompt(blueprint, slot),
202+
// Match Tier 1 — 100 is the server-side cap and the safe ceiling for
203+
// research/content/multi-step agents. Prevents the `completed_empty`
204+
// outcome on deeper investigations without any per-run tuning.
205+
recursion_limit: 100,
202206
};
203207
if (plugins.length > 0) body["plugins"] = plugins;
204208
return { slotKey: slot.role, slot, body };

packages/cli/src/cli/changelog.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ export interface ChangelogEntry {
1313
}
1414

1515
export const CHANGELOG: ChangelogEntry[] = [
16+
{
17+
version: "1.10.1",
18+
date: "2026-04-14",
19+
highlights: [
20+
"Blueprint agents ship with `recursion_limit: 100` by default (was 25). Customer-demo setup showed a 2-part research query hit recursion exhaustion at 25, returning `completed_empty` on first try. 100 is the server-side cap and clears every realistic multi-step investigation / research / content-create loop on first attempt. Applies to both Tier 1 (`af agent init --blueprint ...`) and Tier 3 workforce slots (`af workforce init --blueprint ...`)",
21+
"`af workforce runs get` and `runs stop` now accept `--workforce-id` as an optional flag for parity with `runs list` (the id was already accepted by the backend — this is purely an ergonomic CLI-flag fix so AI operators don't hit `cli_parse_error` when they reach for the same flag across subcommands)",
22+
],
23+
for_ai: [
24+
"If you patched an older agent's recursion_limit up to dodge `completed_empty`, you no longer need to — fresh `af agent init --blueprint` + `af workforce init --blueprint` deploys now bake in 100 by default",
25+
"On existing agents that still exhibit `completed_empty`: `af agent update --agent-id <id> --patch --body '{\"recursion_limit\":100}' --json` raises in place without replacing anything else",
26+
],
27+
},
1628
{
1729
version: "1.10.0",
1830
date: "2026-04-14",

packages/cli/src/cli/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6106,6 +6106,7 @@ export function createProgram(): Command {
61066106
.command("get")
61076107
.description("Get a single workforce run by ID.")
61086108
.requiredOption("--run-id <id>", "Run ID")
6109+
.option("--workforce-id <id>", "Workforce ID (accepted for parity with `runs list`; not required — runs are workspace-scoped)")
61096110
.option("--workspace-id <id>", "Workspace ID (overrides env)")
61106111
.action(async (opts) => {
61116112
const client = buildClient(program.opts());
@@ -6116,6 +6117,7 @@ export function createProgram(): Command {
61166117
.command("stop")
61176118
.description("Stop an in-flight workforce run.")
61186119
.requiredOption("--run-id <id>", "Run ID")
6120+
.option("--workforce-id <id>", "Workforce ID (accepted for parity; not required)")
61196121
.option("--workspace-id <id>", "Workspace ID (overrides env)")
61206122
.action(async (opts) => {
61216123
const client = buildClient(program.opts());

0 commit comments

Comments
 (0)