[{"data":1,"prerenderedAt":531},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fguides\u002Fsupervise-workflows":3},{"id":4,"title":5,"body":6,"description":523,"extension":524,"meta":525,"navigation":526,"path":527,"seo":528,"stem":529,"__hash__":530},"docs\u002Fdocs\u002Fguides\u002Fsupervise-workflows.md","Supervise a dynamic workflow",{"type":7,"value":8,"toc":514},"minimark",[9,13,22,25,30,33,98,105,114,118,121,128,134,137,143,148,155,163,167,174,206,213,236,325,328,332,335,343,367,373,377,383,393,403,422,426,429,456,462,465,470,477,481,484,489,492,510],[10,11,5],"h1",{"id":12},"supervise-a-dynamic-workflow",[14,15,16,17,21],"p",{},"A dynamic workflow turns Slo into a small team. An orchestrator splits the job into phases and gives each phase to its own sub-agent: a separate ",[18,19,20],"code",{},"slo"," process with a clean context. That's great for long jobs, and it raises the obvious questions. What is it doing? Is it stuck? How much is left? What went wrong?",[14,23,24],{},"This guide answers each of those.",[26,27,29],"h2",{"id":28},"_1-before-a-long-run-check-your-timeouts","1. Before a long run, check your timeouts",[14,31,32],{},"The defaults are set for long work. Only change them if you know why:",[34,35,40],"pre",{"className":36,"code":37,"language":38,"meta":39,"style":39},"language-bash shiki shiki-themes github-dark-high-contrast","export SLO_STREAM_INACTIVITY_TIMEOUT_SECONDS=10800   # orchestrator can think for up to 3h without output (default)\nexport SLO_SUBAGENT_INACTIVITY_TIMEOUT_SECONDS=7200  # a sub-agent silent for 2h is treated as hung (default)\nexport SLO_SUBAGENT_MAX_CONCURRENCY=6                # sub-agents at once (default 4)\n","bash","",[18,41,42,66,82],{"__ignoreMap":39},[43,44,47,51,55,58,62],"span",{"class":45,"line":46},"line",1,[43,48,50],{"class":49},"sWyjQ","export",[43,52,54],{"class":53},"sMAXC"," SLO_STREAM_INACTIVITY_TIMEOUT_SECONDS",[43,56,57],{"class":49},"=",[43,59,61],{"class":60},"sCcAr","10800",[43,63,65],{"class":64},"sQrFR","   # orchestrator can think for up to 3h without output (default)\n",[43,67,69,71,74,76,79],{"class":45,"line":68},2,[43,70,50],{"class":49},[43,72,73],{"class":53}," SLO_SUBAGENT_INACTIVITY_TIMEOUT_SECONDS",[43,75,57],{"class":49},[43,77,78],{"class":60},"7200",[43,80,81],{"class":64},"  # a sub-agent silent for 2h is treated as hung (default)\n",[43,83,85,87,90,92,95],{"class":45,"line":84},3,[43,86,50],{"class":49},[43,88,89],{"class":53}," SLO_SUBAGENT_MAX_CONCURRENCY",[43,91,57],{"class":49},[43,93,94],{"class":60},"6",[43,96,97],{"class":64},"                # sub-agents at once (default 4)\n",[99,100,102],"note",{"kind":101},"warning",[14,103,104],{},"Don't lower the inactivity timeouts to \"catch hangs sooner\". A big synthesis step can legitimately be quiet for a long time, and a low timeout kills good work.",[14,106,107,108,113],{},"The full list is in ",[109,110,112],"a",{"href":111},"\u002Fdocs\u002Freference\u002Fenvironment-variables#long-running-workflows","Environment variables",".",[26,115,117],{"id":116},"_2-start-it","2. Start it",[14,119,120],{},"There are two ways, and the words you use decide which one you get.",[14,122,123,127],{},[124,125,126],"strong",{},"In your session (you wait)."," Say \"dynamic workflows\":",[129,130,131],"blockquote",{},[14,132,133],{},"\"Use dynamic workflows to run the code-test-review workflow for task 12.b in specifications\u002F12-refunds\u002F.\"",[14,135,136],{},"The orchestrator runs inside your current session. Your prompt is busy until it finishes.",[14,138,139,142],{},[124,140,141],{},"Detached (you keep working)."," Add \"headless\", \"detached\", \"independent\", \"in the background\" or \"without blocking\":",[129,144,145],{},[14,146,147],{},"\"Run the code-test-review workflow for task 12.b detached.\"",[14,149,150,151,154],{},"Slo launches the orchestrator as its own process and hands you back the prompt within seconds, with a workflow id like ",[18,152,153],{},"wf-3fa2",". Progress arrives as notes in your session. You can have two detached workflows running per session at once.",[14,156,157,158,162],{},"Either way, the more your request looks like a ",[109,159,161],{"href":160},"\u002Fdocs\u002Fguides\u002Fwrite-a-brief","good brief",", the better. The orchestrator writes each sub-agent a self-contained prompt from yours, so boundaries you state are boundaries every sub-agent gets.",[26,164,166],{"id":165},"_3-watch-it","3. Watch it",[14,168,169,170,173],{},"When the first sub-agent starts, Slo opens a new terminal window running ",[18,171,172],{},"slo visualize",". If it can't open one, it prints the command instead:",[34,175,177],{"className":36,"code":176,"language":38,"meta":39,"style":39},"slo visualize --session \u003Csession-id> --follow\n",[18,178,179],{"__ignoreMap":39},[43,180,181,184,188,191,194,197,200,203],{"class":45,"line":46},[43,182,20],{"class":183},"s_sBn",[43,185,187],{"class":186},"sTRMh"," visualize",[43,189,190],{"class":60}," --session",[43,192,193],{"class":49}," \u003C",[43,195,196],{"class":186},"session-i",[43,198,199],{"class":53},"d",[43,201,202],{"class":49},">",[43,204,205],{"class":60}," --follow\n",[14,207,208],{},[209,210],"img",{"alt":211,"src":212},"The slo visualize TUI: sub-agents on the left, the selected sub-agent's transcript on the right.","\u002Fmedia\u002Fvisualize-tui.svg",[14,214,215,216,219,220,223,224,227,228,231,232,235],{},"The left side lists every sub-agent: ",[18,217,218],{},"⏳"," running, ",[18,221,222],{},"✓"," completed, ",[18,225,226],{},"✗"," failed, ",[18,229,230],{},"⊘"," aborted, ",[18,233,234],{},"◌"," pending. Pick one with the arrow keys and Enter to read its transcript.",[237,238,239,252],"table",{},[240,241,242],"thead",{},[243,244,245,249],"tr",{},[246,247,248],"th",{},"Key",[246,250,251],{},"What it does",[253,254,255,265,275,285,295,305,315],"tbody",{},[243,256,257,262],{},[258,259,260],"td",{},[18,261,199],{},[258,263,264],{},"Show the diagnostics pane (the sub-agent's stderr). Start here when something fails.",[243,266,267,272],{},[258,268,269],{},[18,270,271],{},"o",[258,273,274],{},"Show the orchestrator's own prompt and context.",[243,276,277,282],{},[258,278,279],{},[18,280,281],{},"v",[258,283,284],{},"Switch between the transcript and the exact command that launched the sub-agent.",[243,286,287,292],{},[258,288,289],{},[18,290,291],{},"t",[258,293,294],{},"Cycle the display format.",[243,296,297,302],{},[258,298,299],{},[18,300,301],{},"f",[258,303,304],{},"Turn live updates on or off.",[243,306,307,312],{},[258,308,309],{},[18,310,311],{},"r",[258,313,314],{},"Refresh now.",[243,316,317,322],{},[258,318,319],{},[18,320,321],{},"q",[258,323,324],{},"Quit. The workflow keeps running.",[14,326,327],{},"Closing the visualizer never affects the workflow. You can open it again at any point, including after the run is over.",[26,329,331],{"id":330},"_4-check-on-detached-workflows","4. Check on detached workflows",[14,333,334],{},"In the session that launched them:",[34,336,341],{"className":337,"code":339,"language":340,"meta":39},[338],"language-text","\u002Fworkflows\n","text",[18,342,339],{"__ignoreMap":39},[14,344,345,346,349,350,349,353,349,356,349,359,362,363,366],{},"Each row shows the id, its state (",[18,347,348],{},"launching",", ",[18,351,352],{},"running",[18,354,355],{},"completed",[18,357,358],{},"failed",[18,360,361],{},"aborted"," or ",[18,364,365],{},"stalled","), when it started and how many sub-agents are live.",[14,368,369,372],{},[124,370,371],{},"Stalled"," means the orchestrator process has died without finishing: no heartbeat for 45 seconds and no running process. It won't fix itself.",[26,374,376],{"id":375},"_5-stop-dismiss-resume","5. Stop, dismiss, resume",[34,378,381],{"className":379,"code":380,"language":340,"meta":39},[338],"\u002Fworkflows abort wf-3fa2     stop it and all its sub-agents\n\u002Fworkflows resume wf-3fa2    restart a stalled or failed workflow from its history\n\u002Fworkflows dismiss wf-3fa2   acknowledge a stalled one you don't want back\n",[18,382,380],{"__ignoreMap":39},[14,384,385,388,389,392],{},[18,386,387],{},"abort"," asks the whole process group to stop, and force-kills it after 5 seconds if needed. ",[18,390,391],{},"resume"," replays the orchestrator's history and carries on with the original brief.",[14,394,395,396,362,399,402],{},"For an in-session workflow, ",[18,397,398],{},"Ctrl+C",[18,400,401],{},"\u002Fabort"," stops it.",[99,404,405],{"kind":101},[14,406,407,408,362,411,414,415,418,419,113],{},"Never stop a workflow with ",[18,409,410],{},"kill",[18,412,413],{},"pkill",". Slo loses track of what happened, and later launches in that session can fail with ",[18,416,417],{},"no evidence-backed correction",". Use ",[18,420,421],{},"\u002Fworkflows abort",[26,423,425],{"id":424},"_6-when-a-sub-agent-fails","6. When a sub-agent fails",[14,427,428],{},"The orchestrator retries a failed phase once. If it fails again, find out why in this order:",[430,431,432,439,450],"ol",{},[433,434,435,438],"li",{},[124,436,437],{},"Read the orchestrator's summary."," Each failed sub-agent's answer is included. If it died without answering, you'll see the last lines of its stderr.",[433,440,441,444,445,447,448,113],{},[124,442,443],{},"Open the diagnostics pane."," In ",[18,446,172],{},", select the sub-agent and press ",[18,449,199],{},[433,451,452,455],{},[124,453,454],{},"Read the files."," Everything is on disk:",[34,457,460],{"className":458,"code":459,"language":340,"meta":39},[338],"~\u002F.slo\u002Fsessions\u002Fhistory\u002F\u003Corchestrator-session>\u002Fchildren\u002F\u003Csub-agent>\u002F\n├── stdout.jsonl     the sub-agent's event stream\n├── stderr.jsonl     errors and lifecycle messages\n└── status.json      final state and exit code\n",[18,461,459],{"__ignoreMap":39},[14,463,464],{},"Or ask Slo, which is often fastest:",[129,466,467],{},[14,468,469],{},"\"Why did the two sub-agents in the last workflow fail? Check their stderr and status files and give me specific reasons.\"",[14,471,472,473,113],{},"The common causes, and what to do about them, are in ",[109,474,476],{"href":475},"\u002Fdocs\u002Freference\u002Ftroubleshooting#dynamic-workflows","Troubleshooting",[26,478,480],{"id":479},"_7-know-when-its-done","7. Know when it's done",[14,482,483],{},"Don't ask \"are we done?\" and trust the answer. Ask Slo to check against the spec:",[129,485,486],{},[14,487,488],{},"\"Is task 12.b complete against specifications\u002F12-refunds\u002F? List what's done, what's partial and what's missing, with file paths.\"",[14,490,491],{},"Slo has a completion-check skill for exactly this. It returns a completion percentage, what's implemented, and what's left with the files involved. The code-test-review workflow runs the same check itself and loops until it reaches 100%.",[99,493,495],{"kind":494},"check",[496,497,498,501,504,507],"ul",{},[433,499,500],{},"Your timeouts are at the defaults or higher.",[433,502,503],{},"You know whether you started the workflow in-session or detached.",[433,505,506],{},"You can watch it, abort it, resume it, and find a failed sub-agent's stderr.",[433,508,509],{},"You check completion against the spec, not from memory.",[511,512,513],"style",{},"html pre.shiki code .sWyjQ, html code.shiki .sWyjQ{--shiki-default:#FF9492}html pre.shiki code .sMAXC, html code.shiki .sMAXC{--shiki-default:#F0F3F6}html pre.shiki code .sCcAr, html code.shiki .sCcAr{--shiki-default:#91CBFF}html pre.shiki code .sQrFR, html code.shiki .sQrFR{--shiki-default:#BDC4CC}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s_sBn, html code.shiki .s_sBn{--shiki-default:#FFB757}html pre.shiki code .sTRMh, html code.shiki .sTRMh{--shiki-default:#ADDCFF}",{"title":39,"searchDepth":68,"depth":68,"links":515},[516,517,518,519,520,521,522],{"id":28,"depth":68,"text":29},{"id":116,"depth":68,"text":117},{"id":165,"depth":68,"text":166},{"id":330,"depth":68,"text":331},{"id":375,"depth":68,"text":376},{"id":424,"depth":68,"text":425},{"id":479,"depth":68,"text":480},"Start a dynamic workflow, watch its sub-agents, stop or resume it, and find out why a sub-agent failed.","md",{},true,"\u002Fdocs\u002Fguides\u002Fsupervise-workflows",{"title":5,"description":523},"docs\u002Fguides\u002Fsupervise-workflows","lk1w0JFZEanofR1lc5AumU96rZFZxl07XqA6vJE5r5E",1791641282711]