Skip to content

Failure to account for null field #1338

@JoakimHagen

Description

@JoakimHagen

Describe the bug

api.business.githubcopilot.com endpoint returns user data with a null field.
This causes no stdout/stderr output and a return-code 1.

The session log afterwards looks like this

2026-02-07T09:43:02.969Z [ERROR] Error fetching copilot user: [
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "null",
    "path": [
      "assigned_date"
    ],
    "message": "Expected string, received null"
  }
]
2026-02-07T09:43:03.071Z [DEBUG] No auth info available, skipping custom agents load
2026-02-07T09:43:03.072Z [INFO] Starting Copilot CLI: 0.0.395
Commit: 4b4fe6e
2026-02-07T09:43:03.072Z [INFO] Node.js version: v24.11.1
2026-02-07T09:43:03.073Z [DEBUG] GitHub MCP server is disabled, skipping auto-configuration
2026-02-07T09:43:03.081Z [DEBUG] Workspace initialized: 3bebaf36-efd7-4d86-9ad4-d486d0031f14 (checkpoints: 0)
2026-02-07T09:43:03.885Z [DEBUG] Fetched Copilot URL for JoakimHagen from https://api.github.com/graphql: 200 https://api.business.githubcopilot.com
2026-02-07T09:43:03.886Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.395 (darwin v24.11.1) term/iTerm.app
2026-02-07T09:43:04.101Z [DEBUG] Failed to fetch models from https://api.business.githubcopilot.com: TypeError: fetch failed
2026-02-07T09:43:04.957Z [DEBUG] Failed to fetch models from https://api.enterprise.githubcopilot.com: TypeError: fetch failed
2026-02-07T09:43:05.812Z [DEBUG] Failed to fetch models from https://api.individual.githubcopilot.com: TypeError: fetch failed
2026-02-07T09:43:05.812Z [ERROR] Error loading models: AggregateError: Failed to list models
2026-02-07T09:43:05.813Z [DEBUG] runPromptMode: executePromptDirectly returned succeeded=false
2026-02-07T09:43:05.813Z [DEBUG] runPromptMode: exiting with code 1

Affected version

Copilot CLI: 0.0.395 Commit: 4b4fe6e

Steps to reproduce the behavior

  1. Have business license to GitHub Copilot seat with Copilot CLI enabled.
  2. Ensure gh login token is valid and has copilot scope
  3. Run cli command copilot --log-level debug --disable-builtin-mcps --no-custom-instructions -p hi to reduce clutter. Observe logs.

Expected behavior

  • Prompt response and metrics to stdout
  • No errors in session logs.
  • Exit code 0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions