[{"data":1,"prerenderedAt":1688},["ShallowReactive",2],{"navigation_docs":3,"-reference-chain-nodes-result-file":520,"-reference-chain-nodes-result-file-surround":1683},[4,28,51,191,222,485],{"title":5,"path":6,"stem":7,"children":8},"Get started","\u002Fget-started","1.get-started",[9,12,16,20,24],{"title":10,"path":6,"stem":11},"Overview","1.get-started\u002Findex",{"title":13,"path":14,"stem":15},"Why Kraft","\u002Fget-started\u002Fwhy-kraft","1.get-started\u002F0.why-kraft",{"title":17,"path":18,"stem":19},"Install","\u002Fget-started\u002Finstall","1.get-started\u002F1.install",{"title":21,"path":22,"stem":23},"Your first work item","\u002Fget-started\u002Ffirst-work-item","1.get-started\u002F2.first-work-item",{"title":25,"path":26,"stem":27},"FAQ","\u002Fget-started\u002Ffaq","1.get-started\u002F3.faq",{"title":29,"path":30,"stem":31,"children":32},"Concepts","\u002Fconcepts","2.concepts",[33,35,39,43,47],{"title":10,"path":30,"stem":34},"2.concepts\u002Findex",{"title":36,"path":37,"stem":38},"How a work item runs","\u002Fconcepts\u002Fhow-a-work-item-runs","2.concepts\u002F1.how-a-work-item-runs",{"title":40,"path":41,"stem":42},"Caps and budgets","\u002Fconcepts\u002Fcaps-and-budgets","2.concepts\u002F2.caps-and-budgets",{"title":44,"path":45,"stem":46},"Why a permission gate","\u002Fconcepts\u002Fpermission-gate","2.concepts\u002F3.permission-gate",{"title":48,"path":49,"stem":50},"Vocabulary","\u002Fconcepts\u002Fvocabulary","2.concepts\u002F4.vocabulary",{"title":52,"path":53,"stem":54,"children":55},"Guides","\u002Fguides","3.guides",[56,58,96,117,138,187],{"title":10,"path":53,"stem":57},"3.guides\u002Findex",{"title":59,"path":60,"stem":61,"children":62,"page":95},"Day to day","\u002Fguides\u002Fday-to-day","3.guides\u002F1.day-to-day",[63,67,71,75,79,83,87,91],{"title":64,"path":65,"stem":66},"The setup wizard on first start","\u002Fguides\u002Fday-to-day\u002Ffirst-run","3.guides\u002F1.day-to-day\u002F2.first-run",{"title":68,"path":69,"stem":70},"File a work item","\u002Fguides\u002Fday-to-day\u002Ffile-a-work-item","3.guides\u002F1.day-to-day\u002F3.file-a-work-item",{"title":72,"path":73,"stem":74},"Use Kraft from your agent","\u002Fguides\u002Fday-to-day\u002Fagent-integration","3.guides\u002F1.day-to-day\u002F4.agent-integration",{"title":76,"path":77,"stem":78},"Reviewing a change","\u002Fguides\u002Fday-to-day\u002Freview-a-change","3.guides\u002F1.day-to-day\u002F5.review-a-change",{"title":80,"path":81,"stem":82},"Raise a cap on a stopped item","\u002Fguides\u002Fday-to-day\u002Fraise-a-cap","3.guides\u002F1.day-to-day\u002F6.raise-a-cap",{"title":84,"path":85,"stem":86},"Kraft for VS Code","\u002Fguides\u002Fday-to-day\u002Fvscode","3.guides\u002F1.day-to-day\u002F7.vscode",{"title":88,"path":89,"stem":90},"Kraft on a phone","\u002Fguides\u002Fday-to-day\u002Fkraft-on-a-phone","3.guides\u002F1.day-to-day\u002F8.kraft-on-a-phone",{"title":92,"path":93,"stem":94},"Get notified when an item needs you","\u002Fguides\u002Fday-to-day\u002Fnotifications","3.guides\u002F1.day-to-day\u002F9.notifications",false,{"title":97,"path":98,"stem":99,"children":100,"page":95},"Customize and automate","\u002Fguides\u002Fcustomize","3.guides\u002F2.customize",[101,105,109,113],{"title":102,"path":103,"stem":104},"Write your own chain","\u002Fguides\u002Fcustomize\u002Fwrite-your-own-chain","3.guides\u002F2.customize\u002F1.write-your-own-chain",{"title":106,"path":107,"stem":108},"Add a security review or a gate reviewer","\u002Fguides\u002Fcustomize\u002Fadd-review-agents","3.guides\u002F2.customize\u002F2.add-review-agents",{"title":110,"path":111,"stem":112},"Schedule or webhook work","\u002Fguides\u002Fcustomize\u002Fschedule-and-webhook-work","3.guides\u002F2.customize\u002F3.schedule-and-webhook-work",{"title":114,"path":115,"stem":116},"Share chains with add-ons","\u002Fguides\u002Fcustomize\u002Fshare-chains-with-addons","3.guides\u002F2.customize\u002F4.share-chains-with-addons",{"title":118,"path":119,"stem":120,"children":121,"page":95},"Agents and harnesses","\u002Fguides\u002Fharnesses","3.guides\u002F3.harnesses",[122,126,130,134],{"title":123,"path":124,"stem":125},"Switch a task to another harness","\u002Fguides\u002Fharnesses\u002Fswitch-harness","3.guides\u002F3.harnesses\u002F1.switch-harness",{"title":127,"path":128,"stem":129},"Add or override a harness","\u002Fguides\u002Fharnesses\u002Fadding-a-harness","3.guides\u002F3.harnesses\u002F2.adding-a-harness",{"title":131,"path":132,"stem":133},"Build a worker Kit","\u002Fguides\u002Fharnesses\u002Fworker-kit","3.guides\u002F3.harnesses\u002F3.worker-kit",{"title":135,"path":136,"stem":137},"Give a worker its login","\u002Fguides\u002Fharnesses\u002Fgive-a-worker-its-login","3.guides\u002F3.harnesses\u002F4.give-a-worker-its-login",{"title":139,"path":140,"stem":141,"children":142,"page":95},"Run the server","\u002Fguides\u002Frun","3.guides\u002F4.run",[143,147,151,155,159,163,167,171,175,179,183],{"title":144,"path":145,"stem":146},"Remote access","\u002Fguides\u002Frun\u002Fremote-access","3.guides\u002F4.run\u002F01.remote-access",{"title":148,"path":149,"stem":150},"Put a proxy in front of Kraft","\u002Fguides\u002Frun\u002Fput-a-proxy-in-front-of-kraft","3.guides\u002F4.run\u002F02.put-a-proxy-in-front-of-kraft",{"title":152,"path":153,"stem":154},"Restart Kraft without ending running agents","\u002Fguides\u002Frun\u002Frestart-kraft","3.guides\u002F4.run\u002F03.restart-kraft",{"title":156,"path":157,"stem":158},"Back up and restore the database","\u002Fguides\u002Frun\u002Fback-up-and-restore","3.guides\u002F4.run\u002F04.back-up-and-restore",{"title":160,"path":161,"stem":162},"Logs and disk space","\u002Fguides\u002Frun\u002Flogs-and-disk-space","3.guides\u002F4.run\u002F05.logs-and-disk-space",{"title":164,"path":165,"stem":166},"Run Kraft as a service","\u002Fguides\u002Frun\u002Frun-as-a-service","3.guides\u002F4.run\u002F06.run-as-a-service",{"title":168,"path":169,"stem":170},"Upgrade Kraft","\u002Fguides\u002Frun\u002Fupgrade-kraft","3.guides\u002F4.run\u002F07.upgrade-kraft",{"title":172,"path":173,"stem":174},"Upgrade your configuration","\u002Fguides\u002Frun\u002Fupgrade-your-configuration","3.guides\u002F4.run\u002F08.upgrade-your-configuration",{"title":176,"path":177,"stem":178},"Upgrade from 1.4","\u002Fguides\u002Frun\u002Fupgrade-from-1-4","3.guides\u002F4.run\u002F09.upgrade-from-1-4",{"title":180,"path":181,"stem":182},"Upgrade from 0.x or a release candidate","\u002Fguides\u002Frun\u002Fupgrade-from-0-x-or-a-release-candidate","3.guides\u002F4.run\u002F10.upgrade-from-0-x-or-a-release-candidate",{"title":184,"path":185,"stem":186},"Roll back to 1.4","\u002Fguides\u002Frun\u002Froll-back","3.guides\u002F4.run\u002F11.roll-back",{"title":188,"path":189,"stem":190},"Kraft Lite","\u002Fguides\u002Fkraft-lite","3.guides\u002F5.kraft-lite",{"title":192,"path":193,"stem":194,"children":195},"Troubleshooting","\u002Ftroubleshooting","4.troubleshooting",[196,198,202,206,210,214,218],{"title":10,"path":193,"stem":197},"4.troubleshooting\u002Findex",{"title":199,"path":200,"stem":201},"Why did my item stop?","\u002Ftroubleshooting\u002Fwhy-did-my-item-stop","4.troubleshooting\u002F1.why-did-my-item-stop",{"title":203,"path":204,"stem":205},"Stop reasons in detail","\u002Ftroubleshooting\u002Fstop-reasons-in-detail","4.troubleshooting\u002F2.stop-reasons-in-detail",{"title":207,"path":208,"stem":209},"Starting and reaching Kraft","\u002Ftroubleshooting\u002Fstarting-and-reaching-kraft","4.troubleshooting\u002F3.starting-and-reaching-kraft",{"title":211,"path":212,"stem":213},"Doctor failures","\u002Ftroubleshooting\u002Fdoctor-failures","4.troubleshooting\u002F4.doctor-failures",{"title":215,"path":216,"stem":217},"Sandbox and Kit stops","\u002Ftroubleshooting\u002Fsandbox-and-kit-stops","4.troubleshooting\u002F5.sandbox-and-kit-stops",{"title":219,"path":220,"stem":221},"Add-on problems","\u002Ftroubleshooting\u002Faddon-problems","4.troubleshooting\u002F6.addon-problems",{"title":223,"path":224,"stem":225,"children":226},"Reference","\u002Freference","5.reference",[227,229,267,289,293,391,409,435,439,443,477,481],{"title":10,"path":224,"stem":228},"5.reference\u002Findex",{"title":230,"path":231,"stem":232,"children":233},"Web UI","\u002Freference\u002Fweb-ui","5.reference\u002F00.web-ui\u002Findex",[234,235,239,243,247,251,255,259,263],{"title":10,"path":231,"stem":232},{"title":236,"path":237,"stem":238},"Sidebar, search, and keyboard","\u002Freference\u002Fweb-ui\u002Fsidebar-search-and-keyboard","5.reference\u002F00.web-ui\u002F0.sidebar-search-and-keyboard",{"title":240,"path":241,"stem":242},"The board","\u002Freference\u002Fweb-ui\u002Fboard","5.reference\u002F00.web-ui\u002F1.board",{"title":244,"path":245,"stem":246},"An item's page","\u002Freference\u002Fweb-ui\u002Fitem-page","5.reference\u002F00.web-ui\u002F2.item-page",{"title":248,"path":249,"stem":250},"Fix loops and test scopes","\u002Freference\u002Fweb-ui\u002Ffix-loops-and-test-scopes","5.reference\u002F00.web-ui\u002F3.fix-loops-and-test-scopes",{"title":252,"path":253,"stem":254},"Config before an item starts","\u002Freference\u002Fweb-ui\u002Fconfig-before-start","5.reference\u002F00.web-ui\u002F4.config-before-start",{"title":256,"path":257,"stem":258},"The review page","\u002Freference\u002Fweb-ui\u002Freview-page","5.reference\u002F00.web-ui\u002F5.review-page",{"title":260,"path":261,"stem":262},"Templates and Settings","\u002Freference\u002Fweb-ui\u002Ftemplates-and-settings","5.reference\u002F00.web-ui\u002F6.templates-and-settings",{"title":264,"path":265,"stem":266},"Analytics","\u002Freference\u002Fweb-ui\u002Fanalytics","5.reference\u002F00.web-ui\u002F7.analytics",{"title":268,"path":269,"stem":270,"children":271},"CLI","\u002Freference\u002Fcli","5.reference\u002F01.cli\u002Findex",[272,273,277,281,285],{"title":10,"path":269,"stem":270},{"title":274,"path":275,"stem":276},"Item verbs","\u002Freference\u002Fcli\u002Fitem","5.reference\u002F01.cli\u002F2.item",{"title":278,"path":279,"stem":280},"View verbs","\u002Freference\u002Fcli\u002Fview","5.reference\u002F01.cli\u002F3.view",{"title":282,"path":283,"stem":284},"Repo verbs","\u002Freference\u002Fcli\u002Frepo","5.reference\u002F01.cli\u002F4.repo",{"title":286,"path":287,"stem":288},"Admin verbs","\u002Freference\u002Fcli\u002Fadmin","5.reference\u002F01.cli\u002F5.admin",{"title":290,"path":291,"stem":292},"Work item statuses","\u002Freference\u002Fstatuses","5.reference\u002F02.statuses",{"title":294,"path":295,"stem":296,"children":297},"Configuration","\u002Freference\u002Fconfiguration","5.reference\u002F03.configuration\u002Findex",[298,299,317,321,325,329,333,337,341,345,379,383,387],{"title":10,"path":295,"stem":296},{"title":300,"path":301,"stem":302,"children":303},"repos.yaml","\u002Freference\u002Fconfiguration\u002Frepos","5.reference\u002F03.configuration\u002F02.repos\u002Findex",[304,305,309,313],{"title":10,"path":301,"stem":302},{"title":306,"path":307,"stem":308},"How connect proposes commands","\u002Freference\u002Fconfiguration\u002Frepos\u002Fconnect-proposals","5.reference\u002F03.configuration\u002F02.repos\u002F1.connect-proposals",{"title":310,"path":311,"stem":312},"detectors.yaml","\u002Freference\u002Fconfiguration\u002Frepos\u002Fdetectors","5.reference\u002F03.configuration\u002F02.repos\u002F2.detectors",{"title":314,"path":315,"stem":316},"Workspaces","\u002Freference\u002Fconfiguration\u002Frepos\u002Fworkspaces","5.reference\u002F03.configuration\u002F02.repos\u002F3.workspaces",{"title":318,"path":319,"stem":320},"policy.yaml","\u002Freference\u002Fconfiguration\u002Fpolicy","5.reference\u002F03.configuration\u002F03.policy",{"title":322,"path":323,"stem":324},"Library and chains","\u002Freference\u002Fconfiguration\u002Flibrary-and-chains","5.reference\u002F03.configuration\u002F04.library-and-chains",{"title":326,"path":327,"stem":328},"harnesses.yaml","\u002Freference\u002Fconfiguration\u002Fharnesses-file","5.reference\u002F03.configuration\u002F05.harnesses-file",{"title":330,"path":331,"stem":332},"access.yaml","\u002Freference\u002Fconfiguration\u002Faccess","5.reference\u002F03.configuration\u002F06.access",{"title":334,"path":335,"stem":336},"intake.yaml","\u002Freference\u002Fconfiguration\u002Fintake","5.reference\u002F03.configuration\u002F07.intake",{"title":338,"path":339,"stem":340},"notify.yaml","\u002Freference\u002Fconfiguration\u002Fnotify","5.reference\u002F03.configuration\u002F08.notify",{"title":342,"path":343,"stem":344},"theme.yaml","\u002Freference\u002Fconfiguration\u002Ftheme","5.reference\u002F03.configuration\u002F09.theme",{"title":346,"path":347,"stem":348,"children":349},"Sandboxed workers","\u002Freference\u002Fconfiguration\u002Fsandbox","5.reference\u002F03.configuration\u002F10.sandbox\u002Findex",[350,351,355,359,363,367,371,375],{"title":10,"path":347,"stem":348},{"title":352,"path":353,"stem":354},"Resource limits","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fresource-limits","5.reference\u002F03.configuration\u002F10.sandbox\u002F1.resource-limits",{"title":356,"path":357,"stem":358},"Callbacks from a sandbox","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fcallbacks","5.reference\u002F03.configuration\u002F10.sandbox\u002F2.callbacks",{"title":360,"path":361,"stem":362},"Network policy","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fnetwork-policy","5.reference\u002F03.configuration\u002F10.sandbox\u002F3.network-policy",{"title":364,"path":365,"stem":366},"Credentials","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fcredentials","5.reference\u002F03.configuration\u002F10.sandbox\u002F4.credentials",{"title":368,"path":369,"stem":370},"Kits","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fkits","5.reference\u002F03.configuration\u002F10.sandbox\u002F5.kits",{"title":372,"path":373,"stem":374},"sandbox.yaml","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fsandbox-yaml","5.reference\u002F03.configuration\u002F10.sandbox\u002F6.sandbox-yaml",{"title":376,"path":377,"stem":378},"Git in a sandbox","\u002Freference\u002Fconfiguration\u002Fsandbox\u002Fgit-in-a-sandbox","5.reference\u002F03.configuration\u002F10.sandbox\u002F7.git-in-a-sandbox",{"title":380,"path":381,"stem":382},"Environment variables","\u002Freference\u002Fconfiguration\u002Fenvironment-variables","5.reference\u002F03.configuration\u002F11.environment-variables",{"title":384,"path":385,"stem":386},"Add-ons and collections","\u002Freference\u002Fconfiguration\u002Faddons","5.reference\u002F03.configuration\u002F12.addons",{"title":388,"path":389,"stem":390},"Repo libraries","\u002Freference\u002Fconfiguration\u002Frepo-libraries","5.reference\u002F03.configuration\u002F13.repo-libraries",{"title":392,"path":393,"stem":394,"children":395},"Chain file keys","\u002Freference\u002Fchain-nodes","5.reference\u002F04.chain-nodes\u002Findex",[396,397,401,405],{"title":10,"path":393,"stem":394},{"title":398,"path":399,"stem":400},"Subprocess tasks","\u002Freference\u002Fchain-nodes\u002Fsubprocess-tasks","5.reference\u002F04.chain-nodes\u002F2.subprocess-tasks",{"title":402,"path":403,"stem":404},"Fix loop and judge","\u002Freference\u002Fchain-nodes\u002Ffix-loop","5.reference\u002F04.chain-nodes\u002F3.fix-loop",{"title":406,"path":407,"stem":408},"Result file","\u002Freference\u002Fchain-nodes\u002Fresult-file","5.reference\u002F04.chain-nodes\u002F4.result-file",{"title":410,"path":411,"stem":412,"children":413},"Agent harnesses","\u002Freference\u002Fharnesses","5.reference\u002F05.harnesses\u002Findex",[414,415,419,423,427,431],{"title":10,"path":411,"stem":412},{"title":416,"path":417,"stem":418},"Unattended runs","\u002Freference\u002Fharnesses\u002Funattended-runs","5.reference\u002F05.harnesses\u002F2.unattended-runs",{"title":420,"path":421,"stem":422},"Agent profiles","\u002Freference\u002Fharnesses\u002Fagent-profiles","5.reference\u002F05.harnesses\u002F3.agent-profiles",{"title":424,"path":425,"stem":426},"Harness definition files","\u002Freference\u002Fharnesses\u002Fharness-files","5.reference\u002F05.harnesses\u002F4.harness-files",{"title":428,"path":429,"stem":430},"Fallback and escalation","\u002Freference\u002Fharnesses\u002Ffallback-and-escalation","5.reference\u002F05.harnesses\u002F5.fallback-and-escalation",{"title":432,"path":433,"stem":434},"Cost reporting","\u002Freference\u002Fharnesses\u002Fcost-reporting","5.reference\u002F05.harnesses\u002F6.cost-reporting",{"title":436,"path":437,"stem":438},"Permission gate","\u002Freference\u002Fpermissions","5.reference\u002F06.permissions",{"title":440,"path":441,"stem":442},"Inbound triggers","\u002Freference\u002Ftriggers","5.reference\u002F07.triggers",{"title":444,"path":445,"stem":446,"children":447},"HTTP API","\u002Freference\u002Fhttp-api","5.reference\u002F08.http-api\u002Findex",[448,449,453,457,461,465,469,473],{"title":10,"path":445,"stem":446},{"title":450,"path":451,"stem":452},"Filing, reading and changing work items","\u002Freference\u002Fhttp-api\u002Fwork-items","5.reference\u002F08.http-api\u002F2.work-items",{"title":454,"path":455,"stem":456},"Gates, run control, ending and retry","\u002Freference\u002Fhttp-api\u002Fgates-run-control-and-ending","5.reference\u002F08.http-api\u002F3.gates-run-control-and-ending",{"title":458,"path":459,"stem":460},"The work item object","\u002Freference\u002Fhttp-api\u002Fwork-item-object","5.reference\u002F08.http-api\u002F4.work-item-object",{"title":462,"path":463,"stem":464},"Budget, events, diff and documents","\u002Freference\u002Fhttp-api\u002Fbudget-and-events","5.reference\u002F08.http-api\u002F5.budget-and-events",{"title":466,"path":467,"stem":468},"Repos, chains, harnesses and the server","\u002Freference\u002Fhttp-api\u002Frepos-chains-harnesses-and-server","5.reference\u002F08.http-api\u002F6.repos-chains-harnesses-and-server",{"title":470,"path":471,"stem":472},"Drafts","\u002Freference\u002Fhttp-api\u002Fdrafts","5.reference\u002F08.http-api\u002F7.drafts",{"title":474,"path":475,"stem":476},"Ops for each draft area","\u002Freference\u002Fhttp-api\u002Fdraft-ops","5.reference\u002F08.http-api\u002F8.draft-ops",{"title":478,"path":479,"stem":480},"MCP tools","\u002Freference\u002Fmcp-tools","5.reference\u002F09.mcp-tools",{"title":482,"path":483,"stem":484},"Events","\u002Freference\u002Fevents","5.reference\u002F10.events",{"title":486,"path":487,"stem":488,"children":489},"Security and project","\u002Fproject","6.project",[490,492,496,500,504,508,512,516],{"title":10,"path":487,"stem":491},"6.project\u002Findex",{"title":493,"path":494,"stem":495},"Security","\u002Fproject\u002Fsecurity","6.project\u002F1.security",{"title":497,"path":498,"stem":499},"Data and privacy","\u002Fproject\u002Fdata-and-privacy","6.project\u002F2.data-and-privacy",{"title":501,"path":502,"stem":503},"What's new in 2.0","\u002Fproject\u002Fwhats-new","6.project\u002F3.whats-new",{"title":505,"path":506,"stem":507},"Status and support","\u002Fproject\u002Fstatus-and-support","6.project\u002F4.status-and-support",{"title":509,"path":510,"stem":511},"Architecture","\u002Fproject\u002Farchitecture","6.project\u002F5.architecture",{"title":513,"path":514,"stem":515},"Source map","\u002Fproject\u002Fsource-map","6.project\u002F6.source-map",{"title":517,"path":518,"stem":519},"Contributing","\u002Fproject\u002Fcontributing","6.project\u002F7.contributing",{"id":521,"title":406,"body":522,"description":1676,"extension":1677,"links":1678,"meta":1679,"navigation":1680,"path":407,"seo":1681,"stem":408,"__hash__":1682},"docs\u002F5.reference\u002F04.chain-nodes\u002F4.result-file.md",{"type":523,"value":524,"toc":1663},"minimark",[525,542,547,598,602,605,751,758,803,806,840,844,847,1051,1054,1162,1177,1181,1183,1186,1300,1311,1332,1334,1419,1427,1429,1437,1484,1510,1526,1543,1554,1556,1559,1636,1640,1659],[526,527,528,529,533,534,537,538,541],"p",{},"Every agent and subprocess task gets ",[530,531,532],"code",{},"KRAFT_RESULT_PATH"," in its environment:\nthe path of a JSON file it writes before it exits. Kraft reads the task's\nstatus, findings, verdict, and usage back from it. The file is\n",[530,535,536],{},"run\u002Fresults\u002F\u003Csession id>.json"," under ",[530,539,540],{},"$KRAFT_HOME",", and it stays after the\nsession ends.",[543,544,546],"h2",{"id":545},"who-must-write-it","Who must write it",[548,549,550,562,589],"ul",{},[551,552,553,557,558,561],"li",{},[554,555,556],"strong",{},"An agent task must."," Kraft's instructions to every agent say what to\nwrite. An agent that exits cleanly without a result file ends ",[530,559,560],{},"failed",".",[551,563,564,567,568,573,574,576,577,580,581,584,585,588],{},[554,565,566],{},"An agent's turn must not leave a background job running."," For a ",[569,570,572],"a",{"href":571},"\u002Fconcepts\u002Fvocabulary#harness","harness"," that\ndeclares a log format, a turn that ends with one ends the task ",[530,575,560],{},", even\nwhen the file says ",[530,578,579],{},"done",". A ",[530,582,583],{},"needs_context"," stop keeps its status. The last\nline of the session log and a ",[530,586,587],{},"background_jobs_abandoned"," event name each job.",[551,590,591,594,595,561],{},[554,592,593],{},"A subprocess task may."," Without one, its exit code decides. See\n",[569,596,398],{"href":597},"\u002Freference\u002Fchain-nodes\u002Fsubprocess-tasks#how-the-status-is-decided",[543,599,601],{"id":600},"examples","Examples",[526,603,604],{},"A review that found one problem:",[606,607,613],"pre",{"className":608,"code":609,"filename":610,"language":611,"meta":612,"style":612},"language-json shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","{\n  \"status\": \"done\",\n  \"session_summary_ref\": \".engineering\u002Fsessions\u002F2c1f.md\",\n  \"findings\": [\n    {\n      \"severity\": \"important\",\n      \"message\": \"The retry loop never backs off, so a down server gets hammered.\",\n      \"file\": \"src\u002Fclient.py\",\n      \"line\": 42,\n      \"source_plugin\": \"code-review\"\n    }\n  ]\n}\n","$KRAFT_RESULT_PATH","json","",[530,614,615,624,641,654,663,669,682,695,708,722,733,739,745],{"__ignoreMap":612},[616,617,620],"span",{"class":618,"line":619},"line",1,[616,621,623],{"class":622},"s7iLA","{\n",[616,625,627,631,634,638],{"class":618,"line":626},2,[616,628,630],{"class":629},"sb7M8","  \"status\"",[616,632,633],{"class":622},": ",[616,635,637],{"class":636},"semJd","\"done\"",[616,639,640],{"class":622},",\n",[616,642,644,647,649,652],{"class":618,"line":643},3,[616,645,646],{"class":629},"  \"session_summary_ref\"",[616,648,633],{"class":622},[616,650,651],{"class":636},"\".engineering\u002Fsessions\u002F2c1f.md\"",[616,653,640],{"class":622},[616,655,657,660],{"class":618,"line":656},4,[616,658,659],{"class":629},"  \"findings\"",[616,661,662],{"class":622},": [\n",[616,664,666],{"class":618,"line":665},5,[616,667,668],{"class":622},"    {\n",[616,670,672,675,677,680],{"class":618,"line":671},6,[616,673,674],{"class":629},"      \"severity\"",[616,676,633],{"class":622},[616,678,679],{"class":636},"\"important\"",[616,681,640],{"class":622},[616,683,685,688,690,693],{"class":618,"line":684},7,[616,686,687],{"class":629},"      \"message\"",[616,689,633],{"class":622},[616,691,692],{"class":636},"\"The retry loop never backs off, so a down server gets hammered.\"",[616,694,640],{"class":622},[616,696,698,701,703,706],{"class":618,"line":697},8,[616,699,700],{"class":629},"      \"file\"",[616,702,633],{"class":622},[616,704,705],{"class":636},"\"src\u002Fclient.py\"",[616,707,640],{"class":622},[616,709,711,714,716,720],{"class":618,"line":710},9,[616,712,713],{"class":629},"      \"line\"",[616,715,633],{"class":622},[616,717,719],{"class":718},"ssYy9","42",[616,721,640],{"class":622},[616,723,725,728,730],{"class":618,"line":724},10,[616,726,727],{"class":629},"      \"source_plugin\"",[616,729,633],{"class":622},[616,731,732],{"class":636},"\"code-review\"\n",[616,734,736],{"class":618,"line":735},11,[616,737,738],{"class":622},"    }\n",[616,740,742],{"class":618,"line":741},12,[616,743,744],{"class":622},"  ]\n",[616,746,748],{"class":618,"line":747},13,[616,749,750],{"class":622},"}\n",[526,752,753,754,757],{},"A fix-loop judge's ruling, with its reasoning in ",[530,755,756],{},"concerns",":",[606,759,761],{"className":608,"code":760,"filename":610,"language":611,"meta":612,"style":612},"{\n  \"status\": \"done\",\n  \"verdict\": \"stop_needs_human\",\n  \"concerns\": \"The same two findings came back after three repairs.\"\n}\n",[530,762,763,767,777,789,799],{"__ignoreMap":612},[616,764,765],{"class":618,"line":619},[616,766,623],{"class":622},[616,768,769,771,773,775],{"class":618,"line":626},[616,770,630],{"class":629},[616,772,633],{"class":622},[616,774,637],{"class":636},[616,776,640],{"class":622},[616,778,779,782,784,787],{"class":618,"line":643},[616,780,781],{"class":629},"  \"verdict\"",[616,783,633],{"class":622},[616,785,786],{"class":636},"\"stop_needs_human\"",[616,788,640],{"class":622},[616,790,791,794,796],{"class":618,"line":656},[616,792,793],{"class":629},"  \"concerns\"",[616,795,633],{"class":622},[616,797,798],{"class":636},"\"The same two findings came back after three repairs.\"\n",[616,800,801],{"class":618,"line":665},[616,802,750],{"class":622},[526,804,805],{},"A task that cannot go on without an answer:",[606,807,809],{"className":608,"code":808,"filename":610,"language":611,"meta":612,"style":612},"{\n  \"status\": \"needs_context\",\n  \"question\": \"Which of the two config loaders should the new key go through?\"\n}\n",[530,810,811,815,826,836],{"__ignoreMap":612},[616,812,813],{"class":618,"line":619},[616,814,623],{"class":622},[616,816,817,819,821,824],{"class":618,"line":626},[616,818,630],{"class":629},[616,820,633],{"class":622},[616,822,823],{"class":636},"\"needs_context\"",[616,825,640],{"class":622},[616,827,828,831,833],{"class":618,"line":643},[616,829,830],{"class":629},"  \"question\"",[616,832,633],{"class":622},[616,834,835],{"class":636},"\"Which of the two config loaders should the new key go through?\"\n",[616,837,838],{"class":618,"line":656},[616,839,750],{"class":622},[543,841,843],{"id":842},"fields","Fields",[526,845,846],{},"The file is one JSON object. Kraft ignores keys it does not know.",[848,849,850,869],"table",{},[851,852,853],"thead",{},[854,855,856,860,863,866],"tr",{},[857,858,859],"th",{},"Field",[857,861,862],{},"Type",[857,864,865],{},"Read from",[857,867,868],{},"Meaning",[870,871,872,892,914,930,944,963,984,1003,1020,1037],"tbody",{},[854,873,874,880,883,886],{},[875,876,877],"td",{},[530,878,879],{},"status",[875,881,882],{},"string",[875,884,885],{},"every task",[875,887,888,889,561],{},"How the task went. See ",[569,890,879],{"href":891},"#status",[854,893,894,898,900,902],{},[875,895,896],{},[530,897,756],{},[875,899,882],{},[875,901,885],{},[875,903,904,905,908,909,913],{},"With ",[530,906,907],{},"done_with_concerns",", why. From a ",[569,910,912],{"href":911},"\u002Fconcepts\u002Fvocabulary#judge","judge"," or a gate review, the reasoning.",[854,915,916,921,923,925],{},[875,917,918],{},[530,919,920],{},"question",[875,922,882],{},[875,924,885],{},[875,926,904,927,929],{},[530,928,583],{},", what the task needs to know. The item stops with it.",[854,931,932,937,939,941],{},[875,933,934],{},[530,935,936],{},"session_summary_ref",[875,938,882],{},[875,940,885],{},[875,942,943],{},"The session summary's path, relative to the repo root.",[854,945,946,951,954,957],{},[875,947,948],{},[530,949,950],{},"findings",[875,952,953],{},"array",[875,955,956],{},"measuring tasks",[875,958,959,960,561],{},"What a review or check found. See ",[569,961,950],{"href":962},"#findings",[854,964,965,970,972,978],{},[875,966,967],{},[530,968,969],{},"verdict",[875,971,882],{},[875,973,974,975],{},"a fix-loop judge, a gate's ",[530,976,977],{},"auto_review",[875,979,980,981,561],{},"See ",[569,982,969],{"href":983},"#verdict",[854,985,986,991,994,997],{},[875,987,988],{},[530,989,990],{},"suggested_action",[875,992,993],{},"object",[875,995,996],{},"the last task a node ran before it stopped",[875,998,999,1000,561],{},"What a person should do next. See ",[569,1001,990],{"href":1002},"#suggested_action",[854,1004,1005,1010,1012,1014],{},[875,1006,1007],{},[530,1008,1009],{},"usage",[875,1011,993],{},[875,1013,885],{},[875,1015,1016,1017,561],{},"Token counts. See ",[569,1018,1009],{"href":1019},"#usage",[854,1021,1022,1027,1030,1032],{},[875,1023,1024],{},[530,1025,1026],{},"cost_usd",[875,1028,1029],{},"number",[875,1031,885],{},[875,1033,1034,1035,561],{},"What the session cost. See ",[569,1036,1009],{"href":1019},[854,1038,1039,1044,1046,1048],{},[875,1040,1041],{},[530,1042,1043],{},"model",[875,1045,882],{},[875,1047,885],{},[875,1049,1050],{},"The model that did the work.",[1052,1053,879],"h3",{"id":879},[848,1055,1056,1068],{},[851,1057,1058],{},[854,1059,1060,1063,1066],{},[857,1061,1062],{},"Value",[857,1064,1065],{},"Set by",[857,1067,868],{},[870,1069,1070,1082,1100,1111,1125,1138,1150],{},[854,1071,1072,1076,1079],{},[875,1073,1074],{},[530,1075,579],{},[875,1077,1078],{},"The task",[875,1080,1081],{},"The task finished.",[854,1083,1084,1088,1090],{},[875,1085,1086],{},[530,1087,907],{},[875,1089,1078],{},[875,1091,1092,1093,1095,1096,1099],{},"The task finished but doubts the result; ",[530,1094,756],{}," says why. The node goes on. A repair in an ",[530,1097,1098],{},"on_failure"," recovery that ends this way stops the item and waits for you.",[854,1101,1102,1106,1108],{},[875,1103,1104],{},[530,1105,560],{},[875,1107,1078],{},[875,1109,1110],{},"The task could not finish.",[854,1112,1113,1117,1119],{},[875,1114,1115],{},[530,1116,583],{},[875,1118,1078],{},[875,1120,1121,1122,1124],{},"The task is missing information; ",[530,1123,920],{}," says what. The item stops and waits for you, with the question.",[854,1126,1127,1132,1135],{},[875,1128,1129],{},[530,1130,1131],{},"config_error",[875,1133,1134],{},"Kraft",[875,1136,1137],{},"The task could not run as configured, for example a command that does not exist.",[854,1139,1140,1145,1147],{},[875,1141,1142],{},[530,1143,1144],{},"capped_out",[875,1146,1134],{},[875,1148,1149],{},"A cap or a wait ran out.",[854,1151,1152,1157,1159],{},[875,1153,1154],{},[530,1155,1156],{},"paused",[875,1158,1134],{},[875,1160,1161],{},"You paused the item.",[526,1163,1164,1165,1167,1168,1170,1171,1173,1174,561],{},"A task never writes the three Kraft statuses. A file that is not valid JSON, is\nnot UTF-8, has no ",[530,1166,879],{},", or has a ",[530,1169,879],{}," that is not one of the four task\nvalues ends the task ",[530,1172,560],{},", and that includes a file that names a Kraft\nstatus. An empty file counts as no file. See\n",[569,1175,1176],{"href":597},"how the status is decided",[1178,1179,1180],"note",{},"A task that needs an answer should ask for everything at once: each question\ncosts a new run.",[1052,1182,950],{"id":950},[526,1184,1185],{},"Each entry is an object:",[848,1187,1188,1200],{},[851,1189,1190],{},[854,1191,1192,1195,1198],{},[857,1193,1194],{},"Key",[857,1196,1197],{},"Required",[857,1199,868],{},[870,1201,1202,1237,1249,1264,1277,1288],{},[854,1203,1204,1209,1212],{},[875,1205,1206],{},[530,1207,1208],{},"severity",[875,1210,1211],{},"yes",[875,1213,1214,1217,1218,1221,1222,1225,1226,1230,1231,1234,1235,561],{},[530,1215,1216],{},"critical",", ",[530,1219,1220],{},"important"," or ",[530,1223,1224],{},"minor",". Which ones open a ",[569,1227,1229],{"href":1228},"\u002Fconcepts\u002Fvocabulary#fix-loop","fix loop"," is ",[530,1232,1233],{},"findings.loop_severities"," in ",[569,1236,318],{"href":319},[854,1238,1239,1244,1246],{},[875,1240,1241],{},[530,1242,1243],{},"message",[875,1245,1211],{},[875,1247,1248],{},"What is wrong and why.",[854,1250,1251,1256,1258],{},[875,1252,1253],{},[530,1254,1255],{},"source_plugin",[875,1257,1211],{},[875,1259,1260,1261,561],{},"Who found it, such as ",[530,1262,1263],{},"code-review",[854,1265,1266,1271,1274],{},[875,1267,1268],{},[530,1269,1270],{},"file",[875,1272,1273],{},"no",[875,1275,1276],{},"The path, relative to the repo root.",[854,1278,1279,1283,1285],{},[875,1280,1281],{},[530,1282,618],{},[875,1284,1273],{},[875,1286,1287],{},"An integer. Not part of the finding's identity, so an approximate line is fine.",[854,1289,1290,1295,1297],{},[875,1291,1292],{},[530,1293,1294],{},"same_as",[875,1296,1273],{},[875,1298,1299],{},"The 16-character tag of a finding from an earlier round that this one restates. Only a tag the task was shown counts; any other is ignored.",[526,1301,1302,1303,1306,1307,1310],{},"An entry missing a required key, or with an unknown severity, is dropped. The\n",[530,1304,1305],{},"findings_measured"," event counts dropped entries under ",[530,1308,1309],{},"dropped",", per task.",[526,1312,1313,1314,1316,1317,1217,1319,1321,1322,1324,1325,1329,1330,561],{},"A finding's identity across rounds is its ",[530,1315,1294],{},", or else a hash of\n",[530,1318,1255],{},[530,1320,1270],{}," and ",[530,1323,1243],{},". The fix loop's ",[569,1326,1328],{"href":1327},"\u002Fconcepts\u002Fvocabulary#stuck","stuck"," check and the\njudge's history read it. See ",[569,1331,402],{"href":403},[1052,1333,969],{"id":969},[848,1335,1336,1349],{},[851,1337,1338],{},[854,1339,1340,1343,1346],{},[857,1341,1342],{},"Written by",[857,1344,1345],{},"Values",[857,1347,1348],{},"Anything else",[870,1350,1351,1378],{},[854,1352,1353,1358,1374],{},[875,1354,1355,1356],{},"A fix loop's ",[530,1357,912],{},[875,1359,1360,1217,1363,1217,1366,1369,1370,561],{},[530,1361,1362],{},"continue",[530,1364,1365],{},"stop_needs_human",[530,1367,1368],{},"stop_downgrade",". See ",[569,1371,1373],{"href":1372},"\u002Freference\u002Fchain-nodes\u002Ffix-loop#the-judge","The judge",[875,1375,1376],{},[530,1377,1362],{},[854,1379,1380,1385,1414],{},[875,1381,1382,1383],{},"A gate's ",[530,1384,977],{},[875,1386,1387,1217,1390,1217,1393,1396,1397,1401,1402,1405,1406,1321,1408,1410,1411,1413],{},[530,1388,1389],{},"approve",[530,1391,1392],{},"reject",[530,1394,1395],{},"fixed"," (it repaired the ",[569,1398,1400],{"href":1399},"\u002Fconcepts\u002Fvocabulary#worktree","worktree"," and the node runs again), ",[530,1403,1404],{},"undecided",". ",[530,1407,1392],{},[530,1409,1395],{}," need ",[530,1412,756],{},", which becomes the steer for the re-run.",[875,1415,1416,1418],{},[530,1417,1404],{},": the gate waits for you",[526,1420,1421,1422,1221,1424,1426],{},"A verdict from a task that ended ",[530,1423,560],{},[530,1425,583],{}," does not count,\nwhatever it says: Kraft reads it as the \"Anything else\" value in the table.",[1052,1428,990],{"id":990},[526,1430,1431,1432,1434,1435,757],{},"A recovery that concludes no repair can help ends ",[530,1433,560],{}," and writes a\n",[530,1436,990],{},[606,1438,1440],{"className":608,"code":1439,"filename":610,"language":611,"meta":612,"style":612},"{\"status\": \"failed\", \"suggested_action\": {\"action\": \"retry\", \"reason\": \"the registry was down\"}}\n",[530,1441,1442],{"__ignoreMap":612},[616,1443,1444,1447,1450,1452,1455,1457,1460,1463,1466,1468,1471,1473,1476,1478,1481],{"class":618,"line":619},[616,1445,1446],{"class":622},"{",[616,1448,1449],{"class":629},"\"status\"",[616,1451,633],{"class":622},[616,1453,1454],{"class":636},"\"failed\"",[616,1456,1217],{"class":622},[616,1458,1459],{"class":629},"\"suggested_action\"",[616,1461,1462],{"class":622},": {",[616,1464,1465],{"class":629},"\"action\"",[616,1467,633],{"class":622},[616,1469,1470],{"class":636},"\"retry\"",[616,1472,1217],{"class":622},[616,1474,1475],{"class":629},"\"reason\"",[616,1477,633],{"class":622},[616,1479,1480],{"class":636},"\"the registry was down\"",[616,1482,1483],{"class":622},"}}\n",[526,1485,1486,1230,1489,1217,1492,1221,1495,1498,1499,1502,1503,1505,1506,1509],{},[530,1487,1488],{},"action",[530,1490,1491],{},"skip",[530,1493,1494],{},"retry",[530,1496,1497],{},"abandon",", and ",[530,1500,1501],{},"reason"," is one sentence. Any other\n",[530,1504,1488],{}," is ignored. When the item stops, ",[530,1507,1508],{},"kraft view show"," prints the reason and\nthe one command that takes the action, in this form:",[606,1511,1516],{"className":1512,"code":1514,"language":1515,"meta":612},[1513],"language-text","retry: \u003Creason>\nrun: kraft item retry \u003CID>\n","text",[530,1517,1518,1522],{"__ignoreMap":612},[616,1519,1521],{"className":1520},[618],"retry: \u003Creason>\n",[616,1523,1525],{"className":1524},[618],"run: kraft item retry \u003CID>\n",[526,1527,1528,1529,1217,1532,1535,1536,1539,1540,1542],{},"The command is ",[530,1530,1531],{},"kraft item skip ID",[530,1533,1534],{},"kraft item retry ID",", or\n",[530,1537,1538],{},"kraft item abandon --yes ID",". With no ",[530,1541,1501],{},", the first line is the action\nalone.",[526,1544,1545,1546,1548,1549,1553],{},"A stop caused by infrastructure always suggests ",[530,1547,1494],{},", with no recovery involved.\nInfrastructure here means a CI pipeline that failed for the ",[569,1550,1552],{"href":1551},"\u002Fconcepts\u002Fvocabulary#forge","forge","'s own reasons,\nan automated reviewer that errored, or a cancelled run with no successor coming.",[1052,1555,1009],{"id":1009},[526,1557,1558],{},"Kraft reads a session's tokens and cost from the result file first, and from\nthe agent's log after that when the harness declares a log format. A harness\nthat reports usage only through the result file is asked to write it there.",[848,1560,1561,1569],{},[851,1562,1563],{},[854,1564,1565,1567],{},[857,1566,1194],{},[857,1568,868],{},[870,1570,1571,1581,1591,1601,1611,1627],{},[854,1572,1573,1578],{},[875,1574,1575],{},[530,1576,1577],{},"usage.input_tokens",[875,1579,1580],{},"Input tokens used.",[854,1582,1583,1588],{},[875,1584,1585],{},[530,1586,1587],{},"usage.output_tokens",[875,1589,1590],{},"Output tokens used.",[854,1592,1593,1598],{},[875,1594,1595],{},[530,1596,1597],{},"usage.cache_creation_input_tokens",[875,1599,1600],{},"Cache-write tokens, counted as billed input.",[854,1602,1603,1608],{},[875,1604,1605],{},[530,1606,1607],{},"usage.cache_read_input_tokens",[875,1609,1610],{},"Cache-read tokens, counted as billed input.",[854,1612,1613,1617],{},[875,1614,1615],{},[530,1616,1026],{},[875,1618,1619,1620,1622,1623,1626],{},"What the session cost, at the top level of the file, not inside ",[530,1621,1009],{},". Also read as ",[530,1624,1625],{},"total_cost_usd",". Leave it out when you do not know it, rather than guess.",[854,1628,1629,1633],{},[875,1630,1631],{},[530,1632,1043],{},[875,1634,1635],{},"The model that did the work, at the top level of the file.",[543,1637,1639],{"id":1638},"related","Related",[548,1641,1642,1647,1652],{},[551,1643,1644,1646],{},[569,1645,398],{"href":399},": how a command's exit code and result file become a status.",[551,1648,1649,1651],{},[569,1650,402],{"href":403},": how findings and a judge's verdict drive the loop.",[551,1653,1654,633,1656,1658],{},[569,1655,482],{"href":483},[530,1657,1305],{}," and the other events a result file produces.",[1660,1661,1662],"style",{},"html pre.shiki code .s7iLA, html code.shiki .s7iLA{--shiki-light:#0E1116;--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .sb7M8, html code.shiki .sb7M8{--shiki-light:#024C1A;--shiki-default:#024C1A;--shiki-dark:#72F088}html pre.shiki code .semJd, html code.shiki .semJd{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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 .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":612,"searchDepth":626,"depth":626,"links":1664},[1665,1666,1667,1675],{"id":545,"depth":626,"text":546},{"id":600,"depth":626,"text":601},{"id":842,"depth":626,"text":843,"children":1668},[1669,1670,1671,1672,1674],{"id":879,"depth":643,"text":879},{"id":950,"depth":643,"text":950},{"id":969,"depth":643,"text":969},{"id":990,"depth":643,"text":1673},"suggested_​action",{"id":1009,"depth":643,"text":1009},{"id":1638,"depth":626,"text":1639},"The JSON file a task writes at $KRAFT_RESULT_PATH, and every field Kraft reads from it.","md",null,{},true,{"title":406,"description":1676},"XoN31dEi86ewQdnd8q-l0t2Rdz8odSq3l5lryXdCbek",[1684,1686],{"title":402,"path":403,"stem":404,"description":1685,"children":-1},"When a node's fix loop opens, what its repair tasks are told, when the judge runs, and what each verdict does.",{"title":10,"path":411,"stem":412,"description":1687,"children":-1},"Which agent CLIs Kraft runs, what each supports, and how a task picks one.",1791801176226]