[{"data":1,"prerenderedAt":988,"buildId":989},["ShallowReactive",2],{"docs:\u002Fguide\u002Fagents":3},{"page":4,"section":16,"document":17,"credits":10,"prev":982,"next":984},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":8,"description":9,"tagline":9,"eyebrow":10,"credits":10,"keywords":11,"icon":12,"layout":13,"sidebar":14,"toc":14,"kind":10,"group":10,"navigation":14,"order":15},"agents","\u002Fguide\u002Fagents","guide\u002Fagents.md","Coding agents","What a coding agent gets from a readerly command, which harnesses readerly knows by their env vars, and how a tool declares itself with AI_AGENT.",null,[],"i-lucide-bot","article",true,4,"guide",{"nodes":18,"toc":975},[19,28,36,51,93,169,178,192,195,201,229,591,594,626,640,646,652,710,717,723,729,797,925,938,944,959],[20,21,22,23,27],"p",{},"When the reader is a coding agent, readerly prints the ",[24,25,26],"code",{},"agent"," format. This page covers what that output holds and how readerly knows which agent is running.",[29,30,35],"h2",{"id":31,"anchor":32},"what-an-agent-gets",{"label":33,"icon":34},"Section titled \"What an agent gets\"","#","What an agent gets",[20,37,38,39,42,43,50],{},"The ",[24,40,41],{},"acme check"," example from ",[44,45,47],"a",{"href":46},"https:\u002F\u002Fgithub.com\u002Floadsheet\u002Freaderly\u002Fblob\u002Fmain\u002Ftest\u002Fgolden",[24,48,49],{},"test\u002Fgolden",", as a coding agent gets it:",[52,53,56],"pre",{"language":54,"class":55,"wrap":14},"text","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[24,57,59,67,68,67,73,67,78,67,83,67,88],{"class":58},"language-text",[60,61,64],"span",{"class":62,"style":63},"line","display: inline",[60,65,66],{},"acme check: failed. 2 errors, 1 warning in 212 files (0.8s).","\n",[60,69,70],{"class":62,"style":63},[60,71,72],{},"error ACME001 src\u002Fapp.ts:14:3 Route handler reads process.env at module scope. fix: Read it inside the handler",[60,74,75],{"class":62,"style":63},[60,76,77],{},"error ACME004 src\u002Fdb.ts:3:1 Top-level await in a server entry. fix: Move the call into the plugin setup",[60,79,80],{"class":62,"style":63},[60,81,82],{},"warn ACME010 vite.config.ts:8:5 Alias shadows a workspace package",[60,84,85],{"class":62,"style":63},[60,86,87],{},"next: acme check --fix   (applies 2 safe fixes)",[60,89,90],{"class":62,"style":63},[60,91,92],{},"next: acme explain \u003Ccode>   (explains one code)",[94,95,96,124,130,160],"ul",{},[97,98,99,103,104,107,108,111,112,115,116,119,120,123],"li",{},[100,101,102],"strong",{},"No color and no glyphs."," No escape codes, no ",[24,105,106],{},"✖",", no tree. Each diagnostic is one line, with its ",[24,109,110],{},"fix"," on the same line. ",[24,113,114],{},"why"," and ",[24,117,118],{},"docs"," appear only with ",[24,121,122],{},"--full",".",[97,125,126,129],{},[100,127,128],{},"The verdict on line 1."," Hosts cut the middle of long output, so the first line says whether the run failed and what it counted.",[97,131,132,135,136,139,140,143,144,147,148,151,152,155,156,123],{},[100,133,134],{},"No prompts."," An agent can't answer one. When a prompt has a default, readerly uses it and adds a ",[24,137,138],{},"next:"," line with the flag that changes it, here ",[24,141,142],{},"acme check --fix",". When it has none, ",[24,145,146],{},"out.confirm"," throws an ",[24,149,150],{},"action_required"," failure that names the flag, and ",[24,153,154],{},"out.fail()"," prints it with exit code 2. See ",[44,157,159],{"href":158},"\u002Fguide\u002Fprompts","Prompts and input",[97,161,162,165,166,168],{},[100,163,164],{},"A budget of 8,000 characters."," That is under Claude Code's 30,000-character Bash output limit and Codex's 10,000-token cap. readerly keeps or drops whole lines: ",[24,167,138],{}," lines first, then errors, warnings, infos and logs. The last line names what it dropped and how to get it back:",[52,170,171],{"language":54,"class":55,"wrap":14},[24,172,173],{"class":58},[60,174,175],{"class":62,"style":63},[60,176,177],{},"hidden: 23 warn. rerun: acme check --full, or acme check --format json",[20,179,180,183,184,186,187,191],{},[24,181,182],{},"--max-chars \u003Cn>"," sets another budget and ",[24,185,122],{}," removes it. ",[44,188,190],{"href":189},"\u002Fguide\u002Fbudget","Budget"," has the details.",[20,193,194],{},"Failures go to stdout in this format too, so an agent sees the error, the fix and the command to rerun in one read.",[29,196,200],{"id":197,"anchor":198},"known-harnesses",{"label":199,"icon":34},"Section titled \"Known harnesses\"","Known harnesses",[20,202,203,204,210,211,214,215,214,218,214,221,224,225,228],{},"The harness registry in ",[44,205,207],{"href":206},"https:\u002F\u002Fgithub.com\u002Floadsheet\u002Freaderly\u002Fblob\u002Fmain\u002Fsrc\u002Fregistry.ts",[24,208,209],{},"src\u002Fregistry.ts"," lists each agent readerly knows. A bare marker name counts when the variable is set and not ",[24,212,213],{},"0",", ",[24,216,217],{},"false",[24,219,220],{},"no",[24,222,223],{},"off"," or empty; ",[24,226,227],{},"NAME=value"," must match exactly.",[230,231,232,259],"table",{},[233,234,235],"thead",{},[236,237,238,244,247,250,256],"tr",{},[239,240,241],"th",{},[24,242,243],{},"id",[239,245,246],{},"Strong markers",[239,248,249],{},"Weak markers",[239,251,252,255],{},[24,253,254],{},"sessionId"," from",[239,257,258],{},"Also reads",[260,261,262,291,323,342,360,381,408,426,446,461,484,502,520,538,556,571],"tbody",{},[236,263,264,270,275,277,282],{},[265,266,267],"td",{},[24,268,269],{},"claude-code",[265,271,272],{},[24,273,274],{},"CLAUDECODE",[265,276],{},[265,278,279],{},[24,280,281],{},"CLAUDE_CODE_SESSION_ID",[265,283,284,287,288],{},[24,285,286],{},"CLAUDE_EFFORT"," as ",[24,289,290],{},"effort",[236,292,293,298,309,311,315],{},[265,294,295],{},[24,296,297],{},"codex",[265,299,300,214,303,214,306],{},[24,301,302],{},"CODEX_THREAD_ID",[24,304,305],{},"CODEX_SANDBOX",[24,307,308],{},"CODEX_CI",[265,310],{},[265,312,313],{},[24,314,302],{},[265,316,317,287,320],{},[24,318,319],{},"CODEX_VERSION",[24,321,322],{},"version",[236,324,325,331,336,338,340],{},[265,326,327,330],{},[24,328,329],{},"gemini","*",[265,332,333],{},[24,334,335],{},"GEMINI_CLI",[265,337],{},[265,339],{},[265,341],{},[236,343,344,349,354,356,358],{},[265,345,346,330],{},[24,347,348],{},"cline",[265,350,351],{},[24,352,353],{},"CLINE_ACTIVE",[265,355],{},[265,357],{},[265,359],{},[236,361,362,367,372,374,379],{},[265,363,364],{},[24,365,366],{},"opencode",[265,368,369],{},[24,370,371],{},"OPENCODE",[265,373],{},[265,375,376],{},[24,377,378],{},"OPENCODE_SESSION_ID",[265,380],{},[236,382,383,388,396,401,406],{},[265,384,385],{},[24,386,387],{},"cursor",[265,389,390,214,393],{},[24,391,392],{},"CURSOR_AGENT",[24,394,395],{},"CURSOR_EXTENSION_HOST_ROLE=agent-exec",[265,397,398],{},[24,399,400],{},"CURSOR_TRACE_ID",[265,402,403],{},[24,404,405],{},"CURSOR_CONVERSATION_ID",[265,407],{},[236,409,410,415,420,422,424],{},[265,411,412,330],{},[24,413,414],{},"augment",[265,416,417],{},[24,418,419],{},"AUGMENT_AGENT",[265,421],{},[265,423],{},[265,425],{},[236,427,428,433,438,440,444],{},[265,429,430,330],{},[24,431,432],{},"amp",[265,434,435],{},[24,436,437],{},"AMP_CURRENT_THREAD_ID",[265,439],{},[265,441,442],{},[24,443,437],{},[265,445],{},[236,447,448,453,455,457,459],{},[265,449,450,330],{},[24,451,452],{},"copilot",[265,454],{},[265,456],{},[265,458],{},[265,460],{},[236,462,463,468,470,478,482],{},[265,464,465,330],{},[24,466,467],{},"grok",[265,469],{},[265,471,472,214,475],{},[24,473,474],{},"GROK_SESSION_ID",[24,476,477],{},"GROK_AGENT_ID",[265,479,480],{},[24,481,474],{},[265,483],{},[236,485,486,491,493,498,500],{},[265,487,488,330],{},[24,489,490],{},"kiro",[265,492],{},[265,494,495],{},[24,496,497],{},"TERM_PROGRAM=kiro",[265,499],{},[265,501],{},[236,503,504,509,511,516,518],{},[265,505,506,330],{},[24,507,508],{},"goose",[265,510],{},[265,512,513],{},[24,514,515],{},"GOOSE_TERMINAL",[265,517],{},[265,519],{},[236,521,522,527,529,534,536],{},[265,523,524,330],{},[24,525,526],{},"replit",[265,528],{},[265,530,531],{},[24,532,533],{},"REPL_ID",[265,535],{},[265,537],{},[236,539,540,545,547,552,554],{},[265,541,542,330],{},[24,543,544],{},"windsurf",[265,546],{},[265,548,549],{},[24,550,551],{},"WINDSURF_CASCADE_TERMINAL",[265,553],{},[265,555],{},[236,557,558,563,565,567,569],{},[265,559,560,330],{},[24,561,562],{},"pi",[265,564],{},[265,566],{},[265,568],{},[265,570],{},[236,572,573,578,580,585,589],{},[265,574,575],{},[24,576,577],{},"t3-code",[265,579],{},[265,581,582],{},[24,583,584],{},"T3CODE_THREAD_ID",[265,586,587],{},[24,588,584],{},[265,590],{},[20,592,593],{},"* Markers taken from the harness's source or docs, not from a live run.",[20,595,596,115,598,600,601,604,605,608,609,612,613,616,617,619,620,616,623,123],{},[24,597,452],{},[24,599,562],{}," have no marker. readerly finds them only through ",[24,602,603],{},"AI_AGENT",", such as ",[24,606,607],{},"AI_AGENT=github_copilot_vscode_agent",". A bare ",[24,610,611],{},"AGENT"," variable is one more weak marker for any harness: ",[24,614,615],{},"AGENT=goose"," reports ",[24,618,508],{},", and ",[24,621,622],{},"AGENT=1",[24,624,625],{},"unknown",[20,627,628,629,631,632,635,636,639],{},"When ",[24,630,584],{}," is set and the agent is not T3 Code itself, ",[24,633,634],{},"AgentInfo.wrapper"," is ",[24,637,638],{},"{ id: \"t3-code\", threadId }",": a Claude Code run inside T3 Code reports both.",[29,641,645],{"id":642,"anchor":643},"declared-strong-and-weak",{"label":644,"icon":34},"Section titled \"Declared, strong and weak\"","Declared, strong and weak",[20,647,648,651],{},[24,649,650],{},"AgentInfo.strength"," says how readerly found the agent.",[230,653,654,669],{},[233,655,656],{},[236,657,658,663,666],{},[239,659,660],{},[24,661,662],{},"strength",[239,664,665],{},"Source",[239,667,668],{},"Trusted",[260,670,671,685,697],{},[236,672,673,678,682],{},[265,674,675],{},[24,676,677],{},"declared",[265,679,680],{},[24,681,603],{},[265,683,684],{},"Always. It is checked before any marker.",[236,686,687,691,694],{},[265,688,689],{},[24,690,100],{},[265,692,693],{},"A variable the harness sets only while a model runs the command",[265,695,696],{},"Always, also in a TTY and in CI",[236,698,699,704,707],{},[265,700,701],{},[24,702,703],{},"weak",[265,705,706],{},"A variable that can also sit in a person's shell",[265,708,709],{},"Only when stdout is not a TTY and the run is not in CI",[20,711,712,713,123],{},"The full order is in ",[44,714,716],{"href":715},"\u002Fguide\u002Freaders#detection-order","Readers",[29,718,722],{"id":719,"anchor":720},"declaring-an-agent",{"label":721,"icon":34},"Section titled \"Declaring an agent\"","Declaring an agent",[20,724,725,726,728],{},"A harness, or a wrapper script around one, declares itself by setting ",[24,727,603],{},". readerly reads the value like this:",[730,731,732,741,758,774],"ol",{},[97,733,734,735,738,739,123],{},"A value that doesn't match ",[24,736,737],{},"^[A-Za-z0-9_.-]{1,64}$"," gives the id ",[24,740,625],{},[97,742,743,744,747,748,750,751,754,755,123],{},"readerly lowercases it and splits it on ",[24,745,746],{},"_",". A last segment of ",[24,749,26],{}," or ",[24,752,753],{},"harness"," becomes ",[24,756,757],{},"mode",[97,759,760,761,750,764,754,766,768,769,771,772,123],{},"A version segment of digits joined by ",[24,762,763],{},"-",[24,765,123],{},[24,767,322],{},", with ",[24,770,763],{}," turned into ",[24,773,123],{},[97,775,776,777,214,779,781,782,214,785,214,788,115,791,794,795,123],{},"The id is the longest registry prefix followed by ",[24,778,746],{},[24,780,763],{}," or the end of the value. Otherwise it is the rest of the value; ",[24,783,784],{},"1",[24,786,787],{},"true",[24,789,790],{},"yes",[24,792,793],{},"on"," give ",[24,796,625],{},[230,798,799,819],{},[233,800,801],{},[236,802,803,807,811,815],{},[239,804,805],{},[24,806,603],{},[239,808,809],{},[24,810,243],{},[239,812,813],{},[24,814,322],{},[239,816,817],{},[24,818,757],{},[260,820,821,841,855,873,890,911],{},[236,822,823,828,832,837],{},[265,824,825],{},[24,826,827],{},"claude-code_2-1-332_agent",[265,829,830],{},[24,831,269],{},[265,833,834],{},[24,835,836],{},"2.1.332",[265,838,839],{},[24,840,26],{},[236,842,843,847,851,853],{},[265,844,845],{},[24,846,297],{},[265,848,849],{},[24,850,297],{},[265,852],{},[265,854],{},[236,856,857,862,866,871],{},[265,858,859],{},[24,860,861],{},"opencode_1.4.2",[265,863,864],{},[24,865,366],{},[265,867,868],{},[24,869,870],{},"1.4.2",[265,872],{},[236,874,875,880,884,886],{},[265,876,877],{},[24,878,879],{},"github_copilot_vscode_agent",[265,881,882],{},[24,883,452],{},[265,885],{},[265,887,888],{},[24,889,26],{},[236,891,892,897,902,907],{},[265,893,894],{},[24,895,896],{},"new-tool_3-0_agent",[265,898,899],{},[24,900,901],{},"new-tool",[265,903,904],{},[24,905,906],{},"3.0",[265,908,909],{},[24,910,26],{},[236,912,913,917,921,923],{},[265,914,915],{},[24,916,784],{},[265,918,919],{},[24,920,625],{},[265,922],{},[265,924],{},[20,926,927,930,931,934,935,123],{},[24,928,929],{},"AgentInfo.raw"," keeps the value as given. ",[24,932,933],{},"AI_AGENT=0"," declares that no agent runs; see ",[44,936,716],{"href":937},"\u002Fguide\u002Freaders",[29,939,943],{"id":940,"anchor":941},"agents-in-ci",{"label":942,"icon":34},"Section titled \"Agents in CI\"","Agents in CI",[20,945,946,947,619,949,952,953,955,956,123],{},"A coding agent can run inside a CI job, such as Claude Code in GitHub Actions. A declared or strong agent wins over CI: the reader is ",[24,948,26],{},[24,950,951],{},"Detection.ci"," still names the provider. A weak marker never wins in CI, so ",[24,954,400],{}," in a GitHub Actions job leaves the reader ",[24,957,958],{},"ci",[20,960,961,962,964,965,967,968,970,971,123],{},"An agent in CI gets the ",[24,963,26],{}," format and no GitHub annotations. Annotations go only with the ",[24,966,54],{}," format, for the ",[24,969,958],{}," reader on GitHub Actions. See ",[44,972,974],{"href":973},"\u002Fintegrations\u002Fgithub-actions","GitHub Actions",[976,978,979,980,981],{"id":31,"depth":977,"text":35},2,{"id":197,"depth":977,"text":200},{"id":642,"depth":977,"text":645},{"id":719,"depth":977,"text":722},{"id":940,"depth":977,"text":943},{"path":937,"title":716,"description":983},"How readerly decides whether a coding agent, CI, a person at a terminal or a pipe reads a command's output, step by step, and how to override it.",{"path":985,"title":986,"description":987},"\u002Fguide\u002Fformats","Formats","The four output formats readerly prints, text, agent, json and jsonl, with the exact output of one command in each, and how readerly picks one.",1795985392770,"22ea5d7b-bce0-4e3b-bca3-1fbe3722fcf7"]