@@ -33,8 +33,8 @@ Or create your own `.cursorrules` file with this content:
3333```
3434When debugging Temporal workflows, use the `temporal workflow` CLI commands:
3535
36- - `temporal workflow failures --since 1h` - Find recent failures
37- - `temporal workflow diagnose --workflow-id <id>` - Trace workflow chain to leaf failure
36+ - `temporal workflow list --failed --since 1h` - Find recent failures
37+ - `temporal workflow describe --trace-root-cause --workflow-id <id>` - Trace workflow chain to leaf failure
3838- `temporal workflow show --compact --workflow-id <id>` - Get event timeline
3939- `temporal workflow describe --pending --workflow-id <id>` - Check pending activities/children
4040
@@ -70,8 +70,8 @@ Then load this into your agent framework's tool configuration.
7070At the beginning of each session, tell your AI:
7171
7272> "I'm using Temporal for workflow orchestration. When I have issues, use the ` temporal workflow ` CLI to debug. The commands are:
73- > - ` temporal workflow failures ` - find failures
74- > - ` temporal workflow diagnose ` - trace workflow chains
73+ > - ` temporal workflow list --failed ` - find failures
74+ > - ` temporal workflow describe --trace-root-cause ` - trace workflow chains
7575> - ` temporal workflow show --compact ` - see event history
7676> - ` temporal workflow describe --pending ` - check pending work
7777>
@@ -85,8 +85,8 @@ Test that your AI knows the commands by asking:
8585
8686** Expected response should include:**
8787``` bash
88- temporal workflow diagnose --workflow-id < id> --format json
89- temporal workflow failures --since 1h --follow-children --format json
88+ temporal workflow describe --trace-root-cause --workflow-id < id> --format json
89+ temporal workflow list --failed --since 1h --follow-children --format json
9090```
9191
9292If the AI suggests looking at logs, remind it about the workflow debugging commands (` failures ` , ` diagnose ` , ` show --compact ` , ` describe --pending ` ).
@@ -128,7 +128,7 @@ go run ./starter -question "What is Temporal?"
128128temporal workflow list
129129
130130# Use workflow diagnose to see what happened
131- temporal workflow diagnose --workflow-id < id> --format json
131+ temporal workflow describe --trace-root-cause --workflow-id < id> --format json
132132```
133133
134134** This teaches:** Using ` workflow diagnose ` to understand workflow state.
@@ -150,7 +150,7 @@ activity not registered: ProcessQuestion
150150
151151** AI uses workflow CLI to diagnose:**
152152``` bash
153- temporal workflow diagnose --workflow-id < id> --format json | jq ' .root_cause'
153+ temporal workflow describe --trace-root-cause --workflow-id < id> --format json | jq ' .root_cause'
154154# Shows: "activity not registered"
155155```
156156
@@ -241,8 +241,8 @@ go run ./starter -question "Very complex philosophical question"
241241
242242** Diagnose timeout:**
243243``` bash
244- temporal workflow failures --since 5m --format json
245- temporal workflow diagnose --workflow-id < id> --format json | jq ' .root_cause'
244+ temporal workflow list --failed --since 5m --format json
245+ temporal workflow describe --trace-root-cause --workflow-id < id> --format json | jq ' .root_cause'
246246# Shows: "activity StartToClose timeout"
247247```
248248
@@ -260,11 +260,11 @@ temporal workflow diagnose --workflow-id <id> --format json | jq '.root_cause'
260260
261261** Verify chain:**
262262``` bash
263- temporal workflow diagnose --workflow-id < id> --format json | jq ' .chain'
263+ temporal workflow describe --trace-root-cause --workflow-id < id> --format json | jq ' .chain'
264264# Shows parent-child hierarchy
265265
266266# Visualize the chain as a flowchart:
267- temporal workflow diagnose --workflow-id < id> --format mermaid
267+ temporal workflow describe --trace-root-cause --workflow-id < id> --format mermaid
268268```
269269
270270The flowchart will show:
@@ -283,13 +283,13 @@ Coordinator → ResearchAgent1
283283** AI suggests using agent CLI:**
284284``` bash
285285# Find recent failures
286- temporal workflow failures --since 10m --format json
286+ temporal workflow list --failed --since 10m --format json
287287
288288# Get detailed trace showing which child failed
289- temporal workflow diagnose --workflow-id < id> --format json | jq ' {depth: .depth, root_cause: .root_cause}'
289+ temporal workflow describe --trace-root-cause --workflow-id < id> --format json | jq ' {depth: .depth, root_cause: .root_cause}'
290290
291291# Use leaf-only to see actual failure, not parent wrapper
292- temporal workflow failures --since 10m --follow-children --leaf-only --format json
292+ temporal workflow list --failed --since 10m --follow-children --leaf-only --format json
293293```
294294
295295** This teaches:** Using ` --follow-children ` and ` --leaf-only ` for nested workflows.
@@ -302,7 +302,7 @@ temporal workflow failures --since 10m --follow-children --leaf-only --format js
302302
303303** Expected AI response:**
304304``` bash
305- temporal workflow diagnose --workflow-id coordinator-12345 --format mermaid
305+ temporal workflow describe --trace-root-cause --workflow-id coordinator-12345 --format mermaid
306306```
307307
308308** AI outputs this diagram:**
@@ -339,7 +339,7 @@ graph TD
339339go run ./starter -question " Mixed success question"
340340
341341# See partial results
342- temporal workflow diagnose --workflow-id < id> --format json
342+ temporal workflow describe --trace-root-cause --workflow-id < id> --format json
343343# Shows some children completed, some failed, parent still succeeded
344344```
345345
@@ -390,7 +390,7 @@ Synthesizer → Coordinator: ✅ Done
390390``` bash
391391go run ./starter -question " Gibberish input that produces bad results"
392392
393- temporal workflow failures --since 5m --compact-errors --format json | jq ' .failures[].root_cause'
393+ temporal workflow list --failed --since 5m --compact-errors --format json | jq ' .failures[].root_cause'
394394# Shows: "quality check failed: score 0.45 below threshold 0.7"
395395```
396396
@@ -426,14 +426,14 @@ temporal workflow describe --pending --workflow-id <id> --format json | jq '.pen
426426** Diagnose failures:**
427427``` bash
428428# After batch completes
429- temporal workflow failures --since 10m --format json | jq ' .total_count'
429+ temporal workflow list --failed --since 10m --format json | jq ' .total_count'
430430
431431# Group by error type to find patterns
432- temporal workflow failures --since 10m --group-by error --format json | jq ' .groups'
432+ temporal workflow list --failed --since 10m --group-by error --format json | jq ' .groups'
433433# Might show: "rate limit: 6, timeout: 2, success: 2"
434434
435435# Visualize as a pie chart - instantly see the breakdown:
436- temporal workflow failures --since 10m --group-by error --format mermaid
436+ temporal workflow list --failed --since 10m --group-by error --format mermaid
437437```
438438
439439The pie chart makes patterns obvious at a glance:
@@ -454,7 +454,7 @@ pie title Failures by error
454454
455455** Expected AI response:**
456456``` bash
457- temporal workflow failures --since 10m --follow-children --leaf-only --compact-errors --group-by error --format mermaid
457+ temporal workflow list --failed --since 10m --follow-children --leaf-only --compact-errors --group-by error --format mermaid
458458```
459459
460460** AI outputs this diagram:**
@@ -475,7 +475,7 @@ pie title Failures by error
475475
476476** AI response:**
477477``` bash
478- temporal workflow failures --since 10m --follow-children --group-by namespace --format mermaid
478+ temporal workflow list --failed --since 10m --follow-children --group-by namespace --format mermaid
479479```
480480
481481``` mermaid
@@ -504,8 +504,8 @@ pie title Failures by namespace
504504go run ./starter -load-test -count 20
505505
506506# Watch for timeouts vs retries
507- temporal workflow failures --since 10m --status TimedOut --format json
508- temporal workflow failures --since 10m --status Failed --format json
507+ temporal workflow list --failed --since 10m --status TimedOut --format json
508+ temporal workflow list --failed --since 10m --status Failed --format json
509509```
510510
511511---
@@ -607,7 +607,7 @@ go run ./starter -question "Very long research"
607607temporal workflow cancel --workflow-id < id>
608608
609609# Check that children were also cancelled
610- temporal workflow failures --since 5m --format json | jq ' .failures[] | select(.status == "Canceled")'
610+ temporal workflow list --failed --since 5m --format json | jq ' .failures[] | select(.status == "Canceled")'
611611```
612612
613613---
@@ -621,27 +621,27 @@ temporal workflow failures --since 5m --format json | jq '.failures[] | select(.
621621** AI walks through debugging:**
622622``` bash
623623# Step 1: Visualize the chain - immediately see where failure occurred
624- temporal workflow diagnose --workflow-id < id> --format mermaid
624+ temporal workflow describe --trace-root-cause --workflow-id < id> --format mermaid
625625# The flowchart highlights the failing path in red
626626
627627# Step 2: Get the JSON details
628- temporal workflow diagnose --workflow-id < id> --format json | jq ' .root_cause'
628+ temporal workflow describe --trace-root-cause --workflow-id < id> --format json | jq ' .root_cause'
629629# Shows: error in SynthesizerWorkflow
630630
631631# Step 3: Trace the child
632- temporal workflow diagnose --workflow-id < synth-id> --format json | jq ' .root_cause'
632+ temporal workflow describe --trace-root-cause --workflow-id < synth-id> --format json | jq ' .root_cause'
633633# Shows: "no findings to synthesize"
634634
635635# Step 4: Visualize the timeline to see what happened
636636temporal workflow show --compact --workflow-id < id> --format mermaid
637637# Sequence diagram shows: 3 research agents all returned errors!
638638
639639# Step 5: Find the actual root cause
640- temporal workflow failures --since 10m --follow-children --leaf-only --compact-errors --format json
640+ temporal workflow list --failed --since 10m --follow-children --leaf-only --compact-errors --format json
641641# Shows: "API key expired"
642642
643643# Step 6: Visualize failure breakdown
644- temporal workflow failures --since 10m --group-by error --format mermaid
644+ temporal workflow list --failed --since 10m --group-by error --format mermaid
645645# Pie chart confirms: 100% of failures are "API key expired"
646646```
647647
@@ -658,7 +658,7 @@ temporal workflow failures --since 10m --group-by error --format mermaid
658658"Let me trace the workflow and show you what happened."
659659
660660``` bash
661- temporal workflow diagnose --workflow-id coordinator-99999 --format mermaid
661+ temporal workflow describe --trace-root-cause --workflow-id coordinator-99999 --format mermaid
662662```
663663
664664``` mermaid
@@ -680,7 +680,7 @@ graph TD
680680** AI explains:** "The diagram shows the Coordinator spawned 4 child workflows. All 3 ResearchAgents failed, and the Synthesizer also failed because it had no data to synthesize. But wait - this doesn't show WHY the research agents failed. Let me dig deeper..."
681681
682682``` bash
683- temporal workflow failures --since 10m --follow-children --leaf-only --group-by error --format mermaid
683+ temporal workflow list --failed --since 10m --follow-children --leaf-only --group-by error --format mermaid
684684```
685685
686686``` mermaid
@@ -768,7 +768,7 @@ The AI should respond with:
768768After completing all phases, you should:
769769
7707701 . ✅ Have a working multi-agent research system
771- 2 . ✅ Understand how to use ` temporal workflow diagnose ` for debugging
771+ 2 . ✅ Understand how to use ` temporal workflow describe --trace-root-cause ` for debugging
7727723 . ✅ Know when to use ` --follow-children ` and ` --leaf-only `
7737734 . ✅ Be able to analyze failures with ` --group-by `
7747745 . ✅ Use ` workflow describe --pending ` to check pending work
0 commit comments