workthin
workthin
PricingBlogChangelogOverviewQuick StartConcepts

SetupTools Reference
HooksClaude Code HooksCursor HooksVS Code HooksGitHub Copilot HooksOpenAI Codex CLI HooksGemini CLI Hooks
Skills & Commands

Docs for LLMs

llms.txtllms-full.txt
MCP ServerHooks

Auto

wt hooks codex-cli

Or enable during wt init when prompted.

What gets written

wt hooks writes ~/.codex/hooks.json (user-level, applies to all projects) with the following hooks:

EventAction
SessionStartPre-loads project knowledge into context
UserPromptSubmitSearches workthin with your prompt
StopReminds the AI to call create-knowledge

Note: Codex CLI does not support a SessionEnd event. Use Stop to capture knowledge at the end of each agent turn.

Manual

Create ~/.codex/hooks.json:

{
  "hooks": {
    "SessionStart": {
      "command": "wt search \"project recent solutions\" --hook 2>/dev/null || true"
    },
    "UserPromptSubmit": {
      "command": "wt search \"$CODEX_USER_PROMPT\" --hook 2>/dev/null || true"
    },
    "Stop": {
      "command": "printf '{\"systemMessage\": \"Session complete. If you solved a problem, call create-knowledge.\"}'"
    }
  }
}

See the Codex CLI hooks documentation for more details.

GitHub Copilot Hooks

Automatic workthin hooks for GitHub Copilot CLI — search on sessionStart and userPromptSubmitted, capture on mainAgentStop and sessionEnd.

Gemini CLI Hooks

Automatic workthin hooks for Gemini CLI — search on SessionStart and BeforeAgent, capture on AfterAgent and SessionEnd.

On this page

AutoWhat gets writtenManual