Atlas fails with Editor exited with code <n>, or Editor exited with signal <sig>, because the Atlas TUI spawns your editor with stdio inherited and rejects when the child exits non-zero or is killed by a signal. Check that the EDITOR or VISUAL environment variable actually points at an installed binary, and use an editor that blocks until the file is closed, for example `code --wait` rather than bare `code`. On Windows the child is spawned with shell: true, so quote a path containing spaces. The temporary file is removed in the finally block either way, so nothing is left behind.
Why does Atlas say Editor exited with code <n>
Atlas says Editor exited with code <n> because the Atlas TUI spawns your editor with stdio inherited and rejects whenever the child ends with a status other than 0. The 2 messages, Editor exited with code <n> and Editor exited with signal <sig>, cover a bad exit status and a kill signal.
Opening the prompt in an external editor means Atlas writes a temporary file, hands it to the binary named by EDITOR or VISUAL, and waits. Because stdio is inherited, the editor takes over your terminal directly, which is what makes a terminal editor usable from inside the Atlas TUI. When the editor exits non-zero, Atlas has no reliable way to know whether the file reflects what you meant, so it rejects rather than guessing. The temporary file is removed in the finally block either way, so a failed edit does not litter your filesystem.
How to fix EDITOR or VISUAL pointing at a missing binary
Check that the 2 environment variables Atlas reads, EDITOR and VISUAL, actually point at an installed binary. Atlas spawns exactly what those variables name, so a value referencing an editor you uninstalled, renamed, or never installed fails instantly and surfaces as Editor exited with code <n> before any editing buffer appears.
Print the value of EDITOR and VISUAL and run that command by hand against any file. If the shell cannot find it, Atlas cannot either. Remember that the variable must be visible to the process running the Atlas TUI, not only to your interactive shell, so a value exported in a profile that Atlas never sourced is effectively unset. Set EDITOR or VISUAL to an editor that is genuinely on PATH for that process, then re-open the external editor from the TUI.
Why bare `code` fails and `code --wait` works with Atlas
In Atlas as of 2026, bare `code` fails because it returns immediately after handing the file to an already running VS Code window, while the Atlas TUI waits for the child process to end. Use an editor that blocks until the file is closed, for example `code --wait`.
Atlas's external editor flow depends on the child process ending when your edit ends. Without --wait, the `code` launcher exits as soon as it has delegated the file, so Atlas either reads a temporary file you have not touched yet or rejects on the exit status. Setting EDITOR to `code --wait` makes the launcher block until the tab is closed, which is the contract Atlas needs. The same rule applies to any GUI editor with a launcher shim: find its blocking flag and use it, or use a terminal editor that inherently blocks.
How to set an editor path with spaces on Windows for Atlas
On Windows, Atlas spawns the external editor child with shell: true, so quote a path containing spaces in EDITOR or VISUAL. An unquoted Program Files path is split by the shell into 2 or more arguments, and the first is not a real binary, which produces Editor exited with code <n>.
Because shell: true routes the command through the Windows shell, quoting is the shell's problem, not Atlas's. Wrap the executable path in quotes inside the environment variable value so the shell treats it as one token. Verify by running the exact same quoted string in a Windows shell against a scratch file: if the editor opens and blocks, Atlas will get the same behavior. If it does not, fix the quoting before blaming the Atlas TUI.
How to verify the external editor fix worked
Verify the Atlas external editor fix by opening the prompt in the editor again and saving. A working setup returns you to the Atlas TUI with the edited prompt loaded, and neither of the 2 failures, Editor exited with code <n> and Editor exited with signal <sig>, appears. Atlas removes the temporary file in the finally block regardless of outcome.
Test with a real edit rather than an immediate quit, because an editor that exits non-zero on quit without save can still fail even when the path and blocking behavior are correct. If the editor opens, blocks, saves, and hands the text back to the Atlas TUI, the configuration is right. If it still fails after fixing EDITOR or VISUAL, blocking, and quoting, retype the prompt in the TUI for now: the TUI prompt does not depend on an external editor, so you are never blocked from working.
How to fix it
- 01Check the EDITOR or VISUAL environment variable actually points at an installed binary. A stale value naming an editor you removed exits non-zero immediately.
- 02Use an editor that blocks until the file is closed, for example `code --wait`, not bare `code`. A non-blocking editor returns control before you have saved anything.
- 03On Windows the child is spawned with shell: true, so quote a path containing spaces in EDITOR or VISUAL.
- 04Retype the prompt directly in the Atlas TUI if the editor cannot be fixed right now. The TUI prompt still works without an external editor.
- 05Re-open the external editor from the Atlas TUI and confirm neither Editor exited with code <n> nor Editor exited with signal <sig> appears.
Frequently asked questions
- Why does Atlas say Editor exited with code <n>?
- The Atlas TUI spawns your editor with stdio inherited and rejects when the child exits non-zero. The usual causes are EDITOR or VISUAL pointing at a missing binary, a non-blocking editor, or an unquoted Windows path with spaces.
- What does Editor exited with signal <sig> mean in Atlas?
- Editor exited with signal <sig> means the editor child process was killed by a signal rather than exiting on its own. Atlas rejects the edit, and the temporary file is removed in the finally block either way.
- Why does bare `code` not work as my Atlas editor?
- Bare `code` returns immediately instead of blocking. Use an editor that blocks until the file is closed, for example `code --wait`, so the child process stays alive until you finish editing the prompt.
- Which env var does Atlas use for the external editor?
- Atlas uses the EDITOR or VISUAL environment variable. Check that the value actually points at an installed binary that is visible to the process running the Atlas TUI, not only to your login shell.
- How do I set an editor path with spaces on Windows for Atlas?
- On Windows the child is spawned with shell: true, so quote a path containing spaces in EDITOR or VISUAL. Without quotes the shell splits the path into separate arguments and the spawn fails.
- Does a failed Atlas editor launch leave a temp file behind?
- No. The temporary file Atlas writes for the external editor is removed in the finally block either way, so a failed edit does not leave a stray file on disk.
- Can I still write a prompt if my Atlas editor is broken?
- Yes. Retype the prompt in the Atlas TUI if the editor cannot be fixed right now. The external editor is a convenience, and the TUI prompt works without it.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Atlas with DeepSeek Coder 6.7B (Ollama): the thin-hardware fallback in 2026
DeepSeek Coder 6.7B (Ollama) in Atlas: a 3.8GB pull, roughly 6GB to serve, 16K tokens (16,384) of context, Free (self-hosted). Dated, but it starts fast.
Atlas for Unreal Engine: Terminal-Native AI Coding for UCLASS and Build.cs in 2026
Atlas is a terminal-native AI coding agent for Unreal Engine C++ in 2026, where UCLASS macros, the reflection system, and Build.cs module rules are the real API.
Atlas with Qwen3.6 Flash: A $0.1875 Speed Tier With Coding Lineage in 2026
Qwen3.6 Flash in Atlas: Alibaba's April 2026 speed tier at $0.1875 / $1.125 per Mtok with a 1M window, wired to small_model in atlas.json. Setup and tradeoffs.
Atlas with DeepSeek-R1 14B Distill (Ollama): The Local Plan Agent in 2026
DeepSeek-R1 14B Distill (Ollama) is 9.0GB, roughly 11GB to serve, with a 128K context. Drive the Atlas plan agent on a 12GB card in 2026. Free (self-hosted).
Atlas with Amazon Nova Pro: Bedrock Billing and a 300K Window (2026)
Amazon Nova Pro runs Atlas at $0.80 / $3.20 per Mtok on a 300,000 token window, billed through your existing AWS account with no new vendor contract.
Atlas with GLM-4.5-Air: The 106B Self-Hostable Cheap Slot in 2026
GLM-4.5-Air drives Atlas at $0.20 per Mtok input and $1.10 per Mtok output on a 128K tokens (131,072) window. A 106B total / 12B active MIT-licensed MoE.
Atlas with Gemini 2.0 Flash-Lite: The Cheapest Google Model in the Registry (2026)
Gemini 2.0 Flash-Lite in Atlas: $0.075 per Mtok input, $0.3 per Mtok output, a 1,048,576 token context, an 8,192 token output cap, and no reasoning mode.
Atlas with DeepInfra: The Cheapest Open-Weights Host for an Agent Loop in 2026
Run Atlas on DeepInfra: GPT OSS 120B at $0.037/$0.17 per Mtok, DeepSeek V4 Flash at a 1,048,576 token window for $0.09 input. Setup, limits, and cost math.