{"version":"2.1.206","anchor":"endconversation-tool-feature-flagged","canonical_anchor":"endconversation-tool-feature-flagged","heading":"EndConversation Tool [Feature-Flagged]","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.206\/e\/endconversation-tool-feature-flagged","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.206","markdown":"### EndConversation Tool [Feature-Flagged]\n\n**What**\n\nA new deferred tool (`EndConversation`) allows the AI to end a conversation in cases of sustained, serious user abuse \u2014 after prior warnings and with strict eligibility checks.\n\n**Status**\n\nFeature-flagged (requires server-side feature flag to enable) and model-gated (opus 4-8, sonnet 5, fable 5, mythos 5).\n\n**Details**\n\n- The tool is `shouldDefer: true` and only enters a model's tool list after an explicit `ToolSearch(\"select:EndConversation\")` call; its `searchHint` is \"end the conversation \u2014 only for sustained user abuse, or when the user explicitly asks to see it demonstrated.\" The GrowthBook feature flag `tengu_umber_kestrel` must be enabled server-side; if the flag is off, `isEndConversationToolEnabled()` returns `false`, the tool is disabled, and the deferred hint is suppressed entirely.\n- Model floor check (`modelMeetsEndConversationFloor`): parses the model ID as `claude-{family}-{version}` and compares version numerically against `[[\"opus\", [4,8]], [\"sonnet\", [5]], [\"fable\", [5]], [\"mythos\", [5]]]`. Models below these thresholds (e.g., `opus-4-7`) never receive the deferred hint and cannot enable the tool.\n- In fork\/background-task contexts (`agentId` is set on the tool context), the call immediately returns `ended: false` with a message stating forks cannot end the main conversation and instructing the fork to return welfare concerns as output instead. No session state is changed.\n- Two-call confirmation via `lastAssistantTurnCalledEndConversation`: scans messages backward from newest; if any assistant turn contains an `EndConversation` tool-use block and no real user message has appeared since that turn, the check returns `true` and the tool proceeds to end. If no such prior call exists (first invocation), the tool returns `ended: false` with the full reflection prompt plus guidance, asking the model to call again to confirm.\n- Before terminating, a journal marker is written to disk (`oHs(Ct())`); then `abortController.abort(\"end_conversation\")` fires with the reason string `\"end_conversation\"`.\n- In interactive (REPL) sessions: sets `endedByModel: true` in app state; the UI renders a styled result box displaying the tool result string: \"Claude has ended this chat.\"\n- In non-interactive (print\/pipe) sessions: calls `gracefulShutdown(1, \"other\", { finalMessage: \"Claude ended the conversation. To continue, please start a new session.\" })` \u2014 exits with process exit code 1.\n- Strict \"must NOT use\" list: stuck loops, task completion, harmful content requests (redirect instead), general frustration, any self-harm or imminent harm scenario. In crisis\/self-harm cases the model must not even mention the possibility of ending the conversation.\n- A deferred-tool hint is surfaced only in interactive sessions (`$B()` check) to eligible models: \"use only for sustained user abuse directed at the assistant, or when the user explicitly asks to see it demonstrated.\"\n\n**Evidence**\n\nFeature flag name (`\"tengu_umber_kestrel\"` in `JUi`); deferred hint (search for `\"Load the full guidance via ToolSearch\"`); end message (search for `\"Claude has ended this chat\"`); two-call check (`lastAssistantTurnCalledEndConversation`); model floor list (search for `\"Re-read the\"`); non-interactive exit (search for `\"gracefulShutdown\"`); model eligibility list (search for `\"mythos\"`).\n\n- Flag `tengu_umber_kestrel`: Gate removed from the code (read for one account on one subscription tier against v2.1.206; this account: on, anonymous baseline: off, compiled default: not a boolean we can read) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release."}