JB
01/05/2026, 9:14 PMaaronv (BAML)
01/05/2026, 9:52 PMimport baml_client inside the function that is run inside the RQ workeraaronv (BAML)
01/05/2026, 9:53 PMaaronv (BAML)
01/05/2026, 11:49 PMJB
01/05/2026, 11:50 PMaaronv (BAML)
01/05/2026, 11:50 PMaaronv (BAML)
01/05/2026, 11:51 PMaaronv (BAML)
01/05/2026, 11:52 PMJB
01/05/2026, 11:53 PMaaronv (BAML)
01/07/2026, 6:35 PMgreg (BAML)
01/09/2026, 9:13 PMvEth
01/09/2026, 10:57 PMmessage-processing workflow
2. ctx.run("process-message") internally calls b.NewOrchestrator()
3. Due to long execution time, Restate times out and retries
4. BAML function NewOrchestrator is called multiple times
## Expected Behavior
Boundary Studio should record all BAML function calls, including:
- The first call
- Subsequent calls caused by Restate retries
## Actual Behavior
Boundary Studio only shows the first call, resulting in:
- Unable to trace LLM input/output during retries
- Difficult to debug retry-related issues
- Inaccurate token consumption statistics
## Log Evidence
Restate logs show the same messageId being processed multiple times (iteration restarting from 1), but Boundary Studio only has one record.
## Possible Causes
1. **BAML client caching**: May cache some state at the process level
2. **Trace ID reuse**: Retries may reuse the same trace ID
3. **Boundary Studio deduplication**: Backend may deduplicate identical requests
## Impact
- Debugging difficulty: Cannot see actual LLM responses during retries
- Cost opacity: Actual token consumption is higher than what Boundary Studio shows
- Problem localization difficulty: Cannot determine if it's an LLM output issue or a retry issuegreg (BAML)
01/12/2026, 4:58 PMfrom baml_client.async_client import b
from baml_client.tracing import flush
result = await b.MyLLMFunction()
# Force the tracing system to finish publishing.
flush()vEth
01/12/2026, 9:01 PMJB
01/12/2026, 10:22 PM_async_worker_job method in my repro example linked above, it leads to the method timing out when trying to flushgreg (BAML)
01/13/2026, 9:41 PM_async_worker_job() function is similar to the one in your repro?JB
01/14/2026, 12:42 AM