{"version":"2.1.337","anchor":"workflowagent-tool-new-validation-error-and-workflow-rej","canonical_anchor":"workflowagent-tool-new-validation-error-and-workflow-rej","heading":"Scripted agent starts now explain their input limits when they fail","tier":"notice","area":"Workflows","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337\/e\/workflowagent-tool-new-validation-error-and-workflow-rej","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337","markdown":"### Scripted agent starts now explain their input limits when they fail\n\nA scripted agent() call with invalid input now fails with an error listing the limits, and workflow() tells you to use agent() instead\n\n**Unclear.** It is not clear which sessions offer agent() and workflow(), or whether ordinary users can reach them.\n\n**What**\n\nClaude Code has a scripted way to start agents (separate helper sessions that each work on a task) by calling `agent()`. When the input given to `agent()` is not valid, it now stops with an error that spells out what the session accepts:\n\n- `disallowedTools`: tool names only, 512 at most\n\n- `model`: a model id\n\n- a schema: 262,144 characters at most\n\n- an agent type: 4,096 characters at most\n\n- a bash command clamp: not accepted in this session\n\nA call to `workflow()` in the same session is turned away with: \"workflow() can't be used in this session. Start the agents with agent().\"\n\n**Why**\n\nWhen a scripted agent fails to start, the error now says which limit was broken.\n\n- Area: Workflows\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}