Skip to main content

What a Forge worker does

Status: Ready

Article ID: 041

Truth label: Current

Audience: New builder

Reader outcome: Follow a worker from registration through polling, claim, execution, verification, and durable result delivery.

Related articles: 031, 033, 053

Target week: 17

Last verified: 2026-09-13

Technical reviewer: Codex source audit

Editorial reviewer: Codex editorial audit

Start as an outbound client​

A Forge worker does not listen on a public port. It loads configuration, discovers installed execution backends and their CLI versions, and registers its hostname, instance name, capabilities, engine versions, and supported path flavors with Central. A worker starts safely even if content settings are omitted, using built-in definitions and recording load errors rather than halting startup. A newly enrolled worker receives a credential once and stores it under its local data root.

Follow the work loop​

The worker drains saved results, polls for eligible work, claims one task, and receives a run id, fence, lease, and run token. It loads repository controls and bounded context, builds the prompt, then launches the selected engine in the task's literal project path.

While the engine runs, the worker renews its lease, checks cancellation, and ships supported progress logs. When execution concludes, the worker extracts the copy-ready ## PR description section into run metadata for display in Cortex. Losing the lease means the worker must stop treating the attempt as current.

Verify independently​

After the engine exits, the worker can run the task's verification command as a separate subprocess. This is independent of the agent's claim that tests passed. A failed verification changes the reported outcome to failure even when the agent returned a polished summary.

Deliver through the outbox​

Before its first result request, the worker writes the terminal payload to its local outbox. It removes that entry only after Central classifies the result as accepted, duplicate, superseded, or task gone. Network and authentication failures keep the payload for later handling.

Inspect one lifecycle​

For a synthetic task, capture the worker id, task id, run id, fence, lease renewals, verification output, and result disposition. Those identifiers show which service owned each decision without copying prompt or result content.

Current limits​

Workers execute repository code and external CLIs with the authority of their operating-system account. Permission modes and project paths are not complete containment. Raw artifacts and outbox records can remain only on the worker that created them.

Next lesson​

Continue with Install a Claude Code worker.

Derivative map​

  • Weekly package: WEEK-17
  • Long video: VIDEO-W17-LONG
  • Shorts: SHORT-W17-PROBLEM, SHORT-W17-MECHANISM, SHORT-W17-WARNING
  • Email: EMAIL-W17
  • LinkedIn: LI-W17-A, LI-W17-B
  • X: X-W17-A, X-W17-B
  • Visual: VISUAL-W17

Review record​

  • Registration, polling, claims, execution, verification, and result delivery checked against current source.
  • Operating-system authority and worker-local artifact limits reviewed.
  • Exercise uses synthetic identities and no result content.
  • Internal links and repository voice reviewed.

Review completed: 2026-09-03

Re-audited against the running product: 2026-09-13