[{"data":1,"prerenderedAt":213},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcore-features\u002Fbackground-jobs":3},{"id":4,"title":5,"body":6,"description":205,"extension":206,"meta":207,"navigation":208,"path":209,"seo":210,"stem":211,"__hash__":212},"docs\u002Fdocs\u002Fcore-features\u002Fbackground-jobs.md","Background Jobs",{"type":7,"value":8,"toc":198},"minimark",[9,13,27,34,53,58,61,64,74,77,85,91,119,122,171,175,181,188],[10,11,5],"h1",{"id":12},"background-jobs",[14,15,16,17,21,22,26],"p",{},"Some commands are meant to keep running — a dev server, a file watcher, a\n",[18,19,20],"code",{},"build --watch",", a local API. TheGitAI runs these as ",[23,24,25],"strong",{},"background jobs",", so the\nprocess stays up while you and the agent keep working in the same session.",[14,28,29,30,33],{},"A session can keep up to ",[23,31,32],{},"eight"," jobs running at once.",[14,35,36,37,41,42,41,45,48,49,52],{},"When a task needs a long-running process — ",[38,39,40],"em",{},"\"start the dev server and open the\nhome page\"",", ",[38,43,44],{},"\"run the watcher and keep iterating\"",[38,46,47],{},"\"boot the API and hit the\nhealth endpoint\""," — the agent launches it as a managed job, gives it a short id\nlike ",[18,50,51],{},"bg_1",", and continues right away. The process keeps running in the\nbackground, and the agent can check its output whenever it needs to. So can you.\nThe agent is also notified when a managed job exits, so an unexpected server\nfailure can be handled on the next model round without constant polling.",[54,55,57],"h2",{"id":56},"watch-a-job-while-it-runs","Watch a job while it runs",[14,59,60],{},"While a job is live, its block in the transcript updates on its own — a status\ndot, the command, how long it has been running, and a live tail of its most\nrecent output. You always see the latest activity without lines scrolling past.",[14,62,63],{},"Once the agent has what it needs and moves on, things stay calm and the composer\nstays clean. A compact indicator above the input line keeps you aware of what's\nstill running:",[65,66,72],"pre",{"className":67,"code":69,"language":70,"meta":71},[68],"language-text","● 1 shell running · \u002Fjobs\n","text","",[18,73,69],{"__ignoreMap":71},[14,75,76],{},"Captured output is bounded so a noisy watcher cannot consume unlimited memory.\nRepository paths and credentials embedded in common connection strings are\nredacted before job output is shown to the model.",[54,78,80,81,84],{"id":79},"the-jobs-picker","The ",[18,82,83],{},"\u002Fjobs"," picker",[14,86,87,88,90],{},"Type ",[18,89,83],{}," between turns to open a picker of every job in the session. Slash\ncommands are not accepted while a turn is running — if the agent is still\nworking, cancel or wait for it to finish first.",[92,93,94,101,107,113],"ul",{},[95,96,97,100],"li",{},[23,98,99],{},"↑ \u002F ↓"," — move between jobs",[95,102,103,106],{},[23,104,105],{},"Enter"," — expand or collapse a job to read its recent output inline",[95,108,109,112],{},[23,110,111],{},"k"," — stop the selected job",[95,114,115,118],{},[23,116,117],{},"Esc"," — close the picker",[14,120,121],{},"Prefer to work by id? These commands work directly, in both the full terminal\nUI and plain mode:",[123,124,125,138],"table",{},[126,127,128],"thead",{},[129,130,131,135],"tr",{},[132,133,134],"th",{},"Command",[132,136,137],{},"What it does",[139,140,141,151,161],"tbody",{},[129,142,143,148],{},[144,145,146],"td",{},[18,147,83],{},[144,149,150],{},"Open the background jobs picker.",[129,152,153,158],{},[144,154,155],{},[18,156,157],{},"\u002Fjobs output \u003Cid>",[144,159,160],{},"Print a job's full captured output into the transcript.",[129,162,163,168],{},[144,164,165],{},[18,166,167],{},"\u002Fjobs kill \u003Cid>",[144,169,170],{},"Stop a background job.",[54,172,174],{"id":173},"it-cleans-up-after-itself","It cleans up after itself",[14,176,177,178,180],{},"You never have to keep track of what's still running. When you end the session,\nTheGitAI stops its background jobs for you — nothing lingers after you're done —\nand you can always stop one yourself from ",[18,179,83],{}," whenever you like.",[14,182,183,184,187],{},"Background jobs follow the current mode. Starting one requires the normal\ncommand approval in Default mode, is automatically approved in Auto-Accept, and\nis not available in read-only Plan mode. Commands that need an interactive\n",[18,185,186],{},"sudo"," password run in the foreground instead.",[189,190,191],"tip",{},[14,192,193,194,197],{},"Ask for the whole loop in one message — ",[38,195,196],{},"\"start the dev server, then check the\nhomepage renders and fix anything that looks off\""," — and the agent will launch\nthe server as a background job, work against it live, and wrap it up when the\ntask is done.",{"title":71,"searchDepth":199,"depth":199,"links":200},2,[201,202,204],{"id":56,"depth":199,"text":57},{"id":79,"depth":199,"text":203},"The \u002Fjobs picker",{"id":173,"depth":199,"text":174},"Keep dev servers, watchers, and builds running while an AI coding agent works. Follow live output, read logs, and stop jobs without blocking the conversation.","md",{},true,"\u002Fdocs\u002Fcore-features\u002Fbackground-jobs",{"title":5,"description":205},"docs\u002Fcore-features\u002Fbackground-jobs","CrBce7iV9snki5Z2w__4K0j9e2_bz8KZlor9UFz5D-4",1784980638893]