[{"data":1,"prerenderedAt":1400},["ShallowReactive",2],{"docs-\u002Fdocs\u002Ffeatures\u002Fheadless":3},{"id":4,"title":5,"body":6,"description":1393,"extension":1394,"meta":1395,"navigation":348,"path":1396,"seo":1397,"stem":1398,"__hash__":1399},"docs\u002Fdocs\u002Ffeatures\u002Fheadless.md","Headless & Server Agent",{"type":7,"value":8,"toc":1378},"minimark",[9,13,26,40,47,52,62,91,102,121,157,176,180,183,188,225,230,262,267,323,328,591,595,600,669,754,758,764,799,827,831,1002,1006,1016,1021,1059,1063,1073,1170,1176,1182,1186,1195,1230,1234,1292,1296,1302,1309,1318,1342,1346,1374],[10,11,5],"h1",{"id":12},"headless-server-agent",[14,15,16,17,21,22,25],"p",{},"Slo has two faces. The ",[18,19,20],"strong",{},"TUI"," is where you think — panes, spinners, a live tree of the agent's work. The ",[18,23,24],{},"headless runner"," is where you work at scale: no terminal to occupy, no blocking cursor, just structured bytes on stdout and a clean exit code. Same agent, same skills, same conventions — different surface.",[14,27,28,29,34,35,39],{},"Run headless when you want Slo inside a bash script, a CI step, a cron job, a webhook handler, or as a child process under an ",[30,31,33],"a",{"href":32},"\u002Fdocs\u002Ffeatures\u002Fdynamic-workflows","orchestrator",". Everything the TUI can do, ",[36,37,38],"code",{},"slo run"," can do without a human in the loop.",[14,41,42],{},[43,44],"img",{"alt":45,"src":46},"slo run streaming validated JSONL events to stdout, then piped through jq to extract the final answer.","\u002Fmedia\u002Fheadless-jsonl.svg",[48,49,51],"h2",{"id":50},"step-1-your-first-headless-run","Step 1 — Your first headless run",[14,53,54,55,57,58,61],{},"The command is ",[36,56,38],{},". The prompt is required; pass it with ",[36,59,60],{},"-p",":",[63,64,69],"pre",{"className":65,"code":66,"language":67,"meta":68,"style":68},"language-bash shiki shiki-themes github-dark-high-contrast","slo run -p \"What is the current date?\"\n","bash","",[36,70,71],{"__ignoreMap":68},[72,73,76,80,84,88],"span",{"class":74,"line":75},"line",1,[72,77,79],{"class":78},"s_sBn","slo",[72,81,83],{"class":82},"sTRMh"," run",[72,85,87],{"class":86},"sCcAr"," -p",[72,89,90],{"class":82}," \"What is the current date?\"\n",[14,92,93,94,97,98,101],{},"Stdout is ",[18,95,96],{},"always JSONL"," — one JSON object per line, each a validated stream event. The ",[36,99,100],{},"--json"," flag is accepted for compatibility but the output format is the same with or without it:",[63,103,105],{"className":65,"code":104,"language":67,"meta":68,"style":68},"slo run -p \"What is the current date?\" --json\n",[36,106,107],{"__ignoreMap":68},[72,108,109,111,113,115,118],{"class":74,"line":75},[72,110,79],{"class":78},[72,112,83],{"class":82},[72,114,87],{"class":86},[72,116,117],{"class":82}," \"What is the current date?\"",[72,119,120],{"class":86}," --json\n",[63,122,126],{"className":123,"code":124,"language":125,"meta":68,"style":68},"language-jsonl shiki shiki-themes github-dark-high-contrast","{\"kind\":\"text_start\",\"iteration\":0,\"block_id\":\"blk-0\"}\n{\"kind\":\"text_delta\",\"iteration\":0,\"delta\":\"The current date is \"}\n{\"kind\":\"text_delta\",\"iteration\":0,\"delta\":\"2026-07-18.\"}\n{\"kind\":\"text_end\",\"iteration\":0,\"content\":\"The current date is 2026-07-18.\"}\n{\"kind\":\"run_completed\",\"iteration\":0,\"content\":\"The current date is 2026-07-18.\"}\n","jsonl",[36,127,128,133,139,145,151],{"__ignoreMap":68},[72,129,130],{"class":74,"line":75},[72,131,132],{},"{\"kind\":\"text_start\",\"iteration\":0,\"block_id\":\"blk-0\"}\n",[72,134,136],{"class":74,"line":135},2,[72,137,138],{},"{\"kind\":\"text_delta\",\"iteration\":0,\"delta\":\"The current date is \"}\n",[72,140,142],{"class":74,"line":141},3,[72,143,144],{},"{\"kind\":\"text_delta\",\"iteration\":0,\"delta\":\"2026-07-18.\"}\n",[72,146,148],{"class":74,"line":147},4,[72,149,150],{},"{\"kind\":\"text_end\",\"iteration\":0,\"content\":\"The current date is 2026-07-18.\"}\n",[72,152,154],{"class":74,"line":153},5,[72,155,156],{},"{\"kind\":\"run_completed\",\"iteration\":0,\"content\":\"The current date is 2026-07-18.\"}\n",[14,158,159,160,163,164,167,168,171,172,175],{},"The ",[18,161,162],{},"last line is always terminal",": ",[36,165,166],{},"run_completed"," (success), ",[36,169,170],{},"run_failed",", or ",[36,173,174],{},"run_aborted",".",[48,177,179],{"id":178},"step-2-consume-the-stream","Step 2 — Consume the stream",[14,181,182],{},"Because every line is structured, you compose Slo with the usual Unix tools.",[14,184,185],{},[18,186,187],{},"Extract just the final answer:",[63,189,191],{"className":65,"code":190,"language":67,"meta":68,"style":68},"slo run -p \"Summarize the architecture of src\u002F\" --json \\\n  | jq -r 'select(.kind == \"run_completed\") | .content'\n",[36,192,193,211],{"__ignoreMap":68},[72,194,195,197,199,201,204,207],{"class":74,"line":75},[72,196,79],{"class":78},[72,198,83],{"class":82},[72,200,87],{"class":86},[72,202,203],{"class":82}," \"Summarize the architecture of src\u002F\"",[72,205,206],{"class":86}," --json",[72,208,210],{"class":209},"sWyjQ"," \\\n",[72,212,213,216,219,222],{"class":74,"line":135},[72,214,215],{"class":209},"  |",[72,217,218],{"class":78}," jq",[72,220,221],{"class":86}," -r",[72,223,224],{"class":82}," 'select(.kind == \"run_completed\") | .content'\n",[14,226,227],{},[18,228,229],{},"Stream the answer to your terminal in real time:",[63,231,233],{"className":65,"code":232,"language":67,"meta":68,"style":68},"slo run -p \"Write a haiku about Python\" --json \\\n  | jq -j 'select(.kind == \"text_delta\") | .delta'\n",[36,234,235,250],{"__ignoreMap":68},[72,236,237,239,241,243,246,248],{"class":74,"line":75},[72,238,79],{"class":78},[72,240,83],{"class":82},[72,242,87],{"class":86},[72,244,245],{"class":82}," \"Write a haiku about Python\"",[72,247,206],{"class":86},[72,249,210],{"class":209},[72,251,252,254,256,259],{"class":74,"line":135},[72,253,215],{"class":209},[72,255,218],{"class":78},[72,257,258],{"class":86}," -j",[72,260,261],{"class":82}," 'select(.kind == \"text_delta\") | .delta'\n",[14,263,264],{},[18,265,266],{},"Count tool calls by name:",[63,268,270],{"className":65,"code":269,"language":67,"meta":68,"style":68},"slo run -p \"Refactor utils.py\" --json \\\n  | jq -r 'select(.kind == \"tool_call_end\") | .tool_name' \\\n  | sort | uniq -c | sort -rn\n",[36,271,272,287,300],{"__ignoreMap":68},[72,273,274,276,278,280,283,285],{"class":74,"line":75},[72,275,79],{"class":78},[72,277,83],{"class":82},[72,279,87],{"class":86},[72,281,282],{"class":82}," \"Refactor utils.py\"",[72,284,206],{"class":86},[72,286,210],{"class":209},[72,288,289,291,293,295,298],{"class":74,"line":135},[72,290,215],{"class":209},[72,292,218],{"class":78},[72,294,221],{"class":86},[72,296,297],{"class":82}," 'select(.kind == \"tool_call_end\") | .tool_name'",[72,299,210],{"class":209},[72,301,302,304,307,310,313,316,318,320],{"class":74,"line":141},[72,303,215],{"class":209},[72,305,306],{"class":78}," sort",[72,308,309],{"class":209}," |",[72,311,312],{"class":78}," uniq",[72,314,315],{"class":86}," -c",[72,317,309],{"class":209},[72,319,306],{"class":78},[72,321,322],{"class":86}," -rn\n",[14,324,325],{},[18,326,327],{},"Drive it from Python:",[63,329,333],{"className":330,"code":331,"language":332,"meta":68,"style":68},"language-python shiki shiki-themes github-dark-high-contrast","import json, subprocess\n\nproc = subprocess.Popen(\n    [\"slo\", \"run\", \"-p\", \"Analyze src\u002F\", \"--json\"],\n    stdout=subprocess.PIPE, text=True,\n)\nfor line in proc.stdout:\n    event = json.loads(line)\n    if event[\"kind\"] == \"text_delta\":\n        print(event.get(\"delta\", \"\"), end=\"\", flush=True)\n    elif event[\"kind\"] in {\"run_completed\", \"run_failed\", \"run_aborted\"}:\n        print(f\"\\nTerminal: {event['kind']}\")\nproc.wait()\n","python",[36,334,335,344,350,361,393,419,425,440,451,475,513,546,585],{"__ignoreMap":68},[72,336,337,340],{"class":74,"line":75},[72,338,339],{"class":209},"import",[72,341,343],{"class":342},"sMAXC"," json, subprocess\n",[72,345,346],{"class":74,"line":135},[72,347,349],{"emptyLinePlaceholder":348},true,"\n",[72,351,352,355,358],{"class":74,"line":141},[72,353,354],{"class":342},"proc ",[72,356,357],{"class":209},"=",[72,359,360],{"class":342}," subprocess.Popen(\n",[72,362,363,366,369,372,375,377,380,382,385,387,390],{"class":74,"line":147},[72,364,365],{"class":342},"    [",[72,367,368],{"class":82},"\"slo\"",[72,370,371],{"class":342},", ",[72,373,374],{"class":82},"\"run\"",[72,376,371],{"class":342},[72,378,379],{"class":82},"\"-p\"",[72,381,371],{"class":342},[72,383,384],{"class":82},"\"Analyze src\u002F\"",[72,386,371],{"class":342},[72,388,389],{"class":82},"\"--json\"",[72,391,392],{"class":342},"],\n",[72,394,395,398,400,403,406,408,411,413,416],{"class":74,"line":153},[72,396,397],{"class":78},"    stdout",[72,399,357],{"class":209},[72,401,402],{"class":342},"subprocess.",[72,404,405],{"class":86},"PIPE",[72,407,371],{"class":342},[72,409,410],{"class":78},"text",[72,412,357],{"class":209},[72,414,415],{"class":86},"True",[72,417,418],{"class":342},",\n",[72,420,422],{"class":74,"line":421},6,[72,423,424],{"class":342},")\n",[72,426,428,431,434,437],{"class":74,"line":427},7,[72,429,430],{"class":209},"for",[72,432,433],{"class":342}," line ",[72,435,436],{"class":209},"in",[72,438,439],{"class":342}," proc.stdout:\n",[72,441,443,446,448],{"class":74,"line":442},8,[72,444,445],{"class":342},"    event ",[72,447,357],{"class":209},[72,449,450],{"class":342}," json.loads(line)\n",[72,452,454,457,460,463,466,469,472],{"class":74,"line":453},9,[72,455,456],{"class":209},"    if",[72,458,459],{"class":342}," event[",[72,461,462],{"class":82},"\"kind\"",[72,464,465],{"class":342},"] ",[72,467,468],{"class":209},"==",[72,470,471],{"class":82}," \"text_delta\"",[72,473,474],{"class":342},":\n",[72,476,478,481,484,487,489,492,495,498,500,502,504,507,509,511],{"class":74,"line":477},10,[72,479,480],{"class":86},"        print",[72,482,483],{"class":342},"(event.get(",[72,485,486],{"class":82},"\"delta\"",[72,488,371],{"class":342},[72,490,491],{"class":82},"\"\"",[72,493,494],{"class":342},"), ",[72,496,497],{"class":78},"end",[72,499,357],{"class":209},[72,501,491],{"class":82},[72,503,371],{"class":342},[72,505,506],{"class":78},"flush",[72,508,357],{"class":209},[72,510,415],{"class":86},[72,512,424],{"class":342},[72,514,516,519,521,523,525,527,530,533,535,538,540,543],{"class":74,"line":515},11,[72,517,518],{"class":209},"    elif",[72,520,459],{"class":342},[72,522,462],{"class":82},[72,524,465],{"class":342},[72,526,436],{"class":209},[72,528,529],{"class":342}," {",[72,531,532],{"class":82},"\"run_completed\"",[72,534,371],{"class":342},[72,536,537],{"class":82},"\"run_failed\"",[72,539,371],{"class":342},[72,541,542],{"class":82},"\"run_aborted\"",[72,544,545],{"class":342},"}:\n",[72,547,549,551,554,557,560,563,566,569,572,575,578,581,583],{"class":74,"line":548},12,[72,550,480],{"class":86},[72,552,553],{"class":342},"(",[72,555,556],{"class":209},"f",[72,558,559],{"class":82},"\"",[72,561,562],{"class":209},"\\n",[72,564,565],{"class":82},"Terminal: ",[72,567,568],{"class":209},"{",[72,570,571],{"class":342},"event[",[72,573,574],{"class":82},"'kind'",[72,576,577],{"class":342},"]",[72,579,580],{"class":209},"}",[72,582,559],{"class":82},[72,584,424],{"class":342},[72,586,588],{"class":74,"line":587},13,[72,589,590],{"class":342},"proc.wait()\n",[48,592,594],{"id":593},"step-3-exit-codes","Step 3 — Exit codes",[14,596,597,599],{},[36,598,38],{}," maps the terminal event to a POSIX exit code, so scripts can branch on it:",[601,602,603,619],"table",{},[604,605,606],"thead",{},[607,608,609,613,616],"tr",{},[610,611,612],"th",{},"Terminal event",[610,614,615],{},"Exit code",[610,617,618],{},"Meaning",[620,621,622,637,651],"tbody",{},[607,623,624,629,634],{},[625,626,627],"td",{},[36,628,166],{},[625,630,631],{},[36,632,633],{},"0",[625,635,636],{},"Success",[607,638,639,643,648],{},[625,640,641],{},[36,642,170],{},[625,644,645],{},[36,646,647],{},"1",[625,649,650],{},"Failure or agent error",[607,652,653,657,662],{},[625,654,655],{},[36,656,174],{},[625,658,659],{},[36,660,661],{},"2",[625,663,664,665,668],{},"Aborted (SIGINT, ",[36,666,667],{},"timeout",", orchestrator cancel)",[63,670,672],{"className":65,"code":671,"language":67,"meta":68,"style":68},"slo run -p \"Run the linter\" --json > lint.jsonl\ncase $? in\n  0) echo \"Linter passed.\" ;;\n  1) echo \"Linter failed or agent errored.\" ;;\n  2) echo \"Run was aborted.\" ;;\nesac\n",[36,673,674,693,704,721,735,749],{"__ignoreMap":68},[72,675,676,678,680,682,685,687,690],{"class":74,"line":75},[72,677,79],{"class":78},[72,679,83],{"class":82},[72,681,87],{"class":86},[72,683,684],{"class":82}," \"Run the linter\"",[72,686,206],{"class":86},[72,688,689],{"class":209}," >",[72,691,692],{"class":82}," lint.jsonl\n",[72,694,695,698,701],{"class":74,"line":135},[72,696,697],{"class":209},"case",[72,699,700],{"class":86}," $?",[72,702,703],{"class":209}," in\n",[72,705,706,709,712,715,718],{"class":74,"line":141},[72,707,708],{"class":82},"  0",[72,710,711],{"class":209},")",[72,713,714],{"class":86}," echo",[72,716,717],{"class":82}," \"Linter passed.\"",[72,719,720],{"class":342}," ;;\n",[72,722,723,726,728,730,733],{"class":74,"line":147},[72,724,725],{"class":82},"  1",[72,727,711],{"class":209},[72,729,714],{"class":86},[72,731,732],{"class":82}," \"Linter failed or agent errored.\"",[72,734,720],{"class":342},[72,736,737,740,742,744,747],{"class":74,"line":153},[72,738,739],{"class":82},"  2",[72,741,711],{"class":209},[72,743,714],{"class":86},[72,745,746],{"class":82}," \"Run was aborted.\"",[72,748,720],{"class":342},[72,750,751],{"class":74,"line":421},[72,752,753],{"class":209},"esac\n",[48,755,757],{"id":756},"step-4-stdout-vs-stderr","Step 4 — stdout vs stderr",[14,759,760,761,61],{},"The two streams are ",[18,762,763],{},"both structured and independently parseable",[765,766,767,783],"ul",{},[768,769,770,773,774,371,777,371,780,782],"li",{},[18,771,772],{},"stdout"," carries the agent event stream (",[36,775,776],{},"text_delta",[36,778,779],{},"tool_call_end",[36,781,166],{},", …).",[768,784,785,788,789,371,792,371,795,798],{},[18,786,787],{},"stderr"," carries structured lifecycle JSONL — ",[36,790,791],{},"headless_session_started",[36,793,794],{},"headless_run_completed",[36,796,797],{},"headless_run_failed",", and friends — one JSON object per line.",[63,800,802],{"className":65,"code":801,"language":67,"meta":68,"style":68},"slo run -p \"Refactor utils.py\" --json > output.jsonl 2> run.log\n",[36,803,804],{"__ignoreMap":68},[72,805,806,808,810,812,814,816,818,821,824],{"class":74,"line":75},[72,807,79],{"class":78},[72,809,83],{"class":82},[72,811,87],{"class":86},[72,813,282],{"class":82},[72,815,206],{"class":86},[72,817,689],{"class":209},[72,819,820],{"class":82}," output.jsonl",[72,822,823],{"class":209}," 2>",[72,825,826],{"class":82}," run.log\n",[48,828,830],{"id":829},"common-flags","Common flags",[601,832,833,846],{},[604,834,835],{},[607,836,837,840,843],{},[610,838,839],{},"Flag",[610,841,842],{},"Default",[610,844,845],{},"What it does",[620,847,848,866,886,917,932,947,962,975,990],{},[607,849,850,857,863],{},[625,851,852,371,854],{},[36,853,60],{},[36,855,856],{},"--prompt",[625,858,859],{},[860,861,862],"em",{},"required",[625,864,865],{},"The prompt to execute.",[607,867,868,873,876],{},[625,869,870],{},[36,871,872],{},"--model",[625,874,875],{},"preference",[625,877,878,879,371,882,885],{},"Override the model for this run (e.g. ",[36,880,881],{},"claude-opus-4-8",[36,883,884],{},"claude-haiku-4-5",").",[607,887,888,893,896],{},[625,889,890],{},[36,891,892],{},"--reasoning",[625,894,895],{},"model default",[625,897,898,899,371,902,371,905,371,908,371,911,371,914,175],{},"Reasoning level: ",[36,900,901],{},"off",[36,903,904],{},"minimal",[36,906,907],{},"low",[36,909,910],{},"medium",[36,912,913],{},"high",[36,915,916],{},"xhigh",[607,918,919,924,929],{},[625,920,921],{},[36,922,923],{},"--cwd",[625,925,926],{},[36,927,928],{},"$PWD",[625,930,931],{},"Working directory the agent reads and writes against.",[607,933,934,939,941],{},[625,935,936],{},[36,937,938],{},"--enable-history",[625,940,901],{},[625,942,943,944,885],{},"Persist the session to disk (required for ",[36,945,946],{},"--resume",[607,948,949,954,957],{},[625,950,951],{},[36,952,953],{},"--resume \u003Cref>",[625,955,956],{},"—",[625,958,959,960,885],{},"Resume a session by id or unique name (implies ",[36,961,938],{},[607,963,964,969,972],{},[625,965,966],{},[36,967,968],{},"--session-id \u003Cval>",[625,970,971],{},"generated",[625,973,974],{},"Explicit session id (UUID or slug).",[607,976,977,982,984],{},[625,978,979],{},[36,980,981],{},"--orchestrator",[625,983,901],{},[625,985,986,987,175],{},"Attach a sub-agent pool — enables ",[30,988,989],{"href":32},"dynamic workflows",[607,991,992,997,999],{},[625,993,994],{},[36,995,996],{},"--append-system-prompt-file",[625,998,956],{},[625,1000,1001],{},"Inject per-run context on top of the default system prompt.",[48,1003,1005],{"id":1004},"slo-as-a-server-agent","Slo as a server agent",[14,1007,1008,1009,1011,1012,1015],{},"Headless runs are stateless and fire-and-forget by default — perfect for a request\u002Fresponse service. Add ",[36,1010,938],{}," and a stable session id and Slo becomes a ",[18,1013,1014],{},"long-lived server agent"," that accumulates context across calls.",[1017,1018,1020],"h3",{"id":1019},"scope-every-request-to-a-project","Scope every request to a project",[63,1022,1024],{"className":65,"code":1023,"language":67,"meta":68,"style":68},"slo run -p \"List every file with a TODO comment\" \\\n  --cwd ~\u002Fprojects\u002Fmy-api \\\n  --json > todos.jsonl\n",[36,1025,1026,1039,1049],{"__ignoreMap":68},[72,1027,1028,1030,1032,1034,1037],{"class":74,"line":75},[72,1029,79],{"class":78},[72,1031,83],{"class":82},[72,1033,87],{"class":86},[72,1035,1036],{"class":82}," \"List every file with a TODO comment\"",[72,1038,210],{"class":209},[72,1040,1041,1044,1047],{"class":74,"line":135},[72,1042,1043],{"class":86},"  --cwd",[72,1045,1046],{"class":82}," ~\u002Fprojects\u002Fmy-api",[72,1048,210],{"class":209},[72,1050,1051,1054,1056],{"class":74,"line":141},[72,1052,1053],{"class":86},"  --json",[72,1055,689],{"class":209},[72,1057,1058],{"class":82}," todos.jsonl\n",[1017,1060,1062],{"id":1061},"thread-one-conversation-across-steps","Thread one conversation across steps",[14,1064,1065,1066,1069,1070,1072],{},"Set ",[36,1067,1068],{},"SLO_SESSION_ID"," once and every ",[36,1071,38],{}," in that shell (or CI step) shares the same evolving session:",[63,1074,1076],{"className":65,"code":1075,"language":67,"meta":68,"style":68},"export SLO_SESSION_ID=\"pr-$(git rev-parse --short HEAD)\"\n\nslo run -p \"What does this branch change?\"        --enable-history --json > changes.jsonl\nslo run -p \"Any obvious bugs in the changes?\"     --enable-history --json > bugs.jsonl\nslo run -p \"Write a PR description from the above\" --enable-history --json > pr.jsonl\n",[36,1077,1078,1103,1107,1128,1149],{"__ignoreMap":68},[72,1079,1080,1083,1086,1088,1091,1094,1097,1100],{"class":74,"line":75},[72,1081,1082],{"class":209},"export",[72,1084,1085],{"class":342}," SLO_SESSION_ID",[72,1087,357],{"class":209},[72,1089,1090],{"class":82},"\"pr-$(",[72,1092,1093],{"class":78},"git",[72,1095,1096],{"class":82}," rev-parse ",[72,1098,1099],{"class":86},"--short",[72,1101,1102],{"class":82}," HEAD)\"\n",[72,1104,1105],{"class":74,"line":135},[72,1106,349],{"emptyLinePlaceholder":348},[72,1108,1109,1111,1113,1115,1118,1121,1123,1125],{"class":74,"line":141},[72,1110,79],{"class":78},[72,1112,83],{"class":82},[72,1114,87],{"class":86},[72,1116,1117],{"class":82}," \"What does this branch change?\"",[72,1119,1120],{"class":86},"        --enable-history",[72,1122,206],{"class":86},[72,1124,689],{"class":209},[72,1126,1127],{"class":82}," changes.jsonl\n",[72,1129,1130,1132,1134,1136,1139,1142,1144,1146],{"class":74,"line":147},[72,1131,79],{"class":78},[72,1133,83],{"class":82},[72,1135,87],{"class":86},[72,1137,1138],{"class":82}," \"Any obvious bugs in the changes?\"",[72,1140,1141],{"class":86},"     --enable-history",[72,1143,206],{"class":86},[72,1145,689],{"class":209},[72,1147,1148],{"class":82}," bugs.jsonl\n",[72,1150,1151,1153,1155,1157,1160,1163,1165,1167],{"class":74,"line":153},[72,1152,79],{"class":78},[72,1154,83],{"class":82},[72,1156,87],{"class":86},[72,1158,1159],{"class":82}," \"Write a PR description from the above\"",[72,1161,1162],{"class":86}," --enable-history",[72,1164,206],{"class":86},[72,1166,689],{"class":209},[72,1168,1169],{"class":82}," pr.jsonl\n",[14,1171,1172,1173,1175],{},"The third call can reference what the first two found — the history is threaded exactly as it is in the TUI. The only difference is that input comes from ",[36,1174,856],{}," instead of a text box.",[14,1177,1178],{},[43,1179],{"alt":1180,"src":1181},"Slo threaded across three headless steps with one session id — the server-agent pattern.","\u002Fmedia\u002Fheadless-pipeline.svg",[1017,1183,1185],{"id":1184},"bound-the-run","Bound the run",[14,1187,1188,1189,1192,1193,61],{},"Wrap the whole invocation in a hard wall-clock limit; on ",[36,1190,1191],{},"SIGTERM"," Slo aborts cleanly with exit code ",[36,1194,661],{},[63,1196,1198],{"className":65,"code":1197,"language":67,"meta":68,"style":68},"timeout -k 15 300 slo run -p \"Long analysis task\" --json > out.jsonl\n",[36,1199,1200],{"__ignoreMap":68},[72,1201,1202,1204,1207,1210,1213,1216,1218,1220,1223,1225,1227],{"class":74,"line":75},[72,1203,667],{"class":78},[72,1205,1206],{"class":86}," -k",[72,1208,1209],{"class":86}," 15",[72,1211,1212],{"class":86}," 300",[72,1214,1215],{"class":82}," slo",[72,1217,83],{"class":82},[72,1219,87],{"class":86},[72,1221,1222],{"class":82}," \"Long analysis task\"",[72,1224,206],{"class":86},[72,1226,689],{"class":209},[72,1228,1229],{"class":82}," out.jsonl\n",[48,1231,1233],{"id":1232},"use-cases","Use cases",[765,1235,1236,1245,1254,1267,1281],{},[768,1237,1238,1241,1242,1244],{},[18,1239,1240],{},"CI \u002F pull-request review"," — a GitHub Actions step runs ",[36,1243,38],{}," scoped to the checkout, reviews the diff, and posts the result. Branch on the exit code to fail the build.",[768,1246,1247,1250,1251,1253],{},[18,1248,1249],{},"Batch jobs"," — fan ",[36,1252,38],{}," over a list of repos or files from a shell loop; capture each JSONL for an audit trail.",[768,1255,1256,1259,1260,1263,1264,1266],{},[18,1257,1258],{},"Webhook \u002F service backend"," — a small server shells out to ",[36,1261,1262],{},"slo run --cwd \u003Crepo> --enable-history --session-id \u003Cticket>"," per request and streams ",[36,1265,776],{}," events back to the caller.",[768,1268,1269,1272,1273,1277,1278,1280],{},[18,1270,1271],{},"Scheduled tasks"," — the ",[30,1274,1276],{"href":1275},"\u002Fdocs\u002Ffeatures\u002Fschedulers","scheduler"," fires ",[36,1279,38],{}," on a timer for daily summaries and repo-watch monitoring.",[768,1282,1283,1286,1287,1289,1290,175],{},[18,1284,1285],{},"Orchestrated fan-out"," — add ",[36,1288,981],{}," and Slo spawns and supervises a fleet of headless sub-agents. See ",[30,1291,989],{"href":32},[48,1293,1295],{"id":1294},"persisting-and-resuming","Persisting and resuming",[14,1297,1298,1299,61],{},"History is written under ",[36,1300,1301],{},"$SLO_HOME\u002Fsessions\u002Fhistory\u002F\u003Csession_id>\u002F",[63,1303,1307],{"className":1304,"code":1306,"language":410},[1305],"language-text","~\u002F.slo\u002Fsessions\u002Fhistory\u002F\u003Csession_id>\u002F\n├── session.json     # metadata: id, name, model, workdir, timestamps\n├── events.jsonl     # append-only canonical event log\n└── transcript.md    # human-readable derived transcript\n",[36,1308,1306],{"__ignoreMap":68},[14,1310,1311,1312,1314,1315,1317],{},"Resume it later by id or unique name — ",[36,1313,946],{}," implies ",[36,1316,938],{},", so you don't need both:",[63,1319,1321],{"className":65,"code":1320,"language":67,"meta":68,"style":68},"slo run -p \"Continue the refactoring\" --resume pr-9f3a1c --json\n",[36,1322,1323],{"__ignoreMap":68},[72,1324,1325,1327,1329,1331,1334,1337,1340],{"class":74,"line":75},[72,1326,79],{"class":78},[72,1328,83],{"class":82},[72,1330,87],{"class":86},[72,1332,1333],{"class":82}," \"Continue the refactoring\"",[72,1335,1336],{"class":86}," --resume",[72,1338,1339],{"class":82}," pr-9f3a1c",[72,1341,120],{"class":86},[48,1343,1345],{"id":1344},"next-steps","Next steps",[765,1347,1348,1361],{},[768,1349,1350,1353,1354,1356,1357,1360],{},[30,1351,1352],{"href":32},"Dynamic workflows"," — ",[36,1355,981],{}," mode and the ",[36,1358,1359],{},"slo visualize"," monitor.",[768,1362,1363,1366,1367,1370,1371,175],{},[30,1364,1365],{"href":1275},"Schedulers"," — run headless jobs on macOS ",[36,1368,1369],{},"launchd"," or Linux ",[36,1372,1373],{},"cron",[1375,1376,1377],"style",{},"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}html pre.shiki code .sCcAr, html code.shiki .sCcAr{--shiki-default:#91CBFF}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 .sWyjQ, html code.shiki .sWyjQ{--shiki-default:#FF9492}html pre.shiki code .sMAXC, html code.shiki .sMAXC{--shiki-default:#F0F3F6}",{"title":68,"searchDepth":135,"depth":135,"links":1379},[1380,1381,1382,1383,1384,1385,1390,1391,1392],{"id":50,"depth":135,"text":51},{"id":178,"depth":135,"text":179},{"id":593,"depth":135,"text":594},{"id":756,"depth":135,"text":757},{"id":829,"depth":135,"text":830},{"id":1004,"depth":135,"text":1005,"children":1386},[1387,1388,1389],{"id":1019,"depth":141,"text":1020},{"id":1061,"depth":141,"text":1062},{"id":1184,"depth":141,"text":1185},{"id":1232,"depth":135,"text":1233},{"id":1294,"depth":135,"text":1295},{"id":1344,"depth":135,"text":1345},"Run Slo without the TUI — stream structured events to stdout, wire it into scripts and CI, or run it as a long-lived server agent.","md",{},"\u002Fdocs\u002Ffeatures\u002Fheadless",{"title":5,"description":1393},"docs\u002Ffeatures\u002Fheadless","MHpQccOw8qi77V6pa5RBdm8O4uf8ve48zi3UcczxhRc",1785676470387]