Skip to content

Hosted machine stays offline after successful heartbeat #219

Description

@Fmeilrios

Summary

On hosted agent-kanban.dev, a local Windows daemon successfully registers and sends a heartbeat, but the machine listing immediately reports the same machine offline. The dashboard remains stuck on Reconnect, and every worker stays status.schedulable: false.

Environment

  • Agent Kanban CLI/daemon: 1.13.4 (npm latest)
  • OS: Windows 11 Home 10.0.26100, native Windows
  • Node: 24.16.0
  • Providers detected: Claude Code and Codex CLI
  • API: https://agent-kanban.dev
  • Machine account and AMA connected
  • GitHub CLI authenticated

The installed dist has local Windows-only patches for binary lookup (where instead of which) and process ancestry (Get-CimInstance instead of ps). Heartbeat, API client, tunnel, and scheduling code are unmodified.

Reproduction

  1. Configure a hosted machine credential.
  2. Run: ak start --api-url https://agent-kanban.dev
  3. Observe local daemon logs:
    • Machine ready
    • Machine online with runtimes claude:limited,codex:ready
    • Tunnel connected
  4. Open the hosted dashboard. Machine still says Reconnect.
  5. Stop the daemon and run the dashboard's reconnect command exactly.
  6. Refresh dashboard; it still says Reconnect.

API evidence

POST /api/machines//heartbeat returns HTTP 200 with status online, current runtime states, and a current last_heartbeat_at timestamp.

An immediate GET /api/machines returns the same machine with:

  • status: offline
  • runtimes: []
  • last_heartbeat_at: null
  • runner_count: 0
  • runner_capacity: 0

GET /api/agents consequently reports every worker as schedulable: false.

Expected

Successful daemon registration/heartbeat makes the local machine online, preserves its runtime states, and makes compatible workers schedulable.

Actual

Heartbeat response says online, but machine listing and dashboard immediately say offline/reconnect with zero runners.

Question

Does the hosted API now require a runner-registration step absent from the latest published 1.13.4 daemon, or is the machine listing reading stale/different state?

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