---
library: "bootstrap"
slug: "WorkerMode"
name: "WorkerMode"
ref: "WorkerMode#ba47"
hash: "sema:WorkerMode#mh:SHA-256:ba4708992ae8c4469b3c98e025829fafa8caf6430f1da66ed74b50a8e9255990"
type: "Protocols"
layer: "Society"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/WorkerMode"
---

# WorkerMode

Claim tasks and become the assigned persona

Society · Protocols

## Mechanism

Execution [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) Machine. Upon invoking `solver_claim_task`, the [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) performs an atomic [Identity](https://semahash.org/vocabularies/bootstrap/patterns/Identity.md) change via [ContextSwitch](https://semahash.org/vocabularies/bootstrap/patterns/ContextSwitch.md) using the [SolverManifest](https://semahash.org/vocabularies/bootstrap/patterns/SolverManifest.md). The [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) remains in this [Mode](https://semahash.org/vocabularies/bootstrap/patterns/Mode.md) until the [Task](https://semahash.org/vocabularies/bootstrap/patterns/Task.md) is complete (emitting a [Solution](https://semahash.org/vocabularies/bootstrap/patterns/Solution.md) or error to the [SolverNode](https://semahash.org/vocabularies/bootstrap/patterns/SolverNode.md)), ensuring adherence to the assigned persona. A [Lock](https://semahash.org/vocabularies/bootstrap/patterns/Lock.md) prevents concurrent task claims.

## Invariants

- [Identity](https://semahash.org/vocabularies/bootstrap/patterns/Identity.md) [Lock](https://semahash.org/vocabularies/bootstrap/patterns/Lock.md): During WorkerMode, system_prompt MUST == [SolverManifest](https://semahash.org/vocabularies/bootstrap/patterns/SolverManifest.md).persona.
- Isolation: Memory [Context](https://semahash.org/vocabularies/bootstrap/patterns/Context.md) must be flushed/reset before entering WorkerMode.
- Lifecycle Bound: [Mode](https://semahash.org/vocabularies/bootstrap/patterns/Mode.md) cannot be exited without emitting a [Solution](https://semahash.org/vocabularies/bootstrap/patterns/Solution.md) or Error.

## Preconditions

- [SolverManifest](https://semahash.org/vocabularies/bootstrap/patterns/SolverManifest.md) defined
- [Task](https://semahash.org/vocabularies/bootstrap/patterns/Task.md) available in queue

## Postconditions

- [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) returns to Idle [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md)
- [Task](https://semahash.org/vocabularies/bootstrap/patterns/Task.md) marked Complete/Failed

## Failure modes

- Persona Drift: [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) slowly reverts to default behaviors during long tasks ([Context](https://semahash.org/vocabularies/bootstrap/patterns/Context.md) Window exhaustion).
- Zombie Worker: [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) claims [Task](https://semahash.org/vocabularies/bootstrap/patterns/Task.md), enters WorkerMode, but crashes/hangs before reporting completion.
- [Context](https://semahash.org/vocabularies/bootstrap/patterns/Context.md) Leak: Information from previous tasks bleeds into the current WorkerMode session.

## Caution

Replaces the agent's whole governing prompt with the claimed manifest's persona and blocks exit until done — claim tasks only from trusted manifests.

## Where this came from

—

## Builds on

- [Identity](https://semahash.org/vocabularies/bootstrap/patterns/Identity.md) (references)
- [ContextSwitch](https://semahash.org/vocabularies/bootstrap/patterns/ContextSwitch.md) (references)
- [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) (references)
- [Task](https://semahash.org/vocabularies/bootstrap/patterns/Task.md) (references)
- [Mode](https://semahash.org/vocabularies/bootstrap/patterns/Mode.md) (references)
- [State](https://semahash.org/vocabularies/bootstrap/patterns/State.md) (references)
- [SolverNode](https://semahash.org/vocabularies/bootstrap/patterns/SolverNode.md) (references)
- [Context](https://semahash.org/vocabularies/bootstrap/patterns/Context.md) (references)
- [Lock](https://semahash.org/vocabularies/bootstrap/patterns/Lock.md) (references)
- [Solution](https://semahash.org/vocabularies/bootstrap/patterns/Solution.md) (references)
- [SolverManifest](https://semahash.org/vocabularies/bootstrap/patterns/SolverManifest.md) (accepts)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: WorkerMode#ba47
- Hash: sema:WorkerMode#mh:SHA-256:ba4708992ae8c4469b3c98e025829fafa8caf6430f1da66ed74b50a8e9255990

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/WorkerMode
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/WorkerMode.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
