Skip to content

copilot -p exits 1 silently with no output and no log file on 1.0.44-1 (macOS) #3189

@idanshimon

Description

@idanshimon

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

Metadata

Metadata

Assignees

Labels

area:non-interactiveNon-interactive mode (-p), CI/CD, ACP protocol, and headless automation

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions