Fix DM context loss on resume, add world tick and toolkit improvements
Turns out the DM was losing its entire system prompt after turn 1 — on
--resume without --system-prompt, claude -p falls back to the default
Claude Code system prompt (a software engineering agent!). The DM was
coasting on conversation history alone, which explains the timekeeping
drift. Now we always send --system-prompt and --model on resume, so the
DM gets fresh context (current time, character state, entities) every
turn. Tested empirically with a codeword swap to confirm.
Beyond the context fix, a bunch of changes to make the world feel more
alive and reduce the DM's bookkeeping burden:
- set_scene now returns the current time with atmosphere hints ("Day 1,
17:30 (Afternoon, fading light)") so the DM knows what time it is
- Present entities get auto-marked when set_scene is called, so the DM
doesn't need separate mark calls for NPCs in the scene
- recall falls back to fuzzy word-overlap matching when exact search
misses — "that merchant" can now find "Henrik the Merchant"
- Log context window doubled from 5 to 10 entries
- World tick system that evaluates Will triggers between sessions and
during gameplay, running in a background thread so it doesn't block
the player (the synchronous version took 128s, oops)
- Per-file locking on establish/mark for thread safety with background
ticks
- Richer seeded worlds (12-16 entities with nearby locations, regional
lore, notable items, and thread deadlines)
- /status command shows HP bar, AC, gold without burning a DM turn
- Roll notifications now show the reason: [Rolling Investigation...]
instead of [Rolling...]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>