Skip to content

Make missed pre-edit claims actionable#240

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/auto-claim-fallback-warning-2026-04-29-01-52
Apr 29, 2026
Merged

Make missed pre-edit claims actionable#240
NagyVikt merged 1 commit intomainfrom
agent/codex/auto-claim-fallback-warning-2026-04-29-01-52

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

Pre-edit auto-claim can fail when the session has no single active Colony task or the local store cannot be reached. The hook now returns a compact JSON warning that tells the agent to call task_claim_file, includes candidate task ids when ambiguity exists, and debounces repeated warning output for the same session/file/code while keeping advisory telemetry.

Constraint: Claim fallback must warn without blocking edits when repo policy does not already block unclaimed writes.

Rejected: Hard-fail the edit hook | would violate the advisory warning requirement and strand sessions with ambiguous context.

Confidence: high

Scope-risk: narrow

Directive: Keep fallback warnings compact; do not include full observation bodies or long task histories.

Tested: pnpm --filter @colony/hooks test -- auto-claim.test.ts; pnpm exec biome check packages/hooks/src/auto-claim.ts packages/hooks/src/handlers/pre-tool-use.ts packages/hooks/test/auto-claim.test.ts; git diff --check

Not-tested: pnpm --filter @colony/hooks typecheck is blocked by existing test/attention-budget.test.ts InboxMessage fixture drift.
@NagyVikt NagyVikt merged commit b43499c into main Apr 29, 2026
@NagyVikt NagyVikt deleted the agent/codex/auto-claim-fallback-warning-2026-04-29-01-52 branch April 29, 2026 00:09
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