Background Jobs
Some commands are meant to keep running — a dev server, a file watcher, a
build --watch, a local API. TheGitAI runs these as background jobs, so the
process stays up while you and the agent keep working in the same session.
A session can keep up to eight jobs running at once.
When a task needs a long-running process — "start the dev server and open the
home page", "run the watcher and keep iterating", "boot the API and hit the
health endpoint" — the agent launches it as a managed job, gives it a short id
like bg_1, and continues right away. The process keeps running in the
background, and the agent can check its output whenever it needs to. So can you.
The agent is also notified when a managed job exits, so an unexpected server
failure can be handled on the next model round without constant polling.
Watch a job while it runs
While a job is live, its block in the transcript updates on its own — a status dot, the command, how long it has been running, and a live tail of its most recent output. You always see the latest activity without lines scrolling past.
Once the agent has what it needs and moves on, things stay calm and the composer stays clean. A compact indicator above the input line keeps you aware of what's still running:
● 1 shell running · /jobs
Captured output is bounded so a noisy watcher cannot consume unlimited memory. Repository paths and credentials embedded in common connection strings are redacted before job output is shown to the model.
The /jobs picker
Type /jobs between turns to open a picker of every job in the session.
- ↑ / ↓ — move between jobs
- Enter — expand or collapse a job to read its recent output inline
- k — stop the selected job
- Esc — close the picker
While the agent is working
You don't have to wait for the turn to finish to check on a dev server. Press Ctrl+B at any time to open the same picker over the running turn — the agent keeps working, your half-typed message is kept, and a queued message stays queued. Press Ctrl+B again or Esc to close it; neither cancels the turn.
Ctrl+B is the way in mid-turn, because the composer is a queue box while the
agent works and slash commands other than /jobs are not accepted there. The
running-shells indicator says which one applies:
● 2 shells running · ctrl+b while a turn is running
● 2 shells running · /jobs between turns
Prefer to work by id? These commands work directly, in both the full terminal UI and plain mode:
| Command | What it does |
|---|---|
/jobs | Open the background jobs picker. |
/jobs output <id> | Print a job's full captured output into the transcript. |
/jobs kill <id> | Stop a background job. |
It cleans up after itself
You never have to keep track of what's still running. When you end the session,
TheGitAI stops its background jobs for you — nothing lingers after you're done —
and you can always stop one yourself from /jobs whenever you like.
Background jobs follow the current mode. Starting one requires the normal
command approval in Default mode, is automatically approved in Auto-Accept, and
is not available in read-only Plan mode. Commands that need an interactive
sudo password run in the foreground instead.