Skip to content

feat(hooks): wire task-reminder hook into session tier and event chain#4502

Open
Hungdoan565 wants to merge 2 commits into
code-yeongyu:devfrom
Hungdoan565:feat/wire-task-reminder-hook
Open

feat(hooks): wire task-reminder hook into session tier and event chain#4502
Hungdoan565 wants to merge 2 commits into
code-yeongyu:devfrom
Hungdoan565:feat/wire-task-reminder-hook

Conversation

@Hungdoan565

@Hungdoan565 Hungdoan565 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

The ask-reminder hook was fully implemented (with tests) but never registered in the hook composition system. This PR wires it in.

Changes

  • src/config/schema/hooks.ts: Added ask-reminder to HookNameSchema enum (enables disabled_hooks support)
  • src/hooks/index.ts: Exported createTaskReminderHook from the hooks barrel
  • src/plugin/hooks/create-session-hooks.ts: Registered hook in Session tier with isHookEnabled gate + safeHook wrapper
  • src/plugin/tool-execute-after.ts: Wired ool.execute.after handler into the post-tool hook chain
  • src/plugin/event.ts: Wired event handler for session.deleted cleanup

What the hook does

After 10 consecutive non-task tool calls in a session, appends a gentle reminder to use task tools for progress tracking. Resets counter when any task tool is used or after the reminder fires. Cleans up session state on session.deleted.

Testing

  • bun run typecheck - clean
  • bun test src/hooks/task-reminder/ - 6 pass, 0 fail
  • Existing tests unaffected

Summary by cubic

Wires the task-reminder hook into the session hooks and event chain. Users get a gentle reminder after 10 consecutive non-task tool calls, with state cleanup on session deletion.

  • New Features

    • Added task-reminder to HookNameSchema for disabled_hooks.
    • Registered in session tier with isHookEnabled + safeHook; exported from hooks barrel.
    • Wired tool.execute.after and session.deleted for reminders and cleanup.
  • Dependencies

    • Synced bun.lock to oh-my-opencode-* 4.5.1 platform binaries.

Written for commit d4d2013. Summary will update on new commits. Review in cubic

@Hungdoan565

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

The task-reminder hook was fully implemented with tests but never
registered in the hook composition system. This commit:
- Adds 'task-reminder' to HookNameSchema for disabled_hooks support
- Exports createTaskReminderHook from hooks barrel
- Registers in create-session-hooks.ts with isHookEnabled gate
- Wires tool.execute.after handler in tool-execute-after.ts
- Wires event handler in event.ts for session.deleted cleanup
@Hungdoan565 Hungdoan565 force-pushed the feat/wire-task-reminder-hook branch from a2df436 to 5a46849 Compare May 26, 2026 11:18
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