Files
rhema-claw/crates
vhaudiquet 5504c6a91b
android / release (push) Successful in 2m7s
ci / checks (push) Successful in 2m53s
ci / web (push) Successful in 14s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 10s
android / debug (push) Successful in 2m14s
ci / test (push) Successful in 1m12s
ci / chart (push) Successful in 6s
ci / docker (push) Successful in 2m0s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m10s
ci / publish-edge-chart (push) Successful in 4s
fix(claw): resume a session from the record's own core
A daemon killed mid-turn left the key unusable. The interactive and
forge handlers stashed the whole session in the record's
`driver_state` and restored it on the next dispatch. The commit hook
wrote the same record after every step, but with the engine's own
session in it: no nested stash, the history at the top. A run cut
between two steps therefore left a record whose `driver_state` held
only the agent's state, and the next dispatch parsed that as a stash
and failed with `missing field history`. Every message after it failed
the same way. On the live claw it was interactive:web, 354 messages in
the core and a bash call at the end with no result.

The record's core is the conversation now. Both handlers write
`agent.session()` into `ctx.session.core` instead of nesting a copy of
it in `driver_state`, so the hook and the handler agree, the core's
history stops lagging the conversation, and a run killed mid-turn
leaves a session the next dispatch resumes. `resume_session` still
reads a nested stash when one is there, so records written before this
change keep their conversations (a live forge thread carries 940
messages in its stash against 202 in its core), and a stash-shaped
`driver_state` that does not parse is still a loud failure. The
read-only history page reads the session the same way, so a legacy
forge thread renders its conversation instead of the stale core.

cargo test -p rhema-claw and clippy with -D warnings pass. A record
seeded in the commit hook's shape resumes with its old conversation,
and the live interactive:web session parses back through the new read.
2026-12-02 12:22:21 +01:00
..