{"version":"2.1.247","anchor":"a-prompt-submit-hook-can-rename-the-session","canonical_anchor":"a-prompt-submit-hook-can-rename-the-session","heading":"A prompt-submit hook can rename the session","tier":"use","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.247\/e\/a-prompt-submit-hook-can-rename-the-session","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.247","markdown":"### A prompt-submit hook can rename the session\n\nA prompt-submit hook can now rename the current session and inject extra messages into the turn.\n\n**What**\n\nHooks that run when you submit a prompt can now hand back a session title, which Claude Code applies to the current session, along with extra user or attachment messages that get folded into the turn.\n\n**Details**\n\n- The title is applied from a record matched by the submission's uuid; if applying it fails, Claude Code logs `Failed to apply a folded prompt.submit session title` and continues with the turn.\n- Only the attachment and user messages from that record are passed on; the rest of the record is bookkeeping.\n- A submission is treated as still pending while it is drain-only, waiting on screening, or its screening result is stale.\n\n**Evidence**\n\n`Failed to apply a folded prompt.submit session title`\n\n- Area: Hooks\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}