{"version":"2.1.286","anchor":"composer-gains-composedfromownwordsonly-and-a-promptcompose","canonical_anchor":"composer-gains-composedfromownwordsonly-and-a-promptcompose","heading":"Plugin hooks gain a prompt.compose method and an asUser option on submit","tier":"use","area":"Plugins","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.286\/e\/composer-gains-composedfromownwordsonly-and-a-promptcompose","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.286","markdown":"### Plugin hooks gain a prompt.compose method and an asUser option on submit\n\nPlugin hooks can now call a new prompt.compose method, and prompt.submit now accepts an asUser option that must be true or false\n\n**Unclear.** It is not known what uses `prompt.compose` or whether it is switched on for anyone.\n\n**What**\n\nHooks are pieces of code that plugins run at set points in Claude Code. The part of the hooks system that works with prompts has these changes:\n\n- A new `prompt.compose` method, which takes the facts to compose a prompt from\n\n- `prompt.submit` now accepts an `asUser` option, and rejects it with an error unless it is true or false\n\n- `prompt.compose` joins the list of hook categories that already includes `prompt.section` and `prompt.context`\n\nWhen replying in a thread, Claude Code also now passes along a flag noting whether a message was composed only from the user's own words.\n\n**Why**\n\nThis gives plugins a new point where they can take part in putting a prompt together.\n\n- Area: Plugins\n- Names: `prompt.compose`, `asUser`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}