FabricFabricHarness
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

FlagDescription
--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.namespace
  • config.temporal.apiKey / config.temporal.apiKeyEnv
  • config.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

  1. Resolves workspace root and config.
  2. Creates a FileSessionStore rooted at the workspace.
  3. Creates an empty sandbox plus the built-in tool set.
  4. Resolves the model + provider from env/config (applyEnvModelProvider).
  5. Registers Fabric activities (createLocalTemporalActivities).
  6. Starts the Temporal worker on the resolved address + task queue.
  7. Listens for SIGINT/SIGTERM and shuts the worker down cleanly.

See also