CLI
fh temporal-worker
Run a local Temporal worker that executes Fabric Harness activities.
fabric-harness temporal-worker [--task-queue <name>] [--address <host:port>] [--env <file>]Starts a long-running Temporal worker that registers Fabric Harness workflows and activities (model calls, tool execution, sandbox commands, result validation, compaction, child tasks). Pair this with fh run --target temporal-worker to drive durable agent sessions.
Options
| Flag | Description |
|---|---|
--task-queue <name> | Defaults to FABRIC_TEMPORAL_TASK_QUEUE, then config.temporal.taskQueue, then fabric-harness. |
--address <host:port> | Defaults to FABRIC_TEMPORAL_ADDRESS, then config.temporal.address, then localhost:7233. |
--env <file> | Explicit env-file override. Repo/workspace .env and .env.local are auto-loaded; shell env wins. |
Additional behavior comes from .fabricharness/config.ts and env:
FABRIC_TEMPORAL_NAMESPACE/config.temporal.namespaceconfig.temporal.apiKey/config.temporal.apiKeyEnvconfig.temporal.tls
Example
# Terminal 1: a local Temporal dev server (e.g. via `temporal server start-dev`)
temporal server start-dev
# Terminal 2: Fabric worker; provider keys can live in repo-level .env.local
fh temporal-worker --task-queue fabric-harness
# Terminal 3: drive an agent
fh run ask --target temporal-worker --id ask-001 --prompt "What is Temporal?"What it does on startup
- Resolves workspace root and config.
- Creates a
FileSessionStorerooted at the workspace. - Creates an empty sandbox plus the built-in tool set.
- Resolves the model + provider from env/config (
applyEnvModelProvider). - Registers Fabric activities (
createLocalTemporalActivities). - Starts the Temporal worker on the resolved address + task queue.
- Listens for
SIGINT/SIGTERMand shuts the worker down cleanly.