{"version":"2.1.326","anchor":"workflow-agent-gains-sharedheadlength-option","canonical_anchor":"workflow-agent-gains-sharedheadlength-option","heading":"Workflow scripts can mark a shared prompt opening when starting an agent","tier":"use","area":"Workflows","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326\/e\/workflow-agent-gains-sharedheadlength-option","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326","markdown":"### Workflow scripts can mark a shared prompt opening when starting an agent\n\nThe workflow `agent()` call accepts a new `sharedHeadLength` option, and a bad value stops the agent from starting\n\n**Unclear.** Whether `sharedHeadLength` affects anything beyond the agent's label and preview is not stated.\n\n**What**\n\nA workflow is a script that tells Claude Code to start helper agents (subagents) and pass them prompts. Its `agent()` call now accepts a `sharedHeadLength` option: the number of characters at the start of the prompt that are shared with other agents, for example `head.length`.\n\n- `sharedHeadLength` must be a whole number, 0 or more. You can also leave it out.\n\n- Any other value makes Claude Code refuse to start that agent.\n\n- When it is set, Claude Code leaves the shared opening out of the agent's label and preview, so each agent shows the part of its prompt that is different.\n\n**Why**\n\nWorkflow authors who give many agents the same long opening can now get labels and previews that show what each agent is actually for. Check the value you pass, since a wrong one stops the agent from starting.\n\n- Area: Workflows\n- Names: `sharedHeadLength`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}