Skip to content

Agent registration drifts from container reality (stale IP, stale running status) #1538

Description

@jaylfc

Found while live-verifying the #97 resume fix on the dev Pi.

Agent naira (hermes, LXC):

  • Registered host is 10.26.37.174, but when its container starts it now comes up on 192.168.7.5 (bridge/subnet changed since registration). Every controller call (prepare-for-shutdown, resume, chat) targets the dead address.
  • The agent showed status: running in /api/agents while its container was actually STOPPED, so the UI presents a live agent that is not there.

Consequences: the boot-time resume retries the wrong address and correctly ends with the still-paused warning, but the underlying cause is invisible; users see a paused, apparently-running agent that never comes back.

Suggested direction:

  1. Reconcile status with the container runtime state (incus/docker query) rather than trusting the stored value.
  2. Refresh the registered host from the container's current IP on start (or resolve by container name at call time instead of storing a raw IP).
  3. Surface address drift explicitly in the Agents app when the registered IP does not match the container's.

Not urgent for tonight; the #97 warning makes the symptom visible instead of silent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions