Skip to content

bug: status comment orphaned on hard process termination (SIGKILL/OOM) #47

Description

@mysticgohan1

What happens

When the fullsend run process is terminated abruptly — SIGKILL, OOM kill, segfault, or equivalent — the deferred PostCompletion call in runAgent never runs. Any "Started" status comment already posted on the issue/PR remains permanently, with no terminal outcome.

This is distinct from workflow cancellation handled via SIGTERM/signal.NotifyContext (see fullsend-ai#2147, PR fullsend-ai#2146): those paths rely on the Go process unwinding and running defers. Hard kills bypass defer execution entirely.

What should happen

Users should not be left with a misleading "Started" comment that implies an agent is still running when the process is gone. The desired behavior on hard termination is an open design question — in-process recovery may be impossible — but the gap should be acknowledged and tracked.

Context

The status comment lifecycle is managed by a defer in runAgent (internal/cli/run.go) that calls statuscomment.Notifier.PostCompletion. This mechanism covers normal returns, error returns, and (after PR fullsend-ai#2146) SIGTERM-driven cancellation when the process unwinds cleanly.

Hard termination is the remaining in-process blind spot. Observed in production-adjacent scenarios when CI runners kill jobs without a graceful window, or when the process is OOM-killed during heavy agent workloads.

Follow-up to fullsend-ai#2147 and PR fullsend-ai#2146.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/dispatchWorkflow dispatch and triggersready-to-codeTriaged and ready for the code agenttype/bugConfirmed defect in existing behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions