Skip to content

agent_handoff_emitter: auditor task can be GC'd before HANDOFF journaled, leaving silent-default acceptance with no GREEN/YELLOW/RED verdict #809

@michael-wojcik

Description

@michael-wojcik

Symptom

When an auditor task (e.g. pact-auditor in concurrent-observation role) completes by going idle without emitting an explicit final HANDOFF, the orchestrator can transition the audit-parent task to completed before the auditor's HANDOFF gets either a metadata.handoff entry or an agent_handoff journal event. Once the auditor task is garbage-collected from TaskList (typical in long sessions, ~hours), the secretary's harvest pass has no source-of-truth for the auditor's verdict — TaskGet returns not-found, session-journal.jsonl has zero agent_handoff events for that task_id, and metadata.handoff was never written.

This regresses the "silence ≠ concurrence" discipline ("GREEN-at-end IS concurrence; silence alone is NOT") documented in the webapp-home-page #22 audit institutional record (lesson [12]).

Evidence

Observed across two independent sessions in different teams this week:

Two recurrences in two teams in one week = recurring failure mode, not session-local quirk.

Suggested fix

Modify agent_handoff_emitter.py (or the auditor-task-completion path) so the auditor emits a final agent_handoff journal event with an explicit verdict (GREEN / YELLOW / RED) before idling — even when the verdict is implicit silent-default. Suggested verdict-payload shape:

{
  "type": "agent_handoff",
  "agent": "auditor",
  "task_id": "...",
  "handoff": {
    "verdict": "GREEN" | "YELLOW" | "RED",
    "signals_emitted": ["silent-default" | "RED@<phase>" | ...],
    "produced": "...auditor's wrap-up summary..."
  }
}

This makes silent-default a journaled observation rather than a missing artifact, which preserves the 067d2b51c3 lesson [12] discipline programmatically.

Cross-references

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions