{"version":"2.1.281","anchor":"focus-gets-a-non-interactive-sdkheadless-variant-that-sa","canonical_anchor":"focus-gets-a-non-interactive-sdkheadless-variant-that-sa","heading":"\/focus works in SDK and headless sessions, and hosts are told the view mode","tier":"use","area":"SDK","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/focus-gets-a-non-interactive-sdkheadless-variant-that-sa","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### \/focus works in SDK and headless sessions, and hosts are told the view mode\n\nA new \/focus [on|off] works in non-interactive sessions, and session init now reports view_mode and per_turn_effort_active to SDK hosts\n\n**Unclear.** The finding does not make clear which way of running Claude Code counts as submitting on local stdin.\n\n**What**\n\n`\/focus` switches the focus view, which shows only your last prompt, a one-line summary of the work and the final response. It can now be used in non-interactive sessions, meaning SDK and headless runs where another program drives Claude Code.\n\n- A second `\/focus` command, with argument hint `[on|off]`, is available only when the session is not interactive. With no argument it flips the current state; other arguments get \"Unknown argument ... Use: \/focus [on|off]\".\n\n- It writes `viewMode` into the flag-settings layer and sends `apply_flag_settings` with `briefTranscript`.\n\n- If a managed `viewMode` setting overrides the choice, it replies that focus view is set by that setting and stays on or off.\n\n- Submitted from local standard input, it refuses with \"\/focus isn't available here yet\".\n\n- The interactive `\/focus` now says it needs the fullscreen renderer when not in fullscreen.\n\n- The session start message sent to SDK hosts now includes `view_mode` (\"focus\" or \"default\") and `per_turn_effort_active`, an internal field marking whether a per-turn effort setting is active.\n\n**Why**\n\nSDK and remote hosts can switch focus view per session without editing `settings.json`, and can mirror the current view. The effort field lets a host tell when changing effort would invalidate the prompt cache.\n\n- Area: SDK\n- Names: `\/focus`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}