Skip to content

Diagnose fired hooks with missing session binding#242

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/diagnose-pretooluse-session-binding-2026-04-29-02-34
Apr 29, 2026
Merged

Diagnose fired hooks with missing session binding#242
NagyVikt merged 1 commit intomainfrom
agent/codex/diagnose-pretooluse-session-binding-2026-04-29-02-34

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

SESSION_NOT_FOUND from the pre-edit hook used to skip telemetry, which made health indistinguishable from a missing PreToolUse hook. Record those failures under a dedicated diagnostics session and expose the count in health so reinstall follow-ups can separate hook wiring from session binding.

Constraint: COLONY_UNAVAILABLE must still avoid storage writes because persistence may be broken.

Rejected: Write the telemetry under the missing session id | that would create a phantom user session and hide the binding fault.

Confidence: high

Scope-risk: narrow

Directive: Keep SESSION_NOT_FOUND telemetry distinct from the real editor session until SessionStart binding is restored.

Tested: pnpm --filter @colony/hooks test -- auto-claim.test.ts; pnpm --filter @colony/storage test -- coordination-activity.test.ts; pnpm --filter @imdeadpool/colony-cli test -- health.test.ts; pnpm --filter @colony/storage typecheck; pnpm --filter @imdeadpool/colony-cli typecheck; pnpm exec biome check apps/cli/src/commands/health.ts apps/cli/test/health.test.ts packages/hooks/src/handlers/pre-tool-use.ts packages/hooks/test/auto-claim.test.ts packages/storage/src/storage.ts packages/storage/test/coordination-activity.test.ts; git diff --check

Not-tested: pnpm --filter @colony/hooks typecheck still fails on existing test/attention-budget.test.ts InboxMessage fixture drift outside this patch.
@NagyVikt NagyVikt merged commit b350b0f into main Apr 29, 2026
@NagyVikt NagyVikt deleted the agent/codex/diagnose-pretooluse-session-binding-2026-04-29-02-34 branch April 29, 2026 00:42
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