Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated by gx branch finish (PR flow).