[{"data":1,"prerenderedAt":407,"buildId":408},["ShallowReactive",2],{"docs-surround:\u002Fdocs\u002Fagents\u002Fcursor":3,"docs:\u002Fdocs\u002Fagents\u002Fcursor":12,"i-lucide:menu":297,"i-lucide:search":302,"navigation":304,"source":395},[4,8],{"title":5,"path":6,"stem":7,"children":-1},"Pi","\u002Fdocs\u002Fagents\u002Fpi","docs\u002F3.agents\u002F4.pi",{"title":9,"path":10,"stem":11,"children":-1},"Scripts and HTTP","\u002Fdocs\u002Fagents\u002Fscripts-and-http","docs\u002F3.agents\u002F6.scripts-and-http",{"id":13,"title":14,"body":15,"description":289,"extension":290,"meta":291,"navigation":292,"path":293,"seo":294,"stem":295,"__hash__":296},"docs\u002Fdocs\u002F3.agents\u002F5.cursor.md","Cursor",{"type":16,"value":17,"toc":278},"minimark",[18,27,33,38,57,61,71,136,139,143,154,157,160,164,175,178,198,205,209,216,219,226,244,247,251,259,263],[19,20,21,22,26],"p",{},"The Cursor adapter starts Cursor's command-line agent, ",[23,24,25],"code",{},"cursor-agent",", once for each run.",[28,29,30],"note",{},[19,31,32],{},"The Cursor agent has not yet been run against a real Cursor. The adapter was written from Cursor's help text and documentation, and it has only been tested with a test agent. The first real run may need adjusting.",[34,35,37],"h2",{"id":36},"what-you-install","What you install",[19,39,40,41,43,44,47,48,51,52,56],{},"Install Cursor's command-line agent, ",[23,42,25],{},", yourself, and sign in to it. Run ",[23,45,46],{},"cursor-agent login"," once, as the same user that runs zerohead. You can also put ",[23,49,50],{},"CURSOR_API_KEY"," in the agent's ",[53,54,55],"strong",{},"Environment"," setting. zerohead never reads, copies or changes your sign-in. Nothing of Cursor's is shipped with zerohead.",[34,58,60],{"id":59},"settings","Settings",[19,62,63,64,66,67,70],{},"Choose ",[53,65,14],{}," as the ",[53,68,69],{},"Adapter",".",[72,73,74,87],"table",{},[75,76,77],"thead",{},[78,79,80,84],"tr",{},[81,82,83],"th",{},"Setting",[81,85,86],{},"What it does",[88,89,90,103,124],"tbody",{},[78,91,92,98],{},[93,94,95],"td",{},[53,96,97],{},"Command",[93,99,100,101,70],{},"A program name or path to run instead of ",[23,102,25],{},[78,104,105,110],{},[93,106,107],{},[53,108,109],{},"Model",[93,111,112,113,116,117,120,121,70],{},"The model to use, for example ",[23,114,115],{},"auto"," or ",[23,118,119],{},"gpt-5",". Empty means the model set in Cursor. It must be on one line and must not start with ",[23,122,123],{},"-",[78,125,126,130],{},[93,127,128],{},[53,129,55],{},[93,131,132,133,135],{},"Variables the program starts with, such as ",[23,134,50],{},". Values are kept private.",[19,137,138],{},"There is no sandbox setting.",[34,140,142],{"id":141},"how-it-runs","How it runs",[19,144,145,146,149,150,153],{},"zerohead runs ",[23,147,148],{},"cursor-agent -p --output-format stream-json --force --trust"," in the run's folder, with ",[23,151,152],{},"--model"," added when you set a model. The prompt goes in on standard input, and the agent's added instructions come first in it. Standard input is then closed. Each run starts a fresh session.",[19,155,156],{},"That the prompt can go in on standard input is an assumption. No page of Cursor's documentation says so. If it is wrong, every run ends with Cursor's own error.",[19,158,159],{},"A run succeeds only when Cursor reports a successful result and exits with 0. Anything else fails the run.",[34,161,163],{"id":162},"how-zeroheads-tools-reach-it","How zerohead's tools reach it",[19,165,166,167,170,171,174],{},"Cursor's command-line agent has no option for a settings file of its own, so it reads ",[23,168,169],{},"~\u002F.cursor\u002Fmcp.json"," in your home folder. zerohead adds one entry named ",[23,172,173],{},"zerohead"," to that file. The entry holds no secret. It names two environment variables, and each run sets them for itself with the tool endpoint's address and a token that works only while that run lasts.",[19,176,177],{},"Here is everything zerohead does to your Cursor settings:",[179,180,181,191],"ul",{},[182,183,184,185,187,188,190],"li",{},"It adds that one ",[23,186,173],{}," entry, once. The rest of the file stays exactly as it was. If the file is not valid JSON, or already has a different ",[23,189,173],{}," entry, zerohead leaves it alone and the run does not start. The error says what to do.",[182,192,193,194,197],{},"Before each run it asks Cursor to approve that one server, with ",[23,195,196],{},"cursor-agent mcp enable zerohead",". Cursor records the approval in its own folder. If the approval fails, the run does not start.",[19,199,200,201,204],{},"Cursor's own app lists the entry as a server that is not connected. zerohead never passes ",[23,202,203],{},"--approve-mcps",", which would start every tool server there is, including a project's own.",[34,206,208],{"id":207},"what-it-can-do-without-asking","What it can do without asking",[19,210,211,212,215],{},"A run is unattended, so nothing can answer a permission prompt. zerohead runs Cursor with ",[23,213,214],{},"--force",", which is Cursor's \"Run Everything\" mode. The agent runs commands and tools without asking, and Cursor's sandbox is off. zerohead adds no sandbox of its own. A sandboxed mode is not offered.",[19,217,218],{},"Tool servers you have already approved in Cursor stay available to the agent, and their tools run without asking. Servers nobody approved are expected not to start. That comes from Cursor's documentation and has not been seen in a real run.",[19,220,221,222,225],{},"A run is refused when a ",[23,223,224],{},".cursor\u002Fmcp.json"," in the run's folder or in a folder above it does any of these things:",[179,227,228,231,237],{},[182,229,230],{},"It is not strict JSON, with no comments and no trailing commas. zerohead cannot tell what such a file defines.",[182,232,233,234,236],{},"It defines a server named ",[23,235,173],{},", which would take the place of zerohead's own.",[182,238,239,240,243],{},"It mentions a variable that starts with ",[23,241,242],{},"ZEROHEAD_",", which could read the run's token.",[19,245,246],{},"The error names the file.",[34,248,250],{"id":249},"budgets","Budgets",[19,252,253,254,70],{},"Cursor's documented output carries no usage and no price. A run that ends without a usage report is charged the budget's margin as an estimate, and an estimate counts like spend. See ",[255,256,258],"a",{"href":257},"\u002Fdocs\u002Fusing-zerohead\u002Fbudgets-and-approvals","Budgets and approvals",[34,260,262],{"id":261},"has-it-run-for-real","Has it run for real?",[19,264,265,266,268,269,272,273,275,276,70],{},"No. Nothing about the Cursor agent has been observed in a real run. These things rest on Cursor's documentation only: the prompt on standard input, the way the entry in ",[23,267,169],{}," is read, what ",[23,270,271],{},"mcp enable"," does, and that unapproved servers do not start. The repository has a Cursor smoke test, which runs only when you ask for it. It spends a little of your Cursor usage, and it adds the ",[23,274,173],{}," entry to your real ",[23,277,169],{},{"title":279,"searchDepth":280,"depth":280,"links":281},"",2,[282,283,284,285,286,287,288],{"id":36,"depth":280,"text":37},{"id":59,"depth":280,"text":60},{"id":141,"depth":280,"text":142},{"id":162,"depth":280,"text":163},{"id":207,"depth":280,"text":208},{"id":249,"depth":280,"text":250},{"id":261,"depth":280,"text":262},"Run Cursor's command-line agent as a zerohead agent, with its settings and what zerohead changes in your Cursor settings, though it has not yet run for real.","md",{},true,"\u002Fdocs\u002Fagents\u002Fcursor",{"title":14,"description":289},"docs\u002F3.agents\u002F5.cursor","jooDv08t8mB-k5P_1WZBIyCQLiGm_yU3mmrB0TkPGnk",{"left":298,"top":298,"width":299,"height":299,"rotate":298,"vFlip":300,"hFlip":300,"body":301},0,24,false,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"left":298,"top":298,"width":299,"height":299,"rotate":298,"vFlip":300,"hFlip":300,"body":303},"\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>",[305],{"title":306,"path":307,"stem":308,"children":309,"page":300},"Docs","\u002Fdocs","docs",[310,327,354,374,386],{"title":311,"path":312,"stem":313,"children":314,"page":300},"Get started","\u002Fdocs\u002Fget-started","docs\u002F1.get-started",[315,319,323],{"title":316,"path":317,"stem":318},"Install","\u002Fdocs\u002Fget-started\u002Finstall","docs\u002F1.get-started\u002F1.install",{"title":320,"path":321,"stem":322},"Pair a browser","\u002Fdocs\u002Fget-started\u002Fpair-a-browser","docs\u002F1.get-started\u002F2.pair-a-browser",{"title":324,"path":325,"stem":326},"Your first task","\u002Fdocs\u002Fget-started\u002Fyour-first-task","docs\u002F1.get-started\u002F3.your-first-task",{"title":328,"path":329,"stem":330,"children":331,"page":300},"Using zerohead","\u002Fdocs\u002Fusing-zerohead","docs\u002F2.using-zerohead",[332,336,340,344,346,350],{"title":333,"path":334,"stem":335},"Companies and agents","\u002Fdocs\u002Fusing-zerohead\u002Fcompanies-and-agents","docs\u002F2.using-zerohead\u002F1.companies-and-agents",{"title":337,"path":338,"stem":339},"Tasks and runs","\u002Fdocs\u002Fusing-zerohead\u002Ftasks-and-runs","docs\u002F2.using-zerohead\u002F2.tasks-and-runs",{"title":341,"path":342,"stem":343},"Company memory","\u002Fdocs\u002Fusing-zerohead\u002Fcompany-memory","docs\u002F2.using-zerohead\u002F3.company-memory",{"title":258,"path":257,"stem":345},"docs\u002F2.using-zerohead\u002F4.budgets-and-approvals",{"title":347,"path":348,"stem":349},"Connectors","\u002Fdocs\u002Fusing-zerohead\u002Fconnectors","docs\u002F2.using-zerohead\u002F5.connectors",{"title":351,"path":352,"stem":353},"Remote access","\u002Fdocs\u002Fusing-zerohead\u002Fremote-access","docs\u002F2.using-zerohead\u002F6.remote-access",{"title":355,"path":356,"stem":357,"children":358,"page":300},"Agents","\u002Fdocs\u002Fagents","docs\u002F3.agents",[359,363,367,371,372,373],{"title":360,"path":361,"stem":362},"Claude Code","\u002Fdocs\u002Fagents\u002Fclaude-code","docs\u002F3.agents\u002F1.claude-code",{"title":364,"path":365,"stem":366},"Codex","\u002Fdocs\u002Fagents\u002Fcodex","docs\u002F3.agents\u002F2.codex",{"title":368,"path":369,"stem":370},"OpenCode","\u002Fdocs\u002Fagents\u002Fopencode","docs\u002F3.agents\u002F3.opencode",{"title":5,"path":6,"stem":7},{"title":14,"path":293,"stem":295},{"title":9,"path":10,"stem":11},{"title":375,"path":376,"stem":377,"children":378,"page":300},"Reference","\u002Fdocs\u002Freference","docs\u002F4.reference",[379,382],{"title":60,"path":380,"stem":381},"\u002Fdocs\u002Freference\u002Fsettings","docs\u002F4.reference\u002F1.settings",{"title":383,"path":384,"stem":385},"Command line","\u002Fdocs\u002Freference\u002Fcommand-line","docs\u002F4.reference\u002F2.command-line",{"title":387,"path":388,"stem":389,"children":390,"page":300},"Contributing","\u002Fdocs\u002Fcontributing","docs\u002F5.contributing",[391],{"title":392,"path":393,"stem":394},"Build from source","\u002Fdocs\u002Fcontributing\u002Fbuild-from-source","docs\u002F5.contributing\u002F1.build-from-source",{"id":396,"clone":397,"description":398,"docsNotice":399,"extension":400,"meta":401,"status":402,"stem":405,"__hash__":406},"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":403,"text":404},"Early.","The source is not public yet. It will be published under MIT.","source\u002Fprivate","ZIRSRgoDOBHkU54QRPpdRltyFcq_DTWub-4p70w1DaY",1796109414177,"515e4a29-51e4-43d8-b774-a8b94f7dc369"]