Skip to content

Fresh local-machine API keys are rejected with INVALID_API_KEY #218

Description

@defurniture2025

Summary

Fresh API keys generated from Machines → Add Machine → Your Computer are rejected by the hosted API. The daemon starts, attempts registration, then exits with Invalid API key.

This was reproduced with multiple newly generated local-machine keys on July 14 and July 15, 2026. No key is included in this report.

Steps to reproduce

  1. Sign in to https://agent-kanban.dev.
  2. Open Machines and select Add Machine.
  3. Select Your Computer (not Cloud Sandbox).
  4. Copy the newly generated ak_... key.
  5. Run:
ak config set --api-url https://agent-kanban.dev --api-key '<fresh-key>'
ak start
  1. Check ak status and the daemon log.

Actual behavior

The daemon initially reports that it started and detects both codex and hermes, but then exits. The daemon log contains:

Invalid API key.

A direct registration request to POST /api/machines with the same freshly generated key returns:

HTTP 401
{"error":{"message":"Invalid API key.","code":"INVALID_API_KEY"}}

The key copied from the website and the key saved by the CLI were compared by SHA-256 fingerprint and length, confirming there was no transfer or quoting mismatch.

Expected behavior

The local-machine key should authenticate, the daemon should remain running, and the machine should appear online on the Machines page.

Environment

  • Agent Kanban CLI: 1.13.4
  • macOS: 26.3.1 (arm64)
  • Node.js: v22.23.1
  • npm: 10.9.8
  • API URL: https://agent-kanban.dev
  • Detected providers: codex, hermes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions