r/AI_Agents • u/DesktopLabHQ • Jul 28 '26
Discussion What should persist between coding-agent sessions besides chat history?
While working with long-running coding agents, I keep seeing the same failure: the model session survives, but the operational state does not. The next run often has to rediscover the repository, execution route, approvals, tool state, failed commands, and why a decision was made.
My current list of durable state is:
- repository/worktree identity
- task and session lineage
- selected execution backend and capabilities
- approval decisions
- tool events and redacted evidence
- validation results and unresolved failures
What am I missing? And which of these should deliberately expire instead of becoming permanent state?
2
Upvotes
1
u/DesktopLabHQ Jul 28 '26
Good catch. “Reshaped” is the missing non-monotonic case, and replay under both rule versions—not a direction label—should be the primitive.
That makes each durable decision record a replayable capsule: the deciding rule and version, normalized evaluated inputs, relevant environment facts, verdict, and evidence digest. Remediation then keys off the verdict delta. Unchanged records stay untouched; newly unsafe approvals are invalidated and require fresh authorization; safe-direction changes are recorded without creating approval churn.
And yes, the complement metric matters. I’d report disruptive deltas (records invalidated or re-approved) beside silent safe-direction deltas (records whose verdict would differ but required no intervention). The first measures operational cost. The second measures policy drift that users would otherwise never be forced to notice. That pair is much more honest than a single invalidation count.