Skip to content

fix(ledger): preserve persistent agent claim identity - #84

Merged
cjber merged 3 commits into
mainfrom
cb/agent-claim-actor
Nov 16, 2026
Merged

cjber merged 3 commits into
mainfrom
cb/agent-claim-actor

Conversation

@cjber

@cjber cjber commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Keeper claims made by agent command wrappers recorded the wrapper's transient parent PID, so cleanup logs could not identify the persistent session that made a claim. Claims now prefer the canonical Codex session identity, retain the explicit KEEPER_ACTOR override, and fall back to the parent PID for ordinary shells.

A claim remains a stale-disposal declaration and is not a lease. Active writers must use keeper hold PATH --reason R; the existing hold guard prevents cleanup while that hold is live.

Closes #83

Validation

  • bun test src/keeper.test.ts - 93 pass
  • bunx biome ci src/ledger.ts src/keeper.test.ts
  • Full CI runs repository-wide checks; the existing site/index.html specificity warning is outside this change

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Deploying keeper with  Cloudflare Pages  Cloudflare Pages

Latest commit: ec2c3ca
Status: ✅  Deploy successful!
Preview URL: https://331ce8cc.keeper-9oy.pages.dev
Branch Preview URL: https://cb-agent-claim-actor.keeper-9oy.pages.dev

View logs

@cjber

cjber commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

Independent review of ec2c3ca found no actionable issues. The claim scanner disposes by path and does not use actor liveness, so the README explicitly documents claims as stale-disposal declarations and requires an active writer to use a hold. Focused validation: 93 keeper tests pass, targeted Biome CI passes, and the canonical Codex identity uses CODEX_THREAD_ID with CODEX_SESSION_ID compatibility fallback.

@cjber
cjber merged commit b621869 into main Nov 16, 2026
7 checks passed
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.

Agent scratch claim records transient command PID and active source is removed

1 participant