{"version":"2.1.331","anchor":"non-interactive-detection-no-longer-treats-a-non-tty-stdout","canonical_anchor":"non-interactive-detection-no-longer-treats-a-non-tty-stdout","heading":"Piping output no longer makes Claude Code count a run as non-interactive","tier":"notice","area":"Startup","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/non-interactive-detection-no-longer-treats-a-non-tty-stdout","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### Piping output no longer makes Claude Code count a run as non-interactive\n\nOnly `-p`\/`--print`, `--init-only` or `--sdk-url` now mark a run as non-interactive. Piped or redirected output alone no longer does\n\n**Unclear.** It is not settled whether other parts of Claude Code still treat piped output as non-interactive.\n\n**What**\n\nClaude Code checks at startup whether it is running non-interactively, with no person typing at it. That check used to return yes whenever output was not going to a terminal, for example when you pipe output into another program or redirect it to a file. Now it returns yes only when Claude Code is started with one of these:\n\n- `-p` or `--print`\n\n- `--init-only`\n\n- `--sdk-url`\n\n**Why**\n\nA run whose output is piped or redirected, without one of those flags, may now take the interactive path. If you script Claude Code, pass `-p` or `--print` explicitly to get non-interactive behaviour.\n\n- Area: Startup\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}