| title | Worker Daemon |
|---|---|
| sidebarLabel | Worker |
| description | Use when running DevIntern as a long-running worker that picks up tracker tasks, handles PR reviews and CI failures, and runs as a service. |
| section | Automation |
| order | 2 |
| dateModified | 2026-12-03 |
devintern worker runs DevIntern as a long-running daemon on your own machine. It picks up work for every repository in your workspace and runs it locally. Your code, credentials, and agent runs stay on your machine.
To run it on a VPS or cloud VM, see Run DevIntern on a Cloud VM.
- Tracker tasks that match your ready-tasks query (polling mode).
- Recurring automations: prompts run on a schedule. See Recurring Automations.
- Follow-up on pull requests: review feedback, merge conflicts, CI failures, auto-merge, and
@mentions. See PR Follow-up. - Scheduled story-point estimation. See Story Points Estimation.
- Production errors from Sentry. See Sentry Auto-fixes.
- Ad-hoc tasks you enqueue with
devintern worker add. See Delegate Tasks to the Worker. Withdraw a pending one or stop a running one withdevintern worker cancel <taskKey>(see Adjust and Inspect Delegated Tasks).
When something does not get picked up, see Worker Troubleshooting.
devintern worker initworker init first checks this host: the agent CLI (the same check as worker doctor), git, and whether a background service can be installed. A missing agent CLI or git is reported before the first question, with the install command, and you can continue anyway or stop. It then reuses the tracker settings devintern init saved for this repository (~/.devintern/env/<repo>.env, copied into the workspace .env) or asks for them, writes a one-repo workspace, and validates the ready-tasks query. At the query step, press Enter to pick up open tickets labeled devintern (the same default query as non-interactive setup), or type your own; on GitHub and GitLab it asks before creating a missing devintern label. If your query names a label the repository does not have (label:redy instead of label:ready), it asks whether to fix the query, create the label, or continue. If the query cannot run because the token is rejected or cannot see the repository, choose b to go back to the tracker step and correct the token or GITHUB_REPO (the saved values are the Enter defaults; when other repositories or teams share the workspace .env, it says so and asks before replacing a value), or k to keep the query and fix the workspace .env later. A repository devintern init registered as manual-only becomes a worker repository. A new workspace gets the recommended worker settings without a question: no CI repair, automatic conflict resolution, task pickup at any hour, and no Sentry project. A workspace with its own settings keeps them. Change them in workspace.toml, or run devintern worker init --customize to choose task pickup hours, conflict handling, CI repair, and a Sentry project one by one. Then one step, "Sign in with GitHub to start your 14-day Worker Pilot (also connects instant events)", asks at most one question: it signs you in for the 14-day free Worker Pilot (no card required), pairs your repositories with the relay, and, for a GitHub repository without the DevIntern AI App, opens the App install page and waits for the installation. You are not asked when you are already signed in or have a LICENSE_KEY. Press Enter during the browser sign-in or the App wait to skip it; devintern worker login github signs in and pairs later (devintern worker login <method> for Google, X or email), and devintern worker connect github --status finishes an App approval you gave after skipping. Ctrl+C stops setup and keeps your answers for the next run. Last, it offers to install the worker as a service. --no-relay leaves relay pairing out (polling only); --no-service skips the service step. Tokens you paste are not shown on screen. Re-running it keeps your answers as defaults (press Enter to keep the current query), and it finishes a setup an earlier run stopped partway. It ends with the same checks as worker doctor and tells you whether the worker is ready, whether signing in is the one step left, or what is still missing (for example an agent CLI). Like the non-interactive mode it exits 0 when ready, 2 when only signing in is left, and 1 when a check fails. The repository prompt defaults to your origin remote. When the checkout is on the remote's default branch, the wizard records that branch as the repository's default_branch, or keeps an earlier saved answer that still exists on origin. When it is on another branch that exists on origin, it asks whether task worktrees and their pull requests should use the checkout's branch or the remote default, offering the saved answer on a re-run. A checkout branch that is not on origin is never offered or saved; a saved branch that is no longer on origin is replaced, and without a recorded origin/HEAD the key stays unset so the worker follows the remote default. Worker task runs receive this branch as --pr-target-branch unless [defaults].worker_task_args already names one. For Markdown tasks, a relative folder such as ./tasks is saved as an absolute path, resolved from where you run the wizard. Without a terminal (coding agents, scripts, SSH), use non-interactive setup.
For GitHub, the central DevIntern AI App delivers events; the sign-in step installs it on the workspace repositories. Its private key stays with DevIntern. Events reach your worker as reference-only envelopes, and your local GITHUB_TOKEN does the API work. After adding repositories, run devintern worker connect to pair them. Without the relay, polling still works; @mention handling then needs a customer-owned GitHub App.
Coding agents, provisioning scripts, and SSH sessions without a terminal can set up the worker with flags instead of prompts:
export JIRA_BASE_URL=https://acme.atlassian.net JIRA_EMAIL=bot@acme.com JIRA_API_TOKEN=...
devintern worker init --non-interactive --tracker jira \
--task-query 'project = APP AND labels = devintern' --repo-from-cwd --jsonWithout a tracker account, point MARKDOWN_TASKS_DIR at an existing folder of Markdown task files: MARKDOWN_TASKS_DIR=/abs/path/tasks devintern worker init --non-interactive --tracker markdown --task-query '<filter>' --repo-from-cwd. A relative path is saved as an absolute path, resolved from the current directory.
It writes [defaults].tracker and task_query, registers the current repository, and saves the tracker credentials to the workspace .env. A new workspace gets the same recommended worker settings as the interactive wizard (no CI repair, automatic conflict resolution, task pickup at any hour, no Sentry); an existing workspace keeps its own. --customize is for the wizard only. It then checks the credentials and runs the same checks as worker doctor: a dry run of the query (0 matches is a warning), repository access, license, agent harness, and sandbox. The text output lists agent CLI and sandbox problems first; the --json document is unchanged. It never prompts or opens a browser. With --sign-in <method> it starts the Worker Pilot sign-in when one is needed (see Signing in without a terminal); the worker login --complete that finishes it also pairs the relay. With --start it installs and starts the background service when the checks pass, the same as worker service install; when only signing in is left, it records that, and the worker login that finishes the sign-in (within 30 minutes) installs and starts it. Running worker init again without --start, or worker service uninstall, cancels that request. Without --start the service stays a next step.
The shortest headless setup is two commands with a person opening one address in between:
devintern worker init --non-interactive --tracker jira --task-query '<query>' \
--repo-from-cwd --sign-in github --start --json # prints signIn.url
# a person opens signIn.url and signs in, then on the worker host:
devintern worker login --complete '<address>' --json # signs in, pairs the relay, starts the worker| Flag | Default | What it does |
|---|---|---|
--non-interactive |
off | Use flags instead of prompts |
--tracker <id> |
existing tracker | jira, linear, github, gitlab, azure-devops, asana, trello, or markdown. Required for a new workspace |
--task-query <q> |
existing query, else open tickets labeled devintern |
Ready-tasks query in the tracker's language. Without it, a new workspace picks up open tickets labeled devintern (see the table below). Required for asana and markdown, which have no default |
--repo-from-cwd |
off | Register the Git repository in the current directory, using its origin remote (any host), the same way worker add-repo does: its .devintern-code/.env is imported and a routing rule is seeded from its default project. The clone's recorded remote default branch (origin/HEAD) is saved as default_branch (the base for task worktrees and task PRs); if the checkout is on another branch, the output says how to target it |
--env-file <path> |
none | Read credentials from this file (must be mode 0600) and save them to the workspace .env. The file is left in place, and the output says it can be deleted |
--remove-env-file |
off | Delete the --env-file once its values are saved. Never deleted when the command fails |
--create-label |
off | Create the devintern label if the tracker lacks it (github, gitlab). Without it, a missing label is only a warning; setup never creates one on its own |
--yes |
off | Update an existing workspace.toml: only the tracker, query, and repository named by the flags change. Not needed to re-run with the same flags |
--sign-in <method> |
off | If nobody is signed in, start the sign-in without waiting: github, google, x, or your email address. The output carries the address to open |
--start |
off | Install and start the background service when the checks pass. When only signing in is left, the completing worker login does it. Cannot be combined with --no-service |
--no-relay |
off | Leave relay pairing out: no connect next step, and the completing worker login skips pairing |
--json |
off | Print one JSON document on stdout instead of text |
Default query. Without --task-query, the worker picks up open tickets with the devintern label (a tag in Azure DevOps). The --json output's taskQuery shows the query that was saved.
| Tracker | Default query |
|---|---|
github, gitlab |
is:open label:devintern |
jira |
labels = devintern AND statusCategory != Done ORDER BY created ASC |
linear |
{"labels":{"name":{"eqIgnoreCase":"devintern"}},"state":{"type":{"nin":["completed","canceled"]}}} |
azure-devops |
Work items in the project tagged devintern that are not Closed, Done, or Removed |
trello |
label:devintern is:open |
asana, markdown |
none: pass --task-query |
With the default query on GitHub or GitLab, setup checks for the label and warns if it is missing (label check); pass --create-label to create it. Jira and Azure DevOps create the label or tag the first time you add it to a ticket. In Linear and Trello, create the devintern label yourself.
On GitHub and GitLab, setup also checks every label: term in your --task-query after the dry run (-label: exclusions are ignored). A label the repository lacks, usually a typo, gives a query-labels warning and a fix-query next step. Setup still succeeds, because you can create the label later.
Credentials. Set the tracker's variables (for example JIRA_BASE_URL, JIRA_EMAIL, JIRA_API_TOKEN; see the tracker's integration page) and GITHUB_TOKEN in the environment, or put them in a file and pass --env-file (KEY=value lines; quotes and a leading export are allowed). Secrets are never accepted as flags. If the file is readable by others, the command refuses it; fix it with chmod 600 <file>. When something is missing, the error lists every missing flag and variable. If GITHUB_TOKEN is missing and the GitHub CLI is signed in, this command uses gh auth token automatically after validating it with the same repository-access probe as a pasted token; --json reports where a saved token came from as tokenSource (env for the process environment, env-file for --env-file, a registered repo's env_file, or an already-saved workspace .env token, or gh), and omits the field when no token was saved. A token the probe rejects is not saved: for the GitHub tracker setup fails with the fix-credentials next step, while for another tracker it is only the optional PR token, so setup warns and continues — unless the repository check needs it, such as a private HTTPS GitHub remote, which fails and restores the files. The saved token is a copy and does not refresh when gh re-authenticates; update it in the workspace .env or re-run with --env-file.
Output. The checks have the same verdicts as worker doctor:
result |
Exit code | Meaning |
|---|---|---|
success |
0 | Every check passed or warned. The worker can start |
unchanged |
0 | The workspace already had exactly this setup and every check passed; nothing was written |
action_required |
2 | The configuration is saved and nothing is broken; nobody is signed in yet. Sign in to start the Worker Pilot, then run worker doctor |
failure |
1 | A check failed, or the input was invalid. error or the failed check says why, and code names it. persisted says whether the configuration was kept |
A signed-in account without an entitlement (for example a Pilot already used), or a LICENSE_KEY that does not validate, is a failure. With --json, stdout holds only this document. version changes only when the shape breaks; new result and status values can be added, so treat any value you do not know as not ready:
{
"schema": "devintern.worker-init",
"version": 1,
"result": "action_required",
"workspaceDir": "/home/me/.devintern",
"tracker": "jira",
"taskQuery": "project = APP AND labels = devintern",
"repo": { "name": "app", "remote": "git@github.com:acme/app.git", "added": true },
"filesWritten": ["/home/me/.devintern/.env", "/home/me/.devintern/workspace.toml"],
"checks": [{ "name": "tracker-auth", "label": "Tracker credential probe", "status": "pass", "message": "JIRA accepted JIRA_BASE_URL, JIRA_EMAIL, JIRA_API_TOKEN" }],
"changed": true,
"persisted": true,
"warnings": ["/home/me/devintern.env still holds the credentials; they are saved in /home/me/.devintern/.env now. ..."],
"nextSteps": [{ "id": "complete-sign-in", "message": "A person opens the sign-in url ...", "command": "devintern worker login --complete '<address>'", "url": "https://..." }],
"signIn": { "url": "https://...supabase.co/auth/v1/authorize?provider=github&...", "method": "github", "expiresAt": "2026-11-26T12:30:00.000Z", "complete": "devintern worker login --complete '<address>'" }
}Each check status is pass, warn, action, fail, or skipped, and checks that are not pass carry a hint. If the command stops before the checks (bad input, or another worker init is changing the same workspace), error explains why and checks is empty. When the tracker credentials, the query, or repository access fails, the files the command wrote are restored (persisted: false), so a rejected query or token never stays in the workspace: fix it and run the same command again. When only the host is missing something (the agent CLI, the sandbox, a license) or only signing in is left, the configuration is kept, so after the fix you only run worker doctor. signIn is present only when --sign-in started a sign-in. With --start, start.result is installed (service holds the worker service install --json document; check its result for running), after_sign_in (the completing worker login installs it), not_ready (a check failed; nothing was installed), or failed (a service check fails and code is service_start_failed).
Every nextSteps entry has id, message, and command, plus url when a person has to open a page. Each command runs as written without a terminal: sign-in and relay commands use --no-wait --json, and the background service comes before the foreground worker, which is named only in the message. The text output (without --json) of worker init, worker doctor, and worker service lists the same steps in the form you type in a terminal, without --no-wait or --json: for example devintern worker login, which asks how to sign in and opens your browser. Run the steps in order:
id |
What it is |
|---|---|
sign-in, complete-sign-in |
Start the Worker Pilot sign-in, or finish one --sign-in started (url is the page to open) |
install-agent |
Install the agent CLI: npm when it is on PATH, otherwise a standalone installer or bun install -g |
fix-credentials, fix-query, fix-repo-access, fix-… |
The fix for a failed check: a corrected re-run of this command, or the page to change token access |
update, retry |
Re-run with --yes to change an existing workspace, or re-run after the fixes above |
add-repo, service, connect |
Register a repository, install the background service (left out once --start installed it or deferred it to the sign-in), pair the relay (only when you are signed in already and not paired) |
try-first-task |
Optional, last: queue a small docs-only sample task with devintern worker add and watch its run. Listed once a repository is registered and no sign-in is pending; nothing is created for you |
code values when the command stops early: invalid_arguments, unsupported_tracker, env_file_unreadable, missing_input (with a missing list), invalid_query (for example Jira JQL given to the github tracker), not_a_repository, workspace_exists, workspace_invalid, workspace_busy, and write_failed. After a failed check it is the first failure: credentials_rejected, query_rejected, repo_access_denied, agent_missing, not_entitled, service_start_failed, or check_failed.
The Worker Pilot belongs to your DevIntern account, so the worker host needs a sign-in even when nobody sits at it. Start it with --no-wait, open the printed address in any browser, and finish on the worker host:
devintern worker login github --no-wait # or google, x, email you@company.com; add --json for a document
devintern worker login --complete 'http://127.0.0.1:17865/auth/callback?code=...'After you sign in, the browser lands on a 127.0.0.1 page that does not load. That is expected: copy its full address into --complete. The address works once, only on the host that started the sign-in, and the pending sign-in expires after 30 minutes. worker init --non-interactive --sign-in <method> runs the first step for you. Running the first step again while a sign-in for the same method is waiting (with more than 5 minutes left) prints the same address again ("reused": true), so an address you already shared keeps working. With --json, worker login prints {"result": "pending", "url", "method", "expiresAt", "complete"}, {"result": "signed_in", "user"}, or {"result": "failure", "error"}.
Once signed in, worker login pairs the workspace with the relay, the same as devintern worker connect --no-wait: it never waits for the GitHub App approval. A --no-wait login while a session already exists pairs with that session too. When a worker init --non-interactive --start was waiting for the sign-in, the completed login then installs and starts the background service, the same as worker service install. Pass --no-relay to skip pairing. The JSON document gains relay (the worker connect --json document, or {"result": "skipped", "code": "no_relay" | "no_relay_sources"}), service (the worker service install --json document, when the service was started), and nextSteps (for example the GitHub App address to approve, then devintern worker connect github --status --json). The sign-in result does not depend on them: a relay or service problem still exits 0 with result: "signed_in".
To start a configured workspace by hand:
devintern worker # uses ~/.devintern/workspace.toml
devintern webhook serve # advanced: repo-local GitHub webhook listenerAn idle healthy worker and an idle misconfigured one look the same. Run the doctor before starting, and after changing config, tokens, or trackers:
devintern worker doctor [--workspace <path>] [--offline] [--json] [--test-notifications]It checks that workspace.toml parses, that there is something to acquire, tracker credentials per team, a dry run of each task_query (with match counts), access to each repository, whether the GitHub credential can read CI status when auto_merge or ci_failure_fix is on (see token permissions), the git commit identity (a warning when only the generic DevIntern identity is left; see Commit identity), your automation license, the agent harness and sandbox, the relay pairing (a warning when a pairing is pending or a repository is not covered), and whether the dashboard port is free. Every failing row includes a fix hint. It exits 0 when ready and 1 when a check fails. When the only thing left is signing in, the license row shows 👉 Not started: sign in to begin your 14-day free Worker Pilot, no card required and it exits 2. An active Pilot shows its end date. --offline skips network checks. --test-notifications sends one test message through each notification channel. --json prints one document (schema devintern.worker-doctor, version 1) with result (success, action_required, or failure, exit codes 0, 2, and 1 as above), code on a failure, checks in the same shape as worker init --json, and nextSteps in the same shape. setup says where setup stands, with a one-line summary: complete (every check passed and a worker is running; setup is done), ready (start the worker: the service step, or run-foreground (devintern worker) on a host with no background service such as a container; when the doctor cannot see the worker, for example from a sandbox, the Worker row warns and the check-worker step runs devintern worker status on the host instead), action_required, or not_ready. The text output ends with the same signal, for example Setup: complete — every check passed and the worker is running (pid 4242). With DEVINTERN_SKIP_LICENSE_CHECK=1 (non-release builds only), the license row says the check was skipped. The doctor never edits config or starts the worker. It is safe to run while the worker is up: it reports the running worker, and its dashboard on the port is not flagged as a conflict.
After the checks, a What this worker will do section shows what the worker acts on, read from workspace.toml and the environment without network calls or printing secrets. --json has the same data under plan.
| Line | Shows |
|---|---|
| Mode | Only with [workspace].mode = "automations_only": the mode, then each handler it turns off as off (automations-only mode); see Automations-only mode |
| Tracker | Each tracker query it polls, per team |
| Also | Automations (and how many have open_pr = true), Sentry monitors, ad-hoc tasks, and the flags tasks run with (worker_task_args) |
| Repo | Whether it opens PRs (--create-pr in worker_task_args, or an automation with open_pr = true) and handles review feedback, @mentions, CI fixes (ci_failure_fix), conflicts (conflict_resolution), and auto-merge (auto_merge), with the reason when off. On GitHub all of these need GITHUB_TOKEN (a custom GitHub App also works without the relay); GitLab needs a code-host token and has no @mentions or auto-merge |
| Agent | The AGENT_HARNESS chain and the account each agent uses when it can tell: Codex ChatGPT login or API key (~/.codex/auth.json, OPENAI_API_KEY, CODEX_API_KEY); Claude Code subscription login or ANTHROPIC_API_KEY. Otherwise unknown |
| Limits | max_concurrency, max_concurrency_per_repo, the service memory budget and per-job cap (Linux), AGENT_HARNESS_TIMEOUT_MINUTES, DEVINTERN_AGENT_START_MAX_ATTEMPTS, quiet hours ([worker.schedule]), daily caps (max_runs_per_day, max_agent_minutes_per_day), and that agent usage limits are detected and waited out |
Turning PR creation off does not turn off @mentions: with GITHUB_TOKEN set, the worker still answers @mentions from users with push access on any pull request. A worker without GitHub credentials shows no review, @mention, CI, conflict or auto-merge handling: no GITHUB_TOKEN for each GitHub repository.
With [defaults].task_query set, the worker polls your tracker every poll_interval seconds (default 60) and runs every task that matches. The query uses your tracker's normal query language, so "ready" means whatever the query says. A task is picked up once per change: it re-enters only after it is updated again. Polling state survives restarts.
Polling works with all trackers. Some need one extra setting:
| Tracker | Required for polling |
|---|---|
| Trello | TRELLO_DEFAULT_BOARD_ID |
| Asana | ASANA_DEFAULT_PROJECT_GID |
| GitLab Issues | GITLAB_TOKEN and GITLAB_PROJECT |
| Markdown files | MARKDOWN_TASKS_DIR and tracker = "markdown" |
A folder of markdown tasks is the quickest way to try the worker without a tracker account. With several boards or tracker accounts, use teams.
Each task runs through the normal pipeline with [defaults].worker_task_args (default --create-pr). After a PR is created the ticket is recorded as actioned and is not re-implemented until it changes; see Tickets already actioned after a PR.
The worker picks up polled tickets in dependency order. Trackers with their own "blocked by" links need nothing turned on; Trello and markdown tasks list their blockers on a Depends on: line in the description:
| Tracker | Blockers it reads | Blocker counts as done |
|---|---|---|
| Jira | "Blocks" issue links where the ticket "is blocked by" another issue | "Done" status category |
| Linear | "Blocked by" relations | Completed or canceled |
| GitHub Issues | Issue dependencies ("Blocked by"). If the repository or account does not have them, tickets run as before | Closed |
| GitLab Issues | "Is blocked by" linked items. These need GitLab Premium or Ultimate; on Free, tickets run as before | Closed |
| Azure DevOps | Predecessor links | A state in the Completed or Removed category |
| Asana | Task dependencies ("Blocked by"). If the workspace plan does not have them, tasks run as before | Marked complete |
| Trello | Depends on: line in the card description, listing card links or short links (Depends on: https://trello.com/c/Ab12Cd34) |
Archived, or in a list named Done, Complete(d), Closed, or Cancel(l)ed |
| Markdown files | Depends on: line in the task body, listing task keys (file names without .md, such as Depends on: api-schema, task-12) |
status: is done, complete(d), closed, or cancel(l)ed |
On Trello and markdown, separate keys with commas or spaces. Text after a dash or parenthesis is ignored, and words that are not shaped like a key are skipped: a Trello short link needs a digit (write a short link without one as a card URL), and a markdown key needs a hyphen or digit. A Trello key that matches no card keeps the ticket waiting with not found as the reason, and the worker logs a warning. On markdown, a word with no task file is ignored unless it looks like a ticket key (local-add-login, task-12), which waits as not found.
A blocked ticket is held back without being started, transitioned, or commented on. The worker checks it again on the next poll, then less often while it keeps waiting (up to every 15 minutes). Editing the ticket triggers a check right away:
- A blocker the worker implemented follows the same rules as dependent ad-hoc tasks. When
dependency_modeis not set, tickets in GitHub repos are stacked and tickets in other repos (GitLab, Bitbucket) wait for the merge. Inmergedmode the ticket waits until the blocker's PR merges. Instackedmode it starts on the blocker's branch once the blocker's run succeeded, and its PR targets that branch. - A blocker the worker never handled counts only once the tracker marks it done (see the table above).
- A blocker whose run failed, or whose PR was closed without merging, keeps the ticket blocked. Marking the blocker done in the tracker, or re-running it, releases the ticket.
GitHub and GitLab issue numbers and markdown keys belong to one team's repository, project, or tasks folder, so only that team's runs count as the worker having handled the blocker.
Set the mode with [defaults].dependency_mode, or per team with dependency_mode in a [[teams]] entry. A blocker can only be stacked on within the same repository; a blocker in another repo is waited on until its PR merges.
devintern worker queue and the dashboard's Queued list show each held-back ticket with its reason, for example waiting: PROJ-12 not done (In Progress) or waiting: PROJ-12 PR #7 not merged.
A dashboard retry follows the same rules. A stacked ticket is retried on its blocker's branch. Retrying a ticket that is still held back does not start it: the retry is marked failed with the reason, and the worker starts the ticket once its blockers are satisfied.
Set AGENT_HARNESS=codex,grok (priority first) in the workspace .env so the worker keeps going when one agent hits a usage limit. Failover covers every worker job except schedules that pin their own harness (details). When every harness is limited, task pickup pauses and due automations and estimations skip that occurrence. See Failover across multiple harnesses.
Unattended runs are where sandboxing matters most. Set AGENT_SANDBOX=auto in the workspace .env; see Sandboxing the Agent.
Limit new-task pickup to certain hours with [worker.schedule]:
[worker.schedule]
active = ["22:00-06:00"] # pickup allowed only inside these daily windows
blocked = [] # subtracted from active windows; wins on overlap
timezone = "" # IANA name; blank = machine local time
catch_up_missed = true # one catch-up drain if a whole window was missedWindows may cross midnight, and several windows combine. Only new-task pickup pauses. Reviews, mentions, automations, and relay events keep running, and a task already started finishes after its window closes. devintern worker run-now forces one drain right away. Timezone, DST, and status details are in Working windows.
The worker records notification rows in queue.db for work that needs attention — a task escalated, retries ran out, an automation broke, a source stopped being readable — and for changes outside itself: PRs it opened or auto-merged, and delegated work with its child progress. Emits for the same event fold into one row, and a later success resolves the row it belongs to.
Notifications are pruned after 30 days by default. A startup sweep and an hourly sweep delete resolved rows past the window, plus the informational rows that are never resolved (PRs opened or auto-merged and delegated-work rollups) once they age out, so a long-lived workspace's database stays bounded. Open rows that still need a human are kept until they are resolved. Set WORKER_NOTIFICATION_RETENTION_DAYS to change the window; 0 deletes aged-out rows at the next sweep.
The daemon takes few flags. Durable settings live in workspace.toml.
| Option | Description |
|---|---|
--workspace <path> |
Use this workspace.toml (default ~/.devintern/workspace.toml, or DEVINTERN_WORKSPACE_DIR) |
-v, --verbose |
Verbose logging |
--no-update |
Skip the self-update check for this run |
The worker serves the dashboard on http://localhost:4400. Set [workspace].dashboard = false to disable it or [workspace].dashboard_port to move it. devintern dashboard also works while the worker is stopped.
devintern worker service installs and runs the worker in the background: a systemd user unit in ~/.config/systemd/user/ on Linux, a launchd agent in ~/Library/LaunchAgents/ on macOS. It needs no terminal, so coding agents, provisioning scripts, and ssh host cmd can use it. The worker init wizard offers the same install at its last step.
devintern worker service install # check readiness, install, start, wait until the worker runs
devintern worker service status # service and worker state, and why the last start failed| Action | What it does |
|---|---|
install |
Runs the worker doctor checks, installs or updates the service, starts it, and waits until the worker is running |
start |
Starts the installed service and waits until the worker is running |
stop |
Stops the service. The worker finishes its graceful shutdown and exits cleanly |
restart |
Restarts the service, also after a failure, and waits until the worker is running |
status |
Shows the service state (running, starting, restarting, failed, stopped, not_installed) and the last start failure |
uninstall |
Stops the service and removes the DevIntern-managed definition |
logs |
Prints the service manager's log (-n <lines>, default 100). devintern worker logs shows the worker's own log |
| Option | Default | What it does |
|---|---|---|
--json |
off | Print one JSON document (schema devintern.worker-service, version 1) instead of text |
--force |
off | install only: install even when readiness checks fail |
--wait <seconds> |
45 | How long install, start, and restart wait for the worker. 0 skips the wait |
install refuses when the worker could not start yet: it lists the failing checks (with the same name/label/status/message/hint shape as worker init --json, and a runnable command per next step), or says signing in is the one step left. After you fix them, run it again. Running install again while the same service definition is installed and the worker is running changes nothing and does not restart the worker ("unchanged": true); use restart for that. status of a service that is not installed offers the install command as a next step. Failures carry a code. Once the service is started, the command waits for the worker itself and reports one of three outcomes: running (with the dashboard address), failed (with the worker's last log lines and the fix), or still starting after --wait. Exit codes: 0 done, 1 failed, 2 install refused because only signing in is left, 3 still starting.
After rebuilding or upgrading DevIntern, pick up the new binary without killing running agent work:
devintern worker restart --when-idle [--timeout <seconds>] [--json]The running worker holds new work (queued work waits), lets running jobs finish, then restarts on the binary currently on disk. Running jobs are never aborted, and queued work resumes after the restart. The default --timeout is 3600 seconds (maximum 86400); if jobs are still running then, the worker releases the hold and keeps running, and the command exits 1. The command also exits 1 when no worker is running (it never starts one), when the worker stops before it restarts, or when it does not acknowledge the request within 15 seconds. It exits 3 when the restart was requested but the replacement had not come back within 90 seconds. Under systemd/launchd the service manager brings the worker back; a foreground devintern worker spawns its own replacement. Use devintern worker service restart for an immediate restart that does not wait for jobs.
Every action is safe to repeat. install updates a DevIntern-managed service in place and never overwrites a hand-written one. Both definitions record your current PATH (and DEVINTERN_WORKSPACE_DIR, for a workspace outside ~/.devintern). If a step fails, nothing is left half-installed. Where there is no systemd user session (most containers, WSL without systemd), there is no service: install exits 1 with result unavailable and code service_unavailable (the same result as status), and worker doctor and worker init offer a run-foreground next step (devintern worker) instead of service. Run it in the foreground, for example inside tmux.
On Linux, install enables lingering for your user so the worker starts at boot and keeps running after you log out. Where that needs root, it prints the command to run (sudo loginctl enable-linger <user>).
A worker that cannot start because of its setup (no license, nobody signed in, invalid workspace.toml) is not restarted every 30 seconds: the service stops with status failed and the reason is in the worker log and in worker service status. Fix the problem, then run devintern worker service restart. Other crashes are restarted after 30 seconds. See The service keeps failing.
A hand-written Linux unit looks like this. One service runs the whole workspace:
[Unit]
Description=DevIntern fleet worker
After=network-online.target
[Service]
ExecStart=/usr/local/bin/devintern worker
Restart=on-failure
KillMode=mixed
TimeoutStopSec=120
WorkingDirectory=/home/you/.devintern
[Install]
WantedBy=multi-user.targetKillMode=mixed lets the worker stop its own running tasks, so a stop or restart doesn't end them as failures. A service installed by an earlier version doesn't have it: run devintern worker service install again to update it.
On Linux the generated unit gives the worker a memory budget, so a heavy run cannot push the whole machine into swap and make systemd-oomd kill your browser or editor. The budget covers the worker and everything its runs start in the worker's own cgroup: agent processes, test runners, builds, and browsers. Runs with AGENT_SANDBOX=docker are not covered, because the agent runs in a guest microVM that outlives the sbx client and sits outside the worker's cgroup; the admission check below still pauses new work when the host runs low, but one heavy sandboxed run can exceed MemoryMax. MemoryHigh throttles at 50% of host RAM, MemoryMax is a hard cap at 65%, and MemorySwapMax caps swap at 15%. The limits are bytes resolved from host RAM when the unit is written, so the defaults suit a laptop as well as a 64 GB workstation.
The unit also stops a crash loop: after six starts in 30 minutes the service ends in failed instead of restarting every 30 seconds and recreating the same load.
Change the percentages in workspace.toml, then reinstall the service so the unit is rewritten and restarted:
[workspace.execution]
memory_high_percent = 50
memory_max_percent = 65
memory_swap_max_percent = 15 # 0 gives the worker no swapdevintern worker service installEach job (a task run, review fix, conflict resolution, CI fix, auto-merge, or scheduled automation) also gets its own memory cap inside that budget. A runaway job is stopped at its own cap, so the worker and the other jobs keep running, and the run records agent exceeded the job memory limit (<size>). By default each job may use half of memory_max_percent (32% of RAM with the defaults), always below memory_high_percent. Keep an explicit value below memory_high_percent too: a job that reaches the throttle instead of its own cap slows every job down instead of being stopped. Turn it off with 0; restart the worker after changing it:
[workspace.execution]
job_memory_max_percent = 40 # keep below memory_high_percentThe per-job cap needs the installed systemd service (it uses the unit's delegated cgroup); a worker started by hand, macOS, and Docker-sandboxed agents run jobs without it. The worker logs the effective cap at startup.
A service installed by an earlier version has neither the budget, the per-job cap, nor the crash-loop guard; the same command updates it. See The worker uses too much memory for what happens when the cap is reached.
While running, the worker also pauses new jobs when the host runs low on memory (below 5% of RAM, high kernel memory pressure, or the worker's own cgroup nearing MemoryHigh). The worker log shows pausing new jobs: <reason> when this starts and another line when it ends. A PR job waiting for a slot shows "Waiting for the host to have enough free memory" in the dashboard; expand the row to see which limit fired and its numbers. Queued jobs start when memory recovers; running jobs are never interrupted. DEVINTERN_MEMORY_ADMISSION=0 disables the pause. macOS launchd agents have no equivalent cgroup budget.
New jobs also wait when a daily cap (max_runs_per_day, max_agent_minutes_per_day) is reached: the worker log shows pausing new jobs: daily cap reached: …, devintern worker status shows today's usage on its Daily cap: line, and the jobs start after local midnight or once you raise the cap.
On Windows, run devintern worker in a terminal. For PATH pinning, git push credentials, and the commit identity on an unattended host, see Keeping unattended runs healthy.
When devintern is installed globally (npm or bun -g), the worker checks for a new version at most once a day. When it finds one and is idle, it installs the update and restarts. Running jobs are never interrupted, and a failed update leaves the current version running.
Source checkouts, bun link, and local installs are never updated. To opt out, set DEVINTERN_NO_UPDATE=1, pass --no-update, or add this to workspace.toml (applies without a restart):
[worker]
auto_update = falseA hand-written launchd agent must set DEVINTERN_SERVICE=1 in its EnvironmentVariables so the worker exits and lets launchd restart it after an update. The generated definitions already do this.
The Worker Pilot gives a signed-in user 14 days of unattended use with no task-count limit and no card required. The 14 days start when the worker first starts with a valid workspace, not when you sign in. Run devintern worker login github (or google, x, email you@company.com), then devintern worker. On a host without a terminal, see Signing in without a terminal. worker doctor shows the Pilot's end date.
When nobody is signed in, the worker refuses to start with Sign in to start your free 14-day Worker Pilot: devintern worker login. worker doctor and worker service status show the same text. Run that command: it asks how to sign in and opens your browser.
After the pilot, the worker needs an automation license (Solo, Team, or Business). Supporter licenses bought before December 17, 2026 keep working as Solo licenses. Set it as LICENSE_KEY in the workspace .env; a license key does not need a login. If access expires while running, in-flight work finishes and new pickup pauses until a license is added. Interactive CLI use stays free.