Skip to content

waiting state never expires, abandoned sessions stay Waiting forever #2

Description

@martinbha

Problem

AgentStatusSnapshot.effectiveState(now:staleAfter:doneFadeAfter:) (Sources/AgentPulse/Models/AgentStatusSnapshot.swift) derives:

  • workingstale after staleAfter (300 s)
  • doneidle after doneFadeAfter (20 s)

But waiting has no timeout. A Notification/PermissionRequest hook event pins the agent at "Waiting" indefinitely if the session is closed or abandoned — the only way out is the manual Clear action (and clearCompleted() doesn't even clear waiting, only done/stale/failed).

Suggested fix

Either transition waitingstale after the same staleAfter window, or add a dedicated waitingStaleAfter interval. Also consider including waiting in clearCompleted() in Sources/AgentPulse/State/AgentStatusStore.swift.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions