{"version":"2.1.299","anchor":"bg-refuses-when-the-flag-cannot-be-told-from-prompt-text","canonical_anchor":"bg-refuses-when-the-flag-cannot-be-told-from-prompt-text","heading":"--bg stops when it cannot be told apart from prompt text, and --exec joins the special launch flags","tier":"notice","area":"Sessions","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/bg-refuses-when-the-flag-cannot-be-told-from-prompt-text","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### `--bg` stops when it cannot be told apart from prompt text, and `--exec` joins the special launch flags\n\n`claude --bg` now exits with an error instead of starting anything when the flag might be prompt text, and `--exec` is handled alongside other launch flags\n\n**What**\n\n`claude --bg` starts a background session, which is a Claude Code session that keeps working without you watching it. Combined with `--exec`, it runs a shell command as a background job instead. This release changes how both flags are handled:\n\n- `--bg` now refuses to start when Claude Code cannot tell the flag apart from your prompt text. It exits with status 1 and prints a message ending: \"so nothing was started. To start a background session put it first: claude --bg \".\n\n- After a `--exec` job is handed off to run in the background, Claude Code now waits for one more follow-up step to finish.\n\n- `--exec` was added to an internal list of command-line flags. Before this release the list held only `--resume-session-at`, `--resume-drops-turn` and `--project-config-root`.\n\n**Why**\n\nBefore, an ambiguous command line could quietly start, or fail to start, a background session you did not mean to run. Now you get a clear error and nothing runs. Put `--bg` first, directly before your prompt.\n\n- Area: Sessions\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}