JuliusBrussee/caveman · error · AssemblyStabilityError
assembly slot {slot_id!r} changed after being declared stabl
Error message
assembly slot {slot_id!r} changed after being declared stable What it means
Error "assembly slot {slot_id!r} changed after being declared stable" thrown in JuliusBrussee/caveman.
Source
Thrown at packages/sdk/python/caveman_cloud/core.py:443
ids.add(slot.id)
if slot.stability not in {"stable", "session", "volatile"}:
raise ValueError(
f"assembly slot {slot.id!r} has unknown stability {slot.stability!r}"
)
try:
content_json = _canonical_json(slot.content)
content = json.loads(content_json)
except (TypeError, ValueError):
raise ValueError(
f"assembly slot {slot.id!r} content is not JSON-serializable"
) from None
if slot.stability != "volatile":
key = (options.session_id, slot.id)
content_hash = _sha256_hex(content_json)
with self._assembly_hash_lock:
previous = self._assembly_hash_ledger.get(key)
if previous is not None and previous != content_hash:
raise AssemblyStabilityError(slot.id)
self._assembly_hash_ledger[key] = content_hash
normalized.append(AssemblySlot(slot.id, slot.stability, content))
ordered = [
slot
for stability in ("stable", "session", "volatile")
for slot in normalized
if slot.stability == stability
]
prefix_slots = [slot for slot in ordered if slot.stability != "volatile"]
volatile_slots = [slot for slot in ordered if slot.stability == "volatile"]
breakpoints: list[str] = []
if provider == "anthropic":
tools_slot = next(
(slot for slot in prefix_slots if slot.id == "tools" and isinstance(slot.content, list)),
None,
)View on GitHub (pinned to 27d5a3981a)
Solutions
- Do not mutate a slot after declaring it stable; create a new slot version instead.
When it happens
Trigger: Thrown at packages/sdk/python/caveman_cloud/core.py:443 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/86d3bb1ce502d6df.
Report an issue: GitHub.