Include conversation ancestry in execution observations

This commit is contained in:
2026-11-14 01:20:06 +00:00
parent 04569e44df
commit e5c42de06d
6 changed files with 79 additions and 2 deletions

View File

@@ -514,6 +514,9 @@ func (e *Engine) Run(ctx context.Context, req RunRequest) (*RunResult, error) {
return e.run(ctx, req)
}
recorder, idErr := observation.New(func(event domain.ExecutionEvent) { req.Observer(fromDomainExecutionEvent(event)) })
if req.ContinueFrom != nil && req.ContinueFrom.internal != nil {
recorder.SetParentRunID(req.ContinueFrom.internal.RunID())
}
recorder.Start()
if idErr != nil {
err := fmt.Errorf("failed to create run id: %w", idErr)