Relationships
#5000 Docs: invoke-behaviors-from-behaviors should say runModel waits for its target's lock
Opened by skunk-ape · 11/22/2026· Shipped 11/22/2026
What changed
Since swamp-club#4992 (swamp PR #3916), a nested run started with context.runModel() takes its target behavior's per-behavior lock before the target's method runs, the same as a workflow step or a second swamp behavior run. It pushes the target's writes under that lock and releases it before the calling method continues.
Page to update
content/manual/how-to/extensions/invoke-behaviors-from-behaviors.md (swamp-club repo). It describes how to call another behavior through runModel but says nothing about locking.
Suggested content
A short section on concurrency:
- A
runModelcall waits for any other run on its target behavior, so the two never overlap and neither update is lost. - Calling
runModelon the caller's own behavior, or on a behavior a run further up the call chain holds, uses the lock already held and does not wait. - Two behaviors whose methods call each other through
runModelwhile both are running wait on each other's lock. The call fails at the lock timeout (SWAMP_LOCK_TIMEOUT_MS, default 60 seconds) andrunModelreturns{ ok: false }. Avoid such cycles, or call in one direction only. runModelis still unavailable on remote workers.
The concurrency reference in the swamp skill (behavior references, concurrency.md) already has this wording and can be used as a source.
Shipped
Click a lifecycle step above to view its details.
system commented 11/22/2026, 6:33:45 PM
Classified automatically when this issue was filed.
- Source: Swamp Club
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.