Skip to content

Preserve schedule principal and invocation ID through proxy telemetry and session history #363

Description

@mostlydev

Problem

Scheduled Clawdapus invocations cannot currently be measured as authoritative outer turns. In Tiverton House issue #87, both claw compose logs cllama and .claw-session-history/<agent>/history.jsonl were inspected for a full regular session. Neither surface preserved a schedule principal/name or stable invocation ID.

Available records can count:

  • tool_manifest_loaded attempts (only for the retained proxy-log window),
  • mediated provider request / response rounds,
  • successful provider-history final records,
  • visible versus [SILENT] finals,
  • managed state actions.

The scheduled message can sometimes be matched exactly back to x-claw.invoke[].message, but retries and event wakes reuse that text. Without a stable invocation key, successful final records cannot be deduplicated into completed outer turns, and clock-minute mapping is only a heuristic.

Requested contract

Generate one stable invocation ID at the schedule/event wake boundary and preserve it, together with the schedule principal/name when applicable, through:

  1. agent invocation environment/envelope;
  2. cllama structured records (tool_manifest_loaded, feed records, request, response, error, interventions);
  3. .claw-session-history records;
  4. audit/export surfaces.

The ID must remain constant across mediated tool rounds, retries, and failover for one outer invocation, and change for a new scheduled/event/user invocation.

Suggested fields:

{
  "invocation_id": "...",
  "invocation_kind": "schedule|event|discord|manual",
  "schedule_principal": "weston/Liquid tech discovery pulse"
}

Acceptance

  • attempted, completed, failed, and visible-output rates can be grouped by schedule_principal;
  • mediated provider rounds can be counted separately under the same invocation_id;
  • retries/failover do not inflate completed outer-turn counts;
  • event/Discord/manual wakes are distinguishable from cron;
  • old records remain readable with these fields absent.

Tiverton-side read-only evidence and fallback telemetry script: scripts/desk/turn-telemetry.sh on branch impl/issue-87-restoration.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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