[{"data":1,"prerenderedAt":1210},["ShallowReactive",2],{"navigation_docs":3,"-concepts-caps-and-budgets":270,"-concepts-caps-and-budgets-surround":1205},[4,28,51,110,243],{"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},"Troubleshooting and FAQ","\u002Fget-started\u002Ftroubleshooting","1.get-started\u002F3.troubleshooting",{"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},"Vocabulary","\u002Fconcepts\u002Fvocabulary","2.concepts\u002F1.vocabulary",{"title":40,"path":41,"stem":42},"How a work item runs","\u002Fconcepts\u002Fhow-a-work-item-runs","2.concepts\u002F2.how-a-work-item-runs",{"title":44,"path":45,"stem":46},"Caps and budgets","\u002Fconcepts\u002Fcaps-and-budgets","2.concepts\u002F3.caps-and-budgets",{"title":48,"path":49,"stem":50},"Why a permission gate","\u002Fconcepts\u002Fpermission-gate","2.concepts\u002F4.permission-gate",{"title":52,"path":53,"stem":54,"children":55},"Guides","\u002Fguides","3.guides",[56,58,62,66,70,74,78,82,86,90,94,98,102,106],{"title":10,"path":53,"stem":57},"3.guides\u002Findex",{"title":59,"path":60,"stem":61},"Use Kraft from your agent","\u002Fguides\u002Fagent-integration","3.guides\u002F01.agent-integration",{"title":63,"path":64,"stem":65},"Kraft Lite","\u002Fguides\u002Fkraft-lite","3.guides\u002F02.kraft-lite",{"title":67,"path":68,"stem":69},"Remote access","\u002Fguides\u002Fremote-access","3.guides\u002F03.remote-access",{"title":71,"path":72,"stem":73},"Add or override a harness","\u002Fguides\u002Fadding-a-harness","3.guides\u002F04.adding-a-harness",{"title":75,"path":76,"stem":77},"Schedule or webhook work","\u002Fguides\u002Fschedule-and-webhook-work","3.guides\u002F05.schedule-and-webhook-work",{"title":79,"path":80,"stem":81},"Add a security review or a gate reviewer","\u002Fguides\u002Fadd-review-agents","3.guides\u002F06.add-review-agents",{"title":83,"path":84,"stem":85},"Kraft for VS Code","\u002Fguides\u002Fvscode","3.guides\u002F07.vscode",{"title":87,"path":88,"stem":89},"Reviewing a change","\u002Fguides\u002Freview-a-change","3.guides\u002F08.review-a-change",{"title":91,"path":92,"stem":93},"Write your own chain","\u002Fguides\u002Fwrite-your-own-chain","3.guides\u002F09.write-your-own-chain",{"title":95,"path":96,"stem":97},"Switch a harness","\u002Fguides\u002Fswitch-harness","3.guides\u002F10.switch-harness",{"title":99,"path":100,"stem":101},"Upgrade your templates","\u002Fguides\u002Fupgrading-templates","3.guides\u002F11.upgrading-templates",{"title":103,"path":104,"stem":105},"Operations","\u002Fguides\u002Foperations","3.guides\u002F12.operations",{"title":107,"path":108,"stem":109},"Worker Kit","\u002Fguides\u002Fworker-kit","3.guides\u002F13.worker-kit",{"title":111,"path":112,"stem":113,"children":114},"Reference","\u002Freference","4.reference",[115,117,139,183,201,205,227,231,235,239],{"title":10,"path":112,"stem":116},"4.reference\u002Findex",{"title":118,"path":119,"stem":120,"children":121},"CLI","\u002Freference\u002Fcli","4.reference\u002F1.cli\u002Findex",[122,123,127,131,135],{"title":10,"path":119,"stem":120},{"title":124,"path":125,"stem":126},"Item verbs","\u002Freference\u002Fcli\u002Fitem","4.reference\u002F1.cli\u002F2.item",{"title":128,"path":129,"stem":130},"View verbs","\u002Freference\u002Fcli\u002Fview","4.reference\u002F1.cli\u002F3.view",{"title":132,"path":133,"stem":134},"Repo verbs","\u002Freference\u002Fcli\u002Frepo","4.reference\u002F1.cli\u002F4.repo",{"title":136,"path":137,"stem":138},"Admin verbs","\u002Freference\u002Fcli\u002Fadmin","4.reference\u002F1.cli\u002F5.admin",{"title":140,"path":141,"stem":142,"children":143},"Configuration","\u002Freference\u002Fconfiguration","4.reference\u002F2.configuration\u002Findex",[144,145,155,159,163,167,171,175,179],{"title":10,"path":141,"stem":142},{"title":146,"path":147,"stem":148,"children":149},"Repos","\u002Freference\u002Fconfiguration\u002Frepos","4.reference\u002F2.configuration\u002F2.repos\u002Findex",[150,151],{"title":10,"path":147,"stem":148},{"title":152,"path":153,"stem":154},"Workspaces","\u002Freference\u002Fconfiguration\u002Frepos\u002Fworkspaces","4.reference\u002F2.configuration\u002F2.repos\u002F3.workspaces",{"title":156,"path":157,"stem":158},"Policy","\u002Freference\u002Fconfiguration\u002Fpolicy","4.reference\u002F2.configuration\u002F3.policy",{"title":160,"path":161,"stem":162},"Library and chains","\u002Freference\u002Fconfiguration\u002Flibrary-and-chains","4.reference\u002F2.configuration\u002F4.library-and-chains",{"title":164,"path":165,"stem":166},"Harnesses file","\u002Freference\u002Fconfiguration\u002Fharnesses-file","4.reference\u002F2.configuration\u002F5.harnesses-file",{"title":168,"path":169,"stem":170},"Access","\u002Freference\u002Fconfiguration\u002Faccess","4.reference\u002F2.configuration\u002F6.access",{"title":172,"path":173,"stem":174},"Intake","\u002Freference\u002Fconfiguration\u002Fintake","4.reference\u002F2.configuration\u002F7.intake",{"title":176,"path":177,"stem":178},"Sandbox host","\u002Freference\u002Fconfiguration\u002Fsandbox","4.reference\u002F2.configuration\u002F8.sandbox",{"title":180,"path":181,"stem":182},"Environment variables","\u002Freference\u002Fconfiguration\u002Fenvironment-variables","4.reference\u002F2.configuration\u002F9.environment-variables",{"title":184,"path":185,"stem":186,"children":187},"Chain nodes","\u002Freference\u002Fchain-nodes","4.reference\u002F3.chain-nodes\u002Findex",[188,189,193,197],{"title":10,"path":185,"stem":186},{"title":190,"path":191,"stem":192},"Subprocess tasks","\u002Freference\u002Fchain-nodes\u002Fsubprocess-tasks","4.reference\u002F3.chain-nodes\u002F2.subprocess-tasks",{"title":194,"path":195,"stem":196},"Fix loop and judge","\u002Freference\u002Fchain-nodes\u002Ffix-loop","4.reference\u002F3.chain-nodes\u002F3.fix-loop",{"title":198,"path":199,"stem":200},"Result file","\u002Freference\u002Fchain-nodes\u002Fresult-file","4.reference\u002F3.chain-nodes\u002F4.result-file",{"title":202,"path":203,"stem":204},"Permission gate","\u002Freference\u002Fpermissions","4.reference\u002F4.permissions",{"title":206,"path":207,"stem":208,"children":209},"Agent harnesses","\u002Freference\u002Fharnesses","4.reference\u002F5.harnesses\u002Findex",[210,211,215,219,223],{"title":10,"path":207,"stem":208},{"title":212,"path":213,"stem":214},"Unattended runs","\u002Freference\u002Fharnesses\u002Funattended-runs","4.reference\u002F5.harnesses\u002F2.unattended-runs",{"title":216,"path":217,"stem":218},"Agent profiles","\u002Freference\u002Fharnesses\u002Fagent-profiles","4.reference\u002F5.harnesses\u002F3.agent-profiles",{"title":220,"path":221,"stem":222},"Harness files","\u002Freference\u002Fharnesses\u002Fharness-files","4.reference\u002F5.harnesses\u002F4.harness-files",{"title":224,"path":225,"stem":226},"Fallback and escalation","\u002Freference\u002Fharnesses\u002Ffallback-and-escalation","4.reference\u002F5.harnesses\u002F5.fallback-and-escalation",{"title":228,"path":229,"stem":230},"Inbound triggers","\u002Freference\u002Ftriggers","4.reference\u002F6.triggers",{"title":232,"path":233,"stem":234},"HTTP API","\u002Freference\u002Fhttp-api","4.reference\u002F7.http-api",{"title":236,"path":237,"stem":238},"MCP tools","\u002Freference\u002Fmcp-tools","4.reference\u002F8.mcp-tools",{"title":240,"path":241,"stem":242},"Events","\u002Freference\u002Fevents","4.reference\u002F9.events",{"title":244,"path":245,"stem":246,"children":247},"Project","\u002Fproject","5.project",[248,250,254,258,262,266],{"title":10,"path":245,"stem":249},"5.project\u002Findex",{"title":251,"path":252,"stem":253},"Architecture","\u002Fproject\u002Farchitecture","5.project\u002F1.architecture",{"title":255,"path":256,"stem":257},"Contributing","\u002Fproject\u002Fcontributing","5.project\u002F2.contributing",{"title":259,"path":260,"stem":261},"Security","\u002Fproject\u002Fsecurity","5.project\u002F3.security",{"title":263,"path":264,"stem":265},"Data and privacy","\u002Fproject\u002Fdata-and-privacy","5.project\u002F4.data-and-privacy",{"title":267,"path":268,"stem":269},"Status and support","\u002Fproject\u002Fstatus-and-support","5.project\u002F5.status-and-support",{"id":271,"title":44,"body":272,"description":1198,"extension":1199,"links":1200,"meta":1201,"navigation":1202,"path":45,"seo":1203,"stem":46,"__hash__":1204},"docs\u002F2.concepts\u002F3.caps-and-budgets.md",{"type":273,"value":274,"toc":1180},"minimark",[275,283,288,291,326,332,346,354,374,378,395,409,412,429,441,445,448,462,469,476,487,493,497,504,507,522,536,539,546,595,598,624,630,637,721,740,744,751,802,820,823,898,920,925,955,982,986,997,1010,1014,1021,1025,1028,1066,1074,1101,1104,1111,1115,1150,1154,1176],[276,277,278,279,282],"p",{},"Kraft stops a work item that runs too long or spends too much, and it hands\nthe item to you instead of failing it. This page explains how those bounds\nfit together and why they work the way they do. For every key and its\ndefault, see ",[280,281,140],"a",{"href":157},".",[284,285,287],"h2",{"id":286},"two-kinds-of-bound","Two kinds of bound",[276,289,290],{},"Kraft bounds work in two ways.",[276,292,293,297,298,302,303,306,307,310,311,314,315,318,319,322,323,282],{},[294,295,296],"strong",{},"Loops"," bound repetition. A fix loop retries a node until it passes. Its\nattempt limit is ",[299,300,301],"code",{},"max_attempts"," in the chain (",[299,304,305],{},"attempts"," under ",[299,308,309],{},"loops:"," and\n",[299,312,313],{},"default:"," in ",[299,316,317],{},"policy.yaml","), and its wall clock is ",[299,320,321],{},"wall_clock_s"," there. An external\nwait (a pipeline, an automated review, an approval, a merge landing) is not a\nloop. Its timeout is its own task's ",[299,324,325],{},"total_time_cap_minutes",[276,327,328,331],{},[294,329,330],{},"Caps"," bound a scope's resources: time, tokens and dollars. A scope is the\nwhole work item, one node, one step or one task.",[276,333,334,335,338,339,343,344,282],{},"Only a person resets a loop's count. A retry from the board or from\n",[299,336,337],{},"kraft item retry"," starts the retried span's fix loops afresh. A retry that a\nworker, an MCP assistant, an escalation turn or a rate-limit relaunch asks for\nkeeps counting. An ",[340,341,342],"em",{},"escalation turn"," is the agent Kraft starts to help when an\nitem stops for a person; see\n",[280,345,224],{"href":225},[347,348,350,351,353],"h3",{"id":349},"why-loops-ships-empty","Why ",[299,352,309],{}," ships empty",[276,355,356,357,359,360,362,363,365,366,368,369,371,372,282],{},"A ",[299,358,309],{}," key that names no live loop does nothing and warns nobody. A stale\ncap would look live and bind nothing, so the shipped ",[299,361,317],{}," names none.\nThe ",[299,364,313],{}," entry covers every fix loop. A loop's own ",[299,367,301],{}," in the\nchain wins over ",[299,370,313],{},", so the shipped fix loops take their attempts from\nthe chain and only their wall clock from ",[299,373,313],{},[284,375,377],{"id":376},"caps-are-set-per-level","Caps are set per level",[276,379,380,381,384,385,387,388,384,391,394],{},"You set the four caps (",[299,382,383],{},"time_cap_minutes",", ",[299,386,325],{},",\n",[299,389,390],{},"token_budget",[299,392,393],{},"budget_usd",") per level of scope: the work item, its nodes\n(a gate is a node), its steps and its tasks.",[276,396,397,398,400,401,404,405,408],{},"A level's default binds every scope of that kind that nothing set a value for.\nThe shipped ",[299,399,317],{}," has example defaults, commented out. If you uncomment\nthem, the work item runs under 480 minutes, each node under 180, each step\nunder 120 and each task under 90, all at once. Out of the box no level\ndefault is set: only the caps the shipped tasks set on themselves in\n",[299,402,403],{},"library.yaml"," apply, alongside the ",[299,406,407],{},"budget:"," dollar caps. Whichever runs out first stops the item, and the stop names its\nscope.",[276,410,411],{},"A value set in the chain (on the chain, a node, a step or a task) or by the\nitem's own override replaces the defaults for that scope and for every scope\nunder it that sets none. A node set to 240 minutes runs its steps and tasks\nunder 240 too.",[276,413,414,415,418,419,418,422,418,425,428],{},"A default is not a ceiling. Any scope may set more, up to its level's\nmaximum. A narrower level's cap may not exceed a broader one's\n(",[299,416,417],{},"tasks"," \u003C= ",[299,420,421],{},"steps",[299,423,424],{},"nodes",[299,426,427],{},"work_item","), so a task cap of 20 minutes\ninside a step capped at 10 is refused when the chain loads.",[276,430,431,432,314,435,438,439,282],{},"A repository's caps (its ",[299,433,434],{},"policy:",[299,436,437],{},"repos.yaml",") are the work item's,\nlike the chain's own ",[299,440,434],{},[284,442,444],{"id":443},"time-caps","Time caps",[276,446,447],{},"There are two clocks.",[449,450,451,457],"ul",{},[452,453,454,456],"li",{},[299,455,383],{}," counts running time. Paused time, external waits, gates\nand rate-limited time do not count.",[452,458,459,461],{},[299,460,325],{}," counts wall-clock time, including waits, gates and\nrate limits, less only a manual pause. For a task other than a wait, it is\nits running time. For a wait, it is the wait's timeout.",[276,463,464,465,468],{},"Every clock counts from the scope's start in the current run. A person's\n",[299,466,467],{},"retry"," starts them all afresh. A rate-limit relaunch or a stuck escalation's\nown retry does not.",[276,470,471,472,475],{},"A node's clock is its own, independent of its fix loop's ",[299,473,474],{},"timeout_minutes",",\nwhich bounds only the fix cycles. A node's cap covers everything that runs as\nthat node: its tasks, recovery, fix loop, a gate's automated review and the\nautomatic stuck-escalation turn. Your own escalation chat is not the node\nrunning, so it is not capped.",[276,477,478,479,482,483,486],{},"Hitting a cap stops the item for you with the reason \"",[299,480,481],{},"\u003Cscope>"," hit its time\ncap of N minutes\". It is never treated as a code failure. It spends no\nrecovery or fix-loop attempt, and no stuck escalation answers it. A gate's own\n",[299,484,485],{},"timeout"," stops the item the same way, naming the gate, and the gate stays\nopen for you to approve or reject.",[276,488,489,490,492],{},"Because a work item's ",[299,491,325],{}," counts its gates and external\nwaits, a cap of two days stops an item still waiting on a week-long approval.\nSize it for the longest wait your chain allows.",[284,494,496],{"id":495},"token-and-dollar-budgets","Token and dollar budgets",[276,498,499,500,503],{},"A token or dollar cap refuses to start the next agent launch once its scope, or\nany scope around it, has reached its cap. Kraft checks before each launch, gate\nreviewers and escalation turns included. It cannot interrupt a running agent,\nso overshoot is bounded by one launch's cost. While that agent is still\nrunning, its spend counts too: Kraft prices its known tokens against a packaged\nrate table and shows the result as an estimate (",[299,501,502],{},"~$4.20 (est.)",") until the\nsession exits and the agent's own reported figure replaces it — so a long\nsession's spend can trip a dollar cap before it finishes, not only after.",[276,505,506],{},"Three things follow.",[449,508,509,516,519],{},[452,510,511,512,282],{},"A finished launch whose harness reported no cost counts at an estimate\nfrom the same rate table. If Kraft cannot price it, the caps differ: see\n",[280,513,515],{"href":514},"#harnesses-that-report-no-cost","Harnesses that report no cost",[452,517,518],{},"Launches that start together in one scope, such as a parallel step's tasks,\neach pass the check before any of them has spent. A shared scope's cap can be\novershot by up to their combined cost.",[452,520,521],{},"A launch that resumes an earlier agent session counts only what it added.",[276,523,524,527,528,314,531,533,534,282],{},[299,525,526],{},"budget.work_item_usd"," and ",[299,529,530],{},"budget.daily_usd",[299,532,317],{}," stay the outer\nceilings, above any per-scope ",[299,535,393],{},[347,537,515],{"id":538},"harnesses-that-report-no-cost",[276,540,541,542,545],{},"Codex, Cursor, Amp and Antigravity report tokens but no cost. Kraft estimates a finished\nsession's cost from ",[299,543,544],{},"prices.json",", the rate table packaged with each release\n(Anthropic, OpenAI and Google models, refreshed per release), priced on the model the\nlog names or, when it names none, the model Kraft launched it with:",[449,547,548,562,568,577],{},[452,549,550,553,554,557,558,561],{},[294,551,552],{},"Codex"," names no model in its log, so it is priced on its launch model\n(",[299,555,556],{},"gpt-5.6-sol"," in the shipped ",[299,559,560],{},"deep"," profile). A task that passes no model\nruns on the CLI's own default, which Kraft cannot price.",[452,563,564,567],{},[294,565,566],{},"Amp"," names its model in its log, and is priced when the table lists it.",[452,569,570,573,574,576],{},[294,571,572],{},"Cursor"," reports its model as \"Auto\", so it is priced only on a launch\nmodel the table lists. Cursor's own model ids usually aren't. A listed one,\nsuch as ",[299,575,556],{},", is priced at its provider's list price (OpenAI's,\nhere), not what Cursor bills you for it on your plan or in credits.",[452,578,579,582,583,586,587,590,591,594],{},[294,580,581],{},"Antigravity"," names its model in its log only when launched with one. It\nis priced when that is a base model id the table lists, such as\n",[299,584,585],{},"gemini-3.8-flash"," with ",[299,588,589],{},"effort"," set, never a slug with the effort in it\n(",[299,592,593],{},"gemini-3.8-flash-low","). That is Google's API list price, not the quota or\ncredits a signed-in account spends.",[276,596,597],{},"A session Kraft cannot price has no dollar figure, and the two kinds of dollar\ncap treat it differently:",[449,599,600,618],{},[452,601,602,384,604,527,606,609,610,613,614,617],{},[299,603,526],{},[299,605,530],{},[299,607,608],{},"kraft item create --budget","\ncount it as $0 and never stop for it. The item's timeline says so the first\ntime (",[299,611,612],{},"spend_unpriced","), and ",[299,615,616],{},"kraft admin doctor"," warns about each harness\nthe chains launch on an unpriced model.",[452,619,620,621,623],{},"A per-scope ",[299,622,393],{}," counts it as unknown spend and stops the next\nlaunch in that scope for you.",[276,625,626,627,629],{},"The estimate stays marked as one (",[299,628,502],{},"), never as the agent's own\nfigure. Some models cost more once a request's context passes a size, such as\nOpenAI's past 272k tokens. Kraft prices a whole session at that higher rate\nwhen one of its requests passed the size, which it can tell only from a log\nthat shows each request: Claude's and Amp's. Codex's log shows only running\ntotals, so a Codex session is priced at the base rate, and a long-context one\nestimates low.",[631,632,633,634,636],"warning",{},"A dollar cap does not bound a session Kraft cannot price. ",[299,635,390],{},"\nbounds any harness.",[638,639,640,659],"table",{},[641,642,643],"thead",{},[644,645,646,650,653,656],"tr",{},[647,648,649],"th",{},"You want to bound",[647,651,652],{},"Claude, OpenCode (report cost)",[647,654,655],{},"Codex, Amp, Antigravity on a priced model (estimated)",[647,657,658],{},"Cursor, or any unpriced model",[660,661,662,686,705],"tbody",{},[644,663,664,668,679,682],{},[665,666,667],"td",{},"One work item",[665,669,670,384,672,675,676,678],{},[299,671,526],{},[299,673,674],{},"--budget",", or ",[299,677,393],{}," on the work item",[665,680,681],{},"The same",[665,683,684,678],{},[299,685,390],{},[644,687,688,691,699,701],{},[665,689,690],{},"One node, step or task",[665,692,693,695,696,698],{},[299,694,393],{}," or ",[299,697,390],{}," on that scope",[665,700,681],{},[665,702,703,698],{},[299,704,390],{},[644,706,707,710,714,718],{},[665,708,709],{},"Everything in a day",[665,711,712],{},[299,713,530],{},[665,715,716],{},[299,717,530],{},[665,719,720],{},"No cap counts it.",[276,722,723,724,727,728,731,732,735,736,739],{},"Today's spend against that cap is ",[299,725,726],{},"GET \u002Fbudget\u002Ftoday",", and every item's own\nshare of it is ",[299,729,730],{},"budget_cap.daily"," on ",[299,733,734],{},"GET \u002Fwork-items\u002F{id}"," (see\n",[280,737,232],{"href":738},"\u002Freference\u002Fhttp-api#daily-total-and-dry-run",").",[284,741,743],{"id":742},"raising-a-cap-on-a-stuck-item","Raising a cap on a stuck item",[276,745,746,747,750],{},"A work item's own cap can exceed the chain's, up to ",[299,748,749],{},"maxima.work_item",". To\nunstick a capped item, raise its cap and retry. You need no config edit:",[752,753,758],"pre",{"className":754,"code":755,"language":756,"meta":757,"style":757},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","kraft item set-policy ID --policy time_cap_minutes=240\nkraft item retry ID\n","bash","",[299,759,760,789],{"__ignoreMap":757},[761,762,765,769,773,776,779,782,785],"span",{"class":763,"line":764},"line",1,[761,766,768],{"class":767},"sBMFI","kraft",[761,770,772],{"class":771},"sfazB"," item",[761,774,775],{"class":771}," set-policy",[761,777,778],{"class":771}," ID",[761,780,781],{"class":771}," --policy",[761,783,784],{"class":771}," time_cap_minutes=",[761,786,788],{"class":787},"sbssI","240\n",[761,790,792,794,796,799],{"class":763,"line":791},2,[761,793,768],{"class":767},[761,795,772],{"class":771},[761,797,798],{"class":771}," retry",[761,800,801],{"class":771}," ID\n",[276,803,804,807,808,811,812,815,816,819],{},[299,805,806],{},"set-policy"," replaces the item's whole override, so repeat every ",[299,809,810],{},"--policy","\nyou set earlier, or they are dropped. ",[299,813,814],{},"--clear"," removes the override. A cap on\none path, such as ",[299,817,818],{},"verification.time_cap_minutes=90",", may exceed that scope's\nlevel default up to its level's maximum, but not what the chain, the item's cap\nor an enclosing path already gives it. Kraft refuses a larger value and names\nboth scopes.",[276,821,822],{},"An item has two dollar caps, and each has its own way up:",[449,824,825,838],{},[452,826,827,829,830,832,833,835,836,282],{},[299,828,393],{}," in the item's policy is a per-scope cap, like the time caps\nabove. ",[299,831,806],{}," sets it the same way: item-wide it may exceed the\nchain's up to ",[299,834,749],{},", and on a path it only tightens. Then\n",[299,837,337],{},[452,839,840,841,843,844,846,847,850,851,854,855,858,859,862,863,866,867,384,869,871,872,874,875,877,878,881,882,695,884,586,886,888,889,877,891,314,893,895,896,282],{},"The item's own dollar cap, the one ",[299,842,608],{}," sets in\nplace of ",[299,845,526],{},", is raised with\n",[299,848,849],{},"kraft item raise-budget ID --usd N"," (the MCP ",[299,852,853],{},"raise_budget"," tool, or the\n",[294,856,857],{},"Raise budget"," button on the item), which also retries the item.\n",[299,860,861],{},"--usd none"," lifts the cap. It works only on an item this cap stopped, and\nno ",[299,864,865],{},"maxima"," bounds it. An item stopped by ",[299,868,393],{},[299,870,390],{}," or\n",[299,873,530],{}," shows no ",[294,876,857],{},", and ",[299,879,880],{},"raise-budget"," refuses\nit: raise ",[299,883,393],{},[299,885,390],{},[299,887,806],{}," as above or in\n",[299,890,317],{},[299,892,530],{},[299,894,317],{},", or wait for local\nmidnight. Then ",[299,897,337],{},[752,899,901],{"className":754,"code":900,"language":756,"meta":757,"style":757},"kraft item raise-budget ID --usd 25\n",[299,902,903],{"__ignoreMap":757},[761,904,905,907,909,912,914,917],{"class":763,"line":764},[761,906,768],{"class":767},[761,908,772],{"class":771},[761,910,911],{"class":771}," raise-budget",[761,913,778],{"class":771},[761,915,916],{"class":771}," --usd",[761,918,919],{"class":787}," 25\n",[276,921,356,922,924],{},[299,923,393],{}," stop on unknown spend is different: no higher cap passes it,\nsince Kraft still cannot show the scope is under the new one. Clear the\nitem-wide cap instead, then retry:",[752,926,928],{"className":754,"code":927,"language":756,"meta":757,"style":757},"kraft item set-policy ID --policy budget_usd=none\nkraft item retry ID\n",[299,929,930,945],{"__ignoreMap":757},[761,931,932,934,936,938,940,942],{"class":763,"line":764},[761,933,768],{"class":767},[761,935,772],{"class":771},[761,937,775],{"class":771},[761,939,778],{"class":771},[761,941,781],{"class":771},[761,943,944],{"class":771}," budget_usd=none\n",[761,946,947,949,951,953],{"class":763,"line":791},[761,948,768],{"class":767},[761,950,772],{"class":771},[761,952,798],{"class":771},[761,954,801],{"class":771},[276,956,957,960,961,963,964,966,967,970,971,974,975,384,977,527,979,981],{},[299,958,959],{},"budget_usd=none"," means no dollar cap for the work item, and none for each\nnode, step or task the chain set no ",[299,962,393],{}," on, replacing the chain's,\nthe repository's and the ",[299,965,317],{}," defaults. It is item-wide only, and\nrefused when ",[299,968,969],{},"maxima.work_item.budget_usd"," is set. A cap the chain set on a\nnode, step or task still binds; skip that node with ",[299,972,973],{},"kraft item skip","\ninstead. ",[299,976,390],{},[299,978,526],{},[299,980,530],{}," still\nbound the item.",[284,983,985],{"id":984},"the-shipped-implementer-cap","The shipped implementer cap",[276,987,988,989,992,993,996],{},"The ",[299,990,991],{},"implementer"," task, which both shipped chains run, sets\n",[299,994,995],{},"time_cap_minutes: 120",". In practice, successful implementer runs finish well\ninside that time, so the cap binds only a run that has already gone wrong, for\nexample a worker stuck waiting on a test run it backgrounded.",[276,998,999,1000,1002,1003,1005,1006,1009],{},"A long plan can need more. Raise the item's own cap, or set a larger one on the\ntask in ",[299,1001,403],{},". The task's 120 exceeds the example's ",[299,1004,417],{}," default of\n90, which a scope may do. A ",[299,1007,1008],{},"maxima.tasks.time_cap_minutes"," (or a broader\nlevel's) under 120 refuses both shipped chains until you lower the task's cap\nto fit.",[284,1011,1013],{"id":1012},"background-jobs","Background jobs",[276,1015,1016,1017,1020],{},"A worker's session ends with its turn. If the turn ends with a background job\nstill running, the session fails at once, and the log and a\n",[299,1018,1019],{},"background_jobs_abandoned"," event name each job.",[284,1022,1024],{"id":1023},"how-a-policy-resolves","How a policy resolves",[276,1026,1027],{},"A work item freezes its policy when you file it. Kraft layers it from the\nbroadest source to the narrowest:",[1029,1030,1031,1040,1047,1052,1057],"ol",{},[452,1032,1033,527,1036,314,1038,282],{},[299,1034,1035],{},"defaults",[299,1037,865],{},[299,1039,317],{},[452,1041,1042,1043,314,1045,282],{},"The repository's ",[299,1044,434],{},[299,1046,437],{},[452,1048,1049,1050,282],{},"The chain's ",[299,1051,434],{},[452,1053,1054,1055,282],{},"Each node's, step's and task's own ",[299,1056,434],{},[452,1058,1059,1060,871,1063,282],{},"Your item's own override, from ",[299,1061,1062],{},"kraft item create --policy",[299,1064,1065],{},"kraft item set-policy",[276,1067,1068,1069,1073],{},"Kraft refuses at ",[280,1070,1072],{"href":1071},"\u002Fconcepts\u002Fvocabulary#intake","intake"," a layer that relaxes what it inherits, and names the\nscope. That is why a bad policy fails when you file the item, not hours into a\nrun.",[276,1075,1076,1077,695,1079,1081,1082,1084,1085,1088,1089,1092,1093,1096,1097,1100],{},"Your override comes last, so its operational values win over the template's.\nA ",[299,1078,301],{},[299,1080,474],{}," on an execution node wins over its fix\nloop's own ",[299,1083,301],{},". Its safety values only ever tighten. An\n",[299,1086,1087],{},"allowed_tools"," list intersects with what the scope already allows, a ",[299,1090,1091],{},"grants","\nlist keeps only the grants the scope already holds, ",[299,1094,1095],{},"deny_tools"," adds to the\nlist, and a ",[299,1098,1099],{},"sandbox"," must match any already set. The chain narrowing the same\nfield first never causes a refusal.",[276,1102,1103],{},"Your override is the one layer that can change after filing. On a running or\nwaiting item, a change takes effect from the next node entered and the next\ncheck of a wait.",[276,1105,1106,1107,1110],{},"A recovery plan inherits the task, step or node that declares it. A fix loop,\nits judge, a node's escalation task and its conflict handler inherit their\nnode. A gate's ",[299,1108,1109],{},"auto_review"," inherits its gate.",[284,1112,1114],{"id":1113},"why-maxima-start-unset","Why maxima start unset",[276,1116,1117,1118,527,1121,1124,1125,1127,1128,1130,1131,1134,1135,1138,1139,527,1142,1145,1146,1149],{},"A fresh install ships with ",[299,1119,1120],{},"defaults:",[299,1122,1123],{},"maxima:"," commented out. An\nuncommented value is a real ceiling, and Kraft must not silently cap someone\nwho never chose a number. A safety field listed only in ",[299,1126,865],{},", such as\n",[299,1129,1087],{},", starts at its maximum and can only be narrowed. That is why\nthe reference example sets no ",[299,1132,1133],{},"maxima.allowed_tools",": a list there binds every\nagent task on every harness. ",[299,1136,1137],{},"gemini"," cannot enforce a tool list and refuses\nto launch under one. ",[299,1140,1141],{},"codex",[299,1143,1144],{},"cursor"," enforce it through Kraft's\npermission hook, but refuse a list that leaves out the web tools the hook\nnever sees. On ",[299,1147,1148],{},"claude",", the harness every shipped task uses, it removes\nevery built-in tool the list does not name.",[284,1151,1153],{"id":1152},"related","Related",[449,1155,1156,1161,1171],{},[452,1157,1158,1160],{},[280,1159,140],{"href":157},"\nlists every key and its default.",[452,1162,1163,1165,1166,310,1168,1170],{},[280,1164,202],{"href":203}," explains how ",[299,1167,1087],{},[299,1169,1095],{}," are enforced.",[452,1172,1173,1175],{},[280,1174,29],{"href":37}," defines chain, node, step and task.",[1177,1178,1179],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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":757,"searchDepth":791,"depth":791,"links":1181},[1182,1187,1188,1189,1192,1193,1194,1195,1196,1197],{"id":286,"depth":791,"text":287,"children":1183},[1184],{"id":349,"depth":1185,"text":1186},3,"Why loops: ships empty",{"id":376,"depth":791,"text":377},{"id":443,"depth":791,"text":444},{"id":495,"depth":791,"text":496,"children":1190},[1191],{"id":538,"depth":1185,"text":515},{"id":742,"depth":791,"text":743},{"id":984,"depth":791,"text":985},{"id":1012,"depth":791,"text":1013},{"id":1023,"depth":791,"text":1024},{"id":1113,"depth":791,"text":1114},{"id":1152,"depth":791,"text":1153},"How Kraft bounds time, tokens, and dollars, and how a policy resolves from policy.yaml down to a single task.","md",null,{},true,{"title":44,"description":1198},"QMSY9bYU-aW_nN6gi_85ATNExe6Nm1iEBlIA870YQsY",[1206,1208],{"title":40,"path":41,"stem":42,"description":1207,"children":-1},"A work item's path from filing to merge, the seven statuses it can hold, and where a steer, a fix loop and an escalation fit.",{"title":48,"path":49,"stem":50,"description":1209,"children":-1},"Why Kraft answers a worker's permission prompts itself, and how each harness lets it.",1790824505592]