[
  {
    "side": "before",
    "span": "EventStoreV2.append",
    "error": "EventStoreAppendEventsError: Failed to append 6 agent orchestration event(s).\n    at <source>\n    at <source>\n    at Array.map (<anonymous>)\n    at <source>\n    at <source>\n    at EventStoreV2.append (<source>)\n    at EventStoreV2.append (definition) (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (definition) (<source>)\n    at RunExecutionService.writeFinalRunEvents (<source>)\n    at RunExecutionService.writeFinalRunEvents (definition) (<source>)\n    at RunExecutionService.startRootRun (<source>)\n    at RunExecutionService.startRootRun (definition) (<source>)\n    at ProviderTurnStartService.start (<source>)\n    at ProviderTurnStartService.start (definition) (<source>) {\n  [cause]: PersistenceDecodeError: Decode error in OrchestrationEventStore.appendAgentEvents:decode: AnyOf(Composite(Pointer(AnyOf())),Composite(Pointer(AnyOf())),Composite(Pointer(Composite(Pointer(AnyOf(Composite(Pointer(Composite(Filter(InvalidValue))))))))))\n      at PersistenceDecodeError.fromSchemaError (<source>)\n      at <source>\n      at <source>\n      at <source>\n      at Array.map (<anonymous>)\n      at <source>\n      at <source> {\n    [cause]: SchemaError: Expected \"thread.archived\" | \"thread.unarchived\" | \"thread.deleted\" | \"thread.settled\" | \"thread.unsettled\" | \"thread.snoozed\" | \"thread.unsnoozed\" | \"thread.pinned\" | \"thread.auto-settle-set\" | \"thread.unpinned\" | \"thread.pin-reordered\" | \"thread.active-reordered\" | \"thread.tags-updated\" | \"thread.visited\" | \"thread.marked-unread\" | \"thread.pull-request-synced\" | \"thread.issue-synced\" | \"thread.metadata-updated\" | \"thread.runtime-mode-updated\" | \"thread.interaction-mode-updated\" | \"thread.model-selection-updated\" | \"thread.provider-switched\" | \"thread.guest-share-updated\"\n      at [\"type\"]\n    Expected \"provider-session.attached\" | \"provider-session.updated\"\n      at [\"type\"]\n    Expected an integer\n      at [\"payload\"][\"tokenUsage\"][\"usedTokens\"]\n  }\n}"
  },
  {
    "side": "before",
    "span": "sql.transaction",
    "error": "EventStoreAppendEventsError: Failed to append 6 agent orchestration event(s).\n    at <source>\n    at <source>\n    at Array.map (<anonymous>)\n    at <source>\n    at <source>\n    at EventStoreV2.append (<source>)\n    at EventStoreV2.append (definition) (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (definition) (<source>)\n    at RunExecutionService.writeFinalRunEvents (<source>)\n    at RunExecutionService.writeFinalRunEvents (definition) (<source>)\n    at RunExecutionService.startRootRun (<source>)\n    at RunExecutionService.startRootRun (definition) (<source>)\n    at ProviderTurnStartService.start (<source>)\n    at ProviderTurnStartService.start (definition) (<source>) {\n  [cause]: PersistenceDecodeError: Decode error in OrchestrationEventStore.appendAgentEvents:decode: AnyOf(Composite(Pointer(AnyOf())),Composite(Pointer(AnyOf())),Composite(Pointer(Composite(Pointer(AnyOf(Composite(Pointer(Composite(Filter(InvalidValue))))))))))\n      at PersistenceDecodeError.fromSchemaError (<source>)\n      at <source>\n      at <source>\n      at <source>\n      at Array.map (<anonymous>)\n      at <source>\n      at <source> {\n    [cause]: SchemaError: Expected \"thread.archived\" | \"thread.unarchived\" | \"thread.deleted\" | \"thread.settled\" | \"thread.unsettled\" | \"thread.snoozed\" | \"thread.unsnoozed\" | \"thread.pinned\" | \"thread.auto-settle-set\" | \"thread.unpinned\" | \"thread.pin-reordered\" | \"thread.active-reordered\" | \"thread.tags-updated\" | \"thread.visited\" | \"thread.marked-unread\" | \"thread.pull-request-synced\" | \"thread.issue-synced\" | \"thread.metadata-updated\" | \"thread.runtime-mode-updated\" | \"thread.interaction-mode-updated\" | \"thread.model-selection-updated\" | \"thread.provider-switched\" | \"thread.guest-share-updated\"\n      at [\"type\"]\n    Expected \"provider-session.attached\" | \"provider-session.updated\"\n      at [\"type\"]\n    Expected an integer\n      at [\"payload\"][\"tokenUsage\"][\"usedTokens\"]\n  }\n}"
  },
  {
    "side": "before",
    "span": "orchestrationV2.EventSink.writeIfRunCurrent",
    "error": "EventStoreAppendEventsError: Failed to append 6 agent orchestration event(s).\n    at <source>\n    at <source>\n    at Array.map (<anonymous>)\n    at <source>\n    at <source>\n    at EventStoreV2.append (<source>)\n    at EventStoreV2.append (definition) (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (definition) (<source>)\n    at RunExecutionService.writeFinalRunEvents (<source>)\n    at RunExecutionService.writeFinalRunEvents (definition) (<source>)\n    at RunExecutionService.startRootRun (<source>)\n    at RunExecutionService.startRootRun (definition) (<source>)\n    at ProviderTurnStartService.start (<source>)\n    at ProviderTurnStartService.start (definition) (<source>) {\n  [cause]: PersistenceDecodeError: Decode error in OrchestrationEventStore.appendAgentEvents:decode: AnyOf(Composite(Pointer(AnyOf())),Composite(Pointer(AnyOf())),Composite(Pointer(Composite(Pointer(AnyOf(Composite(Pointer(Composite(Filter(InvalidValue))))))))))\n      at PersistenceDecodeError.fromSchemaError (<source>)\n      at <source>\n      at <source>\n      at <source>\n      at Array.map (<anonymous>)\n      at <source>\n      at <source> {\n    [cause]: SchemaError: Expected \"thread.archived\" | \"thread.unarchived\" | \"thread.deleted\" | \"thread.settled\" | \"thread.unsettled\" | \"thread.snoozed\" | \"thread.unsnoozed\" | \"thread.pinned\" | \"thread.auto-settle-set\" | \"thread.unpinned\" | \"thread.pin-reordered\" | \"thread.active-reordered\" | \"thread.tags-updated\" | \"thread.visited\" | \"thread.marked-unread\" | \"thread.pull-request-synced\" | \"thread.issue-synced\" | \"thread.metadata-updated\" | \"thread.runtime-mode-updated\" | \"thread.interaction-mode-updated\" | \"thread.model-selection-updated\" | \"thread.provider-switched\" | \"thread.guest-share-updated\"\n      at [\"type\"]\n    Expected \"provider-session.attached\" | \"provider-session.updated\"\n      at [\"type\"]\n    Expected an integer\n      at [\"payload\"][\"tokenUsage\"][\"usedTokens\"]\n  }\n}"
  },
  {
    "side": "before",
    "span": "RunExecutionService.writeFinalRunEvents",
    "error": "EventSinkWriteError: Failed to write 6 orchestration V2 event(s).\n    at <source>\n    at <source>\n    at Array.map (<anonymous>)\n    at <source>\n    at <source>\n    at EventStoreV2.append (<source>)\n    at EventStoreV2.append (definition) (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (definition) (<source>)\n    at RunExecutionService.writeFinalRunEvents (<source>)\n    at RunExecutionService.writeFinalRunEvents (definition) (<source>)\n    at RunExecutionService.startRootRun (<source>)\n    at RunExecutionService.startRootRun (definition) (<source>)\n    at ProviderTurnStartService.start (<source>)\n    at ProviderTurnStartService.start (definition) (<source>) {\n  [cause]: EventStoreAppendEventsError: Failed to append 6 agent orchestration event(s).\n      at <source>\n      at <source>\n      at Array.map (<anonymous>)\n      at <source>\n      at <source> {\n    [cause]: PersistenceDecodeError: Decode error in OrchestrationEventStore.appendAgentEvents:decode: AnyOf(Composite(Pointer(AnyOf())),Composite(Pointer(AnyOf())),Composite(Pointer(Composite(Pointer(AnyOf(Composite(Pointer(Composite(Filter(InvalidValue))))))))))\n        at PersistenceDecodeError.fromSchemaError (<source>)\n        at <source>\n        at <source>\n        at <source>\n        at Array.map (<anonymous>)\n        at <source>\n        at <source> {\n      [cause]: SchemaError: Expected \"thread.archived\" | \"thread.unarchived\" | \"thread.deleted\" | \"thread.settled\" | \"thread.unsettled\" | \"thread.snoozed\" | \"thread.unsnoozed\" | \"thread.pinned\" | \"thread.auto-settle-set\" | \"thread.unpinned\" | \"thread.pin-reordered\" | \"thread.active-reordered\" | \"thread.tags-updated\" | \"thread.visited\" | \"thread.marked-unread\" | \"thread.pull-request-synced\" | \"thread.issue-synced\" | \"thread.metadata-updated\" | \"thread.runtime-mode-updated\" | \"thread.interaction-mode-updated\" | \"thread.model-selection-updated\" | \"thread.provider-switched\" | \"thread.guest-share-updated\"\n        at [\"type\"]\n      Expected \"provider-session.attached\" | \"provider-session.updated\"\n        at [\"type\"]\n      Expected an integer\n        at [\"payload\"][\"tokenUsage\"][\"usedTokens\"]\n    }\n  }\n}"
  },
  {
    "side": "before",
    "span": "EventStoreV2.append",
    "error": "EventStoreAppendEventsError: Failed to append 6 agent orchestration event(s).\n    at <source>\n    at <source>\n    at Array.map (<anonymous>)\n    at <source>\n    at <source>\n    at EventStoreV2.append (<source>)\n    at EventStoreV2.append (definition) (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (definition) (<source>)\n    at RunExecutionService.writeFinalRunEvents (<source>)\n    at RunExecutionService.writeFinalRunEvents (definition) (<source>)\n    at RunExecutionService.startRootRun (<source>)\n    at RunExecutionService.startRootRun (definition) (<source>)\n    at ProviderTurnStartService.start (<source>)\n    at ProviderTurnStartService.start (definition) (<source>) {\n  [cause]: PersistenceDecodeError: Decode error in OrchestrationEventStore.appendAgentEvents:decode: AnyOf(Composite(Pointer(AnyOf())),Composite(Pointer(AnyOf())),Composite(Pointer(Composite(Pointer(AnyOf(Composite(Pointer(AnyOf(Composite(Filter(InvalidValue)))))))))))\n      at PersistenceDecodeError.fromSchemaError (<source>)\n      at <source>\n      at <source>\n      at <source>\n      at Array.map (<anonymous>)\n      at <source>\n      at <source> {\n    [cause]: SchemaError: Expected \"thread.archived\" | \"thread.unarchived\" | \"thread.deleted\" | \"thread.settled\" | \"thread.unsettled\" | \"thread.snoozed\" | \"thread.unsnoozed\" | \"thread.pinned\" | \"thread.auto-settle-set\" | \"thread.unpinned\" | \"thread.pin-reordered\" | \"thread.active-reordered\" | \"thread.tags-updated\" | \"thread.visited\" | \"thread.marked-unread\" | \"thread.pull-request-synced\" | \"thread.issue-synced\" | \"thread.metadata-updated\" | \"thread.runtime-mode-updated\" | \"thread.interaction-mode-updated\" | \"thread.model-selection-updated\" | \"thread.provider-switched\" | \"thread.guest-share-updated\"\n      at [\"type\"]\n    Expected \"provider-session.attached\" | \"provider-session.updated\"\n      at [\"type\"]\n    Expected a value greater than or equal to 0\n      at [\"payload\"][\"tokenUsage\"][\"cachedInputTokens\"]\n  }\n}"
  },
  {
    "side": "before",
    "span": "sql.transaction",
    "error": "EventStoreAppendEventsError: Failed to append 6 agent orchestration event(s).\n    at <source>\n    at <source>\n    at Array.map (<anonymous>)\n    at <source>\n    at <source>\n    at EventStoreV2.append (<source>)\n    at EventStoreV2.append (definition) (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (definition) (<source>)\n    at RunExecutionService.writeFinalRunEvents (<source>)\n    at RunExecutionService.writeFinalRunEvents (definition) (<source>)\n    at RunExecutionService.startRootRun (<source>)\n    at RunExecutionService.startRootRun (definition) (<source>)\n    at ProviderTurnStartService.start (<source>)\n    at ProviderTurnStartService.start (definition) (<source>) {\n  [cause]: PersistenceDecodeError: Decode error in OrchestrationEventStore.appendAgentEvents:decode: AnyOf(Composite(Pointer(AnyOf())),Composite(Pointer(AnyOf())),Composite(Pointer(Composite(Pointer(AnyOf(Composite(Pointer(AnyOf(Composite(Filter(InvalidValue)))))))))))\n      at PersistenceDecodeError.fromSchemaError (<source>)\n      at <source>\n      at <source>\n      at <source>\n      at Array.map (<anonymous>)\n      at <source>\n      at <source> {\n    [cause]: SchemaError: Expected \"thread.archived\" | \"thread.unarchived\" | \"thread.deleted\" | \"thread.settled\" | \"thread.unsettled\" | \"thread.snoozed\" | \"thread.unsnoozed\" | \"thread.pinned\" | \"thread.auto-settle-set\" | \"thread.unpinned\" | \"thread.pin-reordered\" | \"thread.active-reordered\" | \"thread.tags-updated\" | \"thread.visited\" | \"thread.marked-unread\" | \"thread.pull-request-synced\" | \"thread.issue-synced\" | \"thread.metadata-updated\" | \"thread.runtime-mode-updated\" | \"thread.interaction-mode-updated\" | \"thread.model-selection-updated\" | \"thread.provider-switched\" | \"thread.guest-share-updated\"\n      at [\"type\"]\n    Expected \"provider-session.attached\" | \"provider-session.updated\"\n      at [\"type\"]\n    Expected a value greater than or equal to 0\n      at [\"payload\"][\"tokenUsage\"][\"cachedInputTokens\"]\n  }\n}"
  },
  {
    "side": "before",
    "span": "orchestrationV2.EventSink.writeIfRunCurrent",
    "error": "EventStoreAppendEventsError: Failed to append 6 agent orchestration event(s).\n    at <source>\n    at <source>\n    at Array.map (<anonymous>)\n    at <source>\n    at <source>\n    at EventStoreV2.append (<source>)\n    at EventStoreV2.append (definition) (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (definition) (<source>)\n    at RunExecutionService.writeFinalRunEvents (<source>)\n    at RunExecutionService.writeFinalRunEvents (definition) (<source>)\n    at RunExecutionService.startRootRun (<source>)\n    at RunExecutionService.startRootRun (definition) (<source>)\n    at ProviderTurnStartService.start (<source>)\n    at ProviderTurnStartService.start (definition) (<source>) {\n  [cause]: PersistenceDecodeError: Decode error in OrchestrationEventStore.appendAgentEvents:decode: AnyOf(Composite(Pointer(AnyOf())),Composite(Pointer(AnyOf())),Composite(Pointer(Composite(Pointer(AnyOf(Composite(Pointer(AnyOf(Composite(Filter(InvalidValue)))))))))))\n      at PersistenceDecodeError.fromSchemaError (<source>)\n      at <source>\n      at <source>\n      at <source>\n      at Array.map (<anonymous>)\n      at <source>\n      at <source> {\n    [cause]: SchemaError: Expected \"thread.archived\" | \"thread.unarchived\" | \"thread.deleted\" | \"thread.settled\" | \"thread.unsettled\" | \"thread.snoozed\" | \"thread.unsnoozed\" | \"thread.pinned\" | \"thread.auto-settle-set\" | \"thread.unpinned\" | \"thread.pin-reordered\" | \"thread.active-reordered\" | \"thread.tags-updated\" | \"thread.visited\" | \"thread.marked-unread\" | \"thread.pull-request-synced\" | \"thread.issue-synced\" | \"thread.metadata-updated\" | \"thread.runtime-mode-updated\" | \"thread.interaction-mode-updated\" | \"thread.model-selection-updated\" | \"thread.provider-switched\" | \"thread.guest-share-updated\"\n      at [\"type\"]\n    Expected \"provider-session.attached\" | \"provider-session.updated\"\n      at [\"type\"]\n    Expected a value greater than or equal to 0\n      at [\"payload\"][\"tokenUsage\"][\"cachedInputTokens\"]\n  }\n}"
  },
  {
    "side": "before",
    "span": "RunExecutionService.writeFinalRunEvents",
    "error": "EventSinkWriteError: Failed to write 6 orchestration V2 event(s).\n    at <source>\n    at <source>\n    at Array.map (<anonymous>)\n    at <source>\n    at <source>\n    at EventStoreV2.append (<source>)\n    at EventStoreV2.append (definition) (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (<source>)\n    at orchestrationV2.EventSink.writeIfRunCurrent (definition) (<source>)\n    at RunExecutionService.writeFinalRunEvents (<source>)\n    at RunExecutionService.writeFinalRunEvents (definition) (<source>)\n    at RunExecutionService.startRootRun (<source>)\n    at RunExecutionService.startRootRun (definition) (<source>)\n    at ProviderTurnStartService.start (<source>)\n    at ProviderTurnStartService.start (definition) (<source>) {\n  [cause]: EventStoreAppendEventsError: Failed to append 6 agent orchestration event(s).\n      at <source>\n      at <source>\n      at Array.map (<anonymous>)\n      at <source>\n      at <source> {\n    [cause]: PersistenceDecodeError: Decode error in OrchestrationEventStore.appendAgentEvents:decode: AnyOf(Composite(Pointer(AnyOf())),Composite(Pointer(AnyOf())),Composite(Pointer(Composite(Pointer(AnyOf(Composite(Pointer(AnyOf(Composite(Filter(InvalidValue)))))))))))\n        at PersistenceDecodeError.fromSchemaError (<source>)\n        at <source>\n        at <source>\n        at <source>\n        at Array.map (<anonymous>)\n        at <source>\n        at <source> {\n      [cause]: SchemaError: Expected \"thread.archived\" | \"thread.unarchived\" | \"thread.deleted\" | \"thread.settled\" | \"thread.unsettled\" | \"thread.snoozed\" | \"thread.unsnoozed\" | \"thread.pinned\" | \"thread.auto-settle-set\" | \"thread.unpinned\" | \"thread.pin-reordered\" | \"thread.active-reordered\" | \"thread.tags-updated\" | \"thread.visited\" | \"thread.marked-unread\" | \"thread.pull-request-synced\" | \"thread.issue-synced\" | \"thread.metadata-updated\" | \"thread.runtime-mode-updated\" | \"thread.interaction-mode-updated\" | \"thread.model-selection-updated\" | \"thread.provider-switched\" | \"thread.guest-share-updated\"\n        at [\"type\"]\n      Expected \"provider-session.attached\" | \"provider-session.updated\"\n        at [\"type\"]\n      Expected a value greater than or equal to 0\n        at [\"payload\"][\"tokenUsage\"][\"cachedInputTokens\"]\n    }\n  }\n}"
  }
]
