Skip to main content
Version: MVP

Single-agent fixture loop

3 min readFor contributorsUpdated 2026-05-19

What you'll do

Smoke-test the loop boundary with fixture execution — no live runner credentials, no external side effects. Useful for development, regression tests, and verifying durable-state contracts.

Same loop, deterministic runner.

The fixture executor exercises the real loop boundary. Only the runner-step results are deterministic; everything else (receipts, run outputs, handoffs) follows the production contract.

Workflow

  1. Create or load a task, case file, policy envelope, and runner metadata.
  2. Use FixtureStepRunner with deterministic statuses.
  3. Pass explicit grants for side-effect fixture steps.
  4. Execute SingleAgentLoopExecutor.
  5. Inspect the resulting task run, receipts, run outputs, and proposals.

Minimal shape

from craik.runtime.loop import FixtureStepRunner, SingleAgentLoopExecutor
from craik.runtime.memory import LocalMemoryStore

executor = SingleAgentLoopExecutor(
store=store,
memory=LocalMemoryStore(store),
runner=FixtureStepRunner(),
)

result = executor.execute(
task_id=task.id,
case_file_id=case_file.id,
policy=policy,
runner_metadata=runner_metadata,
intent_lock=intent_lock,
grants=[shell_grant],
)

Expected state

A successful fixture run leaves:

One craik.task_run

One or more craik.runner_step_result observations

Persisted craik.run_output records

Pass or denial receipts

For side-effect steps.

Optional reviewable memory proposals

A handoff

Once the handoff workflow runs.

Failure smoke tests

Stop with durable state.

Use fixture statuses to exercise blocked, failed, partial, and max-iteration paths. These runs must stop with durable state and must not rely on a live chat transcript to explain what happened.

What's next