[{"data":1,"prerenderedAt":328,"buildId":329},["ShallowReactive",2],{"docs-surround:\u002Fdocs\u002Fagents\u002Fopencode":3,"docs:\u002Fdocs\u002Fagents\u002Fopencode":12,"i-lucide:menu":216,"i-lucide:search":221,"navigation":223,"source":316},[4,8],{"title":5,"path":6,"stem":7,"children":-1},"Codex","\u002Fdocs\u002Fagents\u002Fcodex","docs\u002F3.agents\u002F2.codex",{"title":9,"path":10,"stem":11,"children":-1},"Pi","\u002Fdocs\u002Fagents\u002Fpi","docs\u002F3.agents\u002F4.pi",{"id":13,"title":14,"body":15,"description":208,"extension":209,"meta":210,"navigation":211,"path":212,"seo":213,"stem":214,"__hash__":215},"docs\u002Fdocs\u002F3.agents\u002F3.opencode.md","OpenCode",{"type":16,"value":17,"toc":197},"minimark",[18,22,28,33,46,50,60,136,140,158,162,173,177,183,187,190,194],[19,20,21],"p",{},"The OpenCode adapter starts the OpenCode command-line tool once for each run.",[23,24,25],"note",{},[19,26,27],{},"OpenCode has never run for real through zerohead. The adapter was written from OpenCode's help text and documentation. Its output format is assumed, not observed.",[29,30,32],"h2",{"id":31},"what-you-install","What you install",[19,34,35,36,40,41,45],{},"Install OpenCode yourself and connect a provider to it. Its own ",[37,38,39],"code",{},"opencode auth login"," command does that. You can also give a provider's API key to the agent in its ",[42,43,44],"strong",{},"Environment"," setting. Check OpenCode's documentation for the variable your provider uses.",[29,47,49],{"id":48},"settings","Settings",[19,51,52,53,55,56,59],{},"Choose ",[42,54,14],{}," as the ",[42,57,58],{},"Adapter",".",[61,62,63,76],"table",{},[64,65,66],"thead",{},[67,68,69,73],"tr",{},[70,71,72],"th",{},"Setting",[70,74,75],{},"What it does",[77,78,79,93,107,117,127],"tbody",{},[67,80,81,87],{},[82,83,84],"td",{},[42,85,86],{},"Command",[82,88,89,90,59],{},"A program name or path to run instead of ",[37,91,92],{},"opencode",[67,94,95,100],{},[82,96,97],{},[42,98,99],{},"Model",[82,101,102,103,106],{},"In ",[37,104,105],{},"provider\u002Fmodel"," form. Empty means OpenCode's own default.",[67,108,109,114],{},[82,110,111],{},[42,112,113],{},"OpenCode agent",[82,115,116],{},"The name of an OpenCode agent to run.",[67,118,119,124],{},[82,120,121],{},[42,122,123],{},"Approve permissions automatically",[82,125,126],{},"On by default. Permissions that are not explicitly denied are approved, so a run is not left waiting for you.",[67,128,129,133],{},[82,130,131],{},[42,132,44],{},[82,134,135],{},"Variables the program starts with, such as an API key. Values are kept private.",[29,137,139],{"id":138},"how-it-runs","How it runs",[19,141,142,143,146,147,150,151,153,154,157],{},"zerohead runs ",[37,144,145],{},"opencode run --standalone --format json",", with ",[37,148,149],{},"--auto"," when ",[42,152,123],{}," is on. The prompt goes on the command line, so a prompt that starts with ",[37,155,156],{},"-"," is refused. Standard input is closed.",[29,159,161],{"id":160},"how-zeroheads-tools-reach-it","How zerohead's tools reach it",[19,163,164,165,168,169,172],{},"For each run zerohead writes OpenCode's configuration for the zerohead tool server into a private temporary folder, and points OpenCode at it with ",[37,166,167],{},"XDG_CONFIG_HOME",". The config names the token variable, not the token. The token goes in the environment variable ",[37,170,171],{},"ZEROHEAD_MCP_TOKEN",". The folder is removed when the run ends. Your own OpenCode data folder is left as it is, so saved sign-ins still work.",[29,174,176],{"id":175},"what-it-can-do-without-asking","What it can do without asking",[19,178,179,180,182],{},"With automatic approval on, OpenCode approves every permission that is not explicitly denied. To limit it, turn that off, or deny tools in an OpenCode agent and name it in ",[42,181,113],{},". What OpenCode does with a permission question when automatic approval is off has not been tried.",[29,184,186],{"id":185},"how-results-are-read","How results are read",[19,188,189],{},"OpenCode's JSON event format is not published. zerohead reads the fields it recognises. Lines it does not recognise are kept as plain text in the run log. The exit code decides success, except that an explicit error event fails a run even when the exit code is 0.",[29,191,193],{"id":192},"sessions","Sessions",[19,195,196],{},"Each run starts a fresh session.",{"title":198,"searchDepth":199,"depth":199,"links":200},"",2,[201,202,203,204,205,206,207],{"id":31,"depth":199,"text":32},{"id":48,"depth":199,"text":49},{"id":138,"depth":199,"text":139},{"id":160,"depth":199,"text":161},{"id":175,"depth":199,"text":176},{"id":185,"depth":199,"text":186},{"id":192,"depth":199,"text":193},"Run OpenCode as a zerohead agent, with its settings and how its tools work, though it has not yet run for real.","md",{},true,"\u002Fdocs\u002Fagents\u002Fopencode",{"title":14,"description":208},"docs\u002F3.agents\u002F3.opencode","PZLKe4jzEBhmFvDQOjkEWhOl-AxqzUtNjNK_G_tw6RU",{"left":217,"top":217,"width":218,"height":218,"rotate":217,"vFlip":219,"hFlip":219,"body":220},0,24,false,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"left":217,"top":217,"width":218,"height":218,"rotate":217,"vFlip":219,"hFlip":219,"body":222},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"m21 21l-4.34-4.34\"\u002F>\u003Ccircle cx=\"11\" cy=\"11\" r=\"8\"\u002F>\u003C\u002Fg>",[224],{"title":225,"path":226,"stem":227,"children":228,"page":219},"Docs","\u002Fdocs","docs",[229,246,275,295,307],{"title":230,"path":231,"stem":232,"children":233,"page":219},"Get started","\u002Fdocs\u002Fget-started","docs\u002F1.get-started",[234,238,242],{"title":235,"path":236,"stem":237},"Install","\u002Fdocs\u002Fget-started\u002Finstall","docs\u002F1.get-started\u002F1.install",{"title":239,"path":240,"stem":241},"Pair a browser","\u002Fdocs\u002Fget-started\u002Fpair-a-browser","docs\u002F1.get-started\u002F2.pair-a-browser",{"title":243,"path":244,"stem":245},"Your first task","\u002Fdocs\u002Fget-started\u002Fyour-first-task","docs\u002F1.get-started\u002F3.your-first-task",{"title":247,"path":248,"stem":249,"children":250,"page":219},"Using zerohead","\u002Fdocs\u002Fusing-zerohead","docs\u002F2.using-zerohead",[251,255,259,263,267,271],{"title":252,"path":253,"stem":254},"Companies and agents","\u002Fdocs\u002Fusing-zerohead\u002Fcompanies-and-agents","docs\u002F2.using-zerohead\u002F1.companies-and-agents",{"title":256,"path":257,"stem":258},"Tasks and runs","\u002Fdocs\u002Fusing-zerohead\u002Ftasks-and-runs","docs\u002F2.using-zerohead\u002F2.tasks-and-runs",{"title":260,"path":261,"stem":262},"Company memory","\u002Fdocs\u002Fusing-zerohead\u002Fcompany-memory","docs\u002F2.using-zerohead\u002F3.company-memory",{"title":264,"path":265,"stem":266},"Budgets and approvals","\u002Fdocs\u002Fusing-zerohead\u002Fbudgets-and-approvals","docs\u002F2.using-zerohead\u002F4.budgets-and-approvals",{"title":268,"path":269,"stem":270},"Connectors","\u002Fdocs\u002Fusing-zerohead\u002Fconnectors","docs\u002F2.using-zerohead\u002F5.connectors",{"title":272,"path":273,"stem":274},"Remote access","\u002Fdocs\u002Fusing-zerohead\u002Fremote-access","docs\u002F2.using-zerohead\u002F6.remote-access",{"title":276,"path":277,"stem":278,"children":279,"page":219},"Agents","\u002Fdocs\u002Fagents","docs\u002F3.agents",[280,284,285,286,287,291],{"title":281,"path":282,"stem":283},"Claude Code","\u002Fdocs\u002Fagents\u002Fclaude-code","docs\u002F3.agents\u002F1.claude-code",{"title":5,"path":6,"stem":7},{"title":14,"path":212,"stem":214},{"title":9,"path":10,"stem":11},{"title":288,"path":289,"stem":290},"Cursor","\u002Fdocs\u002Fagents\u002Fcursor","docs\u002F3.agents\u002F5.cursor",{"title":292,"path":293,"stem":294},"Scripts and HTTP","\u002Fdocs\u002Fagents\u002Fscripts-and-http","docs\u002F3.agents\u002F6.scripts-and-http",{"title":296,"path":297,"stem":298,"children":299,"page":219},"Reference","\u002Fdocs\u002Freference","docs\u002F4.reference",[300,303],{"title":49,"path":301,"stem":302},"\u002Fdocs\u002Freference\u002Fsettings","docs\u002F4.reference\u002F1.settings",{"title":304,"path":305,"stem":306},"Command line","\u002Fdocs\u002Freference\u002Fcommand-line","docs\u002F4.reference\u002F2.command-line",{"title":308,"path":309,"stem":310,"children":311,"page":219},"Contributing","\u002Fdocs\u002Fcontributing","docs\u002F5.contributing",[312],{"title":313,"path":314,"stem":315},"Build from source","\u002Fdocs\u002Fcontributing\u002Fbuild-from-source","docs\u002F5.contributing\u002F1.build-from-source",{"id":317,"clone":318,"description":319,"docsNotice":320,"extension":321,"meta":322,"status":323,"stem":326,"__hash__":327},"source\u002Fsource\u002Fprivate.yml",null,"Run a company of AI agents on your own computer. The source will be published under MIT.","The source is not public yet. It will be published under MIT. The pages under Contributing describe working on it once it is.","yml",{},{"lead":324,"text":325},"Early.","The source is not public yet. It will be published under MIT.","source\u002Fprivate","ZIRSRgoDOBHkU54QRPpdRltyFcq_DTWub-4p70w1DaY",1796109414162,"515e4a29-51e4-43d8-b774-a8b94f7dc369"]