You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Every delegate_task records two failed readCanonicalProjection spans #38082
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Run a server that exports traces over OTLP.
In any thread, have the agent call the delegate_task MCP tool.
Open the trace for that tools/call.
Expected behavior
A delegation that succeeds records no error spans.
Actual behavior
Every delegation records two failed ProjectionStore.readCanonicalProjection spans, each with a failed sql.transaction parent: No orchestration projection exists for thread <child thread id>. One sits inside Orchestrator.dispatchMessage, and the other runs straight under orchestrationV2.dispatch.delegatedTaskRequest. The task itself starts and finishes normally.
getProjectionWithPendingEvents in apps/server/src/orchestration-v2/Orchestrator.ts reads the stored projection under Effect.option before falling back to the pending thread.created event. The delegated child thread is created by the same command, so that read always misses. The traced getThreadRecords → readCanonicalProjection span has already ended as an error by the time Effect.option swallows the miss.
Same class of bug as #37763, which fixed the ProjectionStore.getThread span left by thread.create's id check.
Activity