Summary
copilot -p non-interactive mode exits with code 1 immediately, producing zero
bytes on stdout, zero bytes on stderr, and no process-*.log file in
~/.copilot/logs/. copilot -i (interactive auto-prompt) works fine in the same
shell, so auth and binary are healthy.
Repro
env | grep -i copilot # empty (clean, non-nested shell)
copilot --version # GitHub Copilot CLI 1.0.44-1
copilot -p "say HI" --allow-all-tools
echo "exit=$?" # exit=1
Expected
Prints HI (or any model output) and exits 0.
Actual
- exit=1
- 0 bytes stdout
- 0 bytes stderr
- No new
process-*.log file written under ~/.copilot/logs/
--log-level all --log-dir /tmp/x produces no log file either, so the failure is
before logger init.
Things ruled out
- TTY: same failure under
script, pty, and a real interactive terminal
- Flags:
--allow-all, --allow-all-tools, --yolo, --output-format json
- Stale processes:
pkill -9 -f copilot first, 0 remaining
- Auth:
gh auth status healthy; copilot -i works
- Settings: removed
~/.copilot/settings.json, same failure
- Model override:
--model claude-sonnet-4.5 (public model), same failure
- Fresh
HOME=/tmp/fake: same failure
env -i HOME=... PATH=... TERM=xterm copilot -p ...: same failure
mv ~/.copilot ~/.copilot.bak (no plugins, no MCP, no settings): same failure
Workaround
copilot -i "$(< prompt.txt)" --allow-all-tools --no-color </dev/null > result.txt
2>&1
Environment
- copilot-cli: 1.0.44-1 (Homebrew cask
copilot-cli@prerelease 0.0.414)
- macOS Darwin 25.4.0 arm64
- Shell: zsh
- Node (bundled): v24.15.0
Summary
copilot -pnon-interactive mode exits with code 1 immediately, producing zerobytes on stdout, zero bytes on stderr, and no
process-*.logfile in~/.copilot/logs/.copilot -i(interactive auto-prompt) works fine in the sameshell, so auth and binary are healthy.
Repro
Expected
Prints
HI(or any model output) and exits 0.Actual
process-*.logfile written under~/.copilot/logs/--log-level all --log-dir /tmp/xproduces no log file either, so the failure isbefore logger init.
Things ruled out
script, pty, and a real interactive terminal--allow-all,--allow-all-tools,--yolo,--output-format jsonpkill -9 -f copilotfirst, 0 remaininggh auth statushealthy;copilot -iworks~/.copilot/settings.json, same failure--model claude-sonnet-4.5(public model), same failureHOME=/tmp/fake: same failureenv -i HOME=... PATH=... TERM=xterm copilot -p ...: same failuremv ~/.copilot ~/.copilot.bak(no plugins, no MCP, no settings): same failureWorkaround
Environment
copilot-cli@prerelease0.0.414)