Skip to content

feat(agent): store durable agents in agents.db - #174

Merged
codeaholicguy merged 14 commits into
mainfrom
feature-durable-agents-sqlite
Aug 19, 2026
Merged

feat(agent): store durable agents in agents.db#174
codeaholicguy merged 14 commits into
mainfrom
feature-durable-agents-sqlite

Conversation

@codeaholicguy

@codeaholicguy codeaholicguy commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Motivation

Store the new durable-agent capability directly in the existing SQLite database with durable session behavior and consistent Durable* domain vocabulary. JSON persistence was never released to users, so this PR intentionally contains no legacy import or compatibility path.

Design

  • adds a separate flattened durable_agents table with case-insensitive durable names, provider/session identity, lifecycle and health state, latest-result columns, and atomic active-run ownership columns
  • keeps durable rows isolated from the short-lived agents registry and its process pruner
  • uses BEGIN IMMEDIATE transactions and token/start-time compare-and-swap updates for acquisition, provider recording, completion, and reconciliation
  • makes readonly DatabaseConnection construction genuinely write-free and readonly listing pure
  • exposes dbPath for isolated/direct repository construction; all tests use explicit SQLite paths
  • standardizes the persistence API on DurableAgentRepository, matching the existing TaskRepository convention for durable SQLite domains

Scope

There is no print-agents.json import, marker row, backup rename, dual-write, rollback workflow, or filePath compatibility option. The unreleased JSON implementation and its tests were removed by product-owner direction.

The CLI mechanism flag remains --mode print, and Claude-specific provider names such as ClaudePrintRunner, ClaudePrintAgentService, and ClaudeCliProbe remain unchanged.

Validation

  • focused repository/service suites: 16 tests passed; focused CLI suite: 74 tests passed
  • agent-manager suite: 548 tests passed
  • full pre-commit hook: lint plus 1,019 workspace tests passed
  • full workspace typecheck and build passed
  • feature documentation lint passed
  • strict packages/docs sweep found no legacy DurableAgentStore names or durable-domain Store error/API references

Risks

None known beyond normal SQLite schema rollout for a new, unreleased feature.

@codeaholicguy
codeaholicguy merged commit 4ee608c into main Aug 19, 2026
7 checks passed
@codeaholicguy
codeaholicguy deleted the feature-durable-agents-sqlite branch August 19, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant