Continue. JSON on stdout may set permissionDecision, updatedInput, additionalContext, continue, stopReason
2
Block. stderr is the reason
hum hooks # what would fire here; /hooks in a session
[hooks]enabled = trueforeign = true # run Claude Code and Codex hook files too; HUM_HOOKS=0 disables all for one run
⌘I
{"docsConfig":{"theme":"willow","$schema":"https://mintlify.com/docs.json","name":"Metaphi AI","description":"Metaphi AI documentation. Hum, the agent you work with; Kennet, the infrastructure for building and running RL environments; and Harwell, the hosted mainframe runtime.","colors":{"primary":"#0b0b0a","light":"#f1efe9","dark":"#0b0b0a"},"logo":{"light":"https://mintcdn.com/metaphi/xIYieuTDbKefPy06/logo/metaphi-light.svg?fit=max\u0026auto=format\u0026n=xIYieuTDbKefPy06\u0026q=85\u0026s=1b413012ccf945568f2f8a9ef0f99224","dark":"https://mintcdn.com/metaphi/xIYieuTDbKefPy06/logo/metaphi-dark.svg?fit=max\u0026auto=format\u0026n=xIYieuTDbKefPy06\u0026q=85\u0026s=656e6852db89bbaecef3d36bbe7339b3","href":"https://metaphi.ai"},"favicon":{"light":"https://mintcdn.com/metaphi/xIYieuTDbKefPy06/logo/metaphi-favicon-light.svg?fit=max\u0026auto=format\u0026n=xIYieuTDbKefPy06\u0026q=85\u0026s=58a47e9a28635249476106ad31077bd7","dark":"https://mintcdn.com/metaphi/xIYieuTDbKefPy06/logo/metaphi-favicon-dark.svg?fit=max\u0026auto=format\u0026n=xIYieuTDbKefPy06\u0026q=85\u0026s=18b7c8c72e7d9b2b0809039b0eb66da3"},"appearance":{"default":"system"},"navbar":{"primary":{"type":"button","label":"Install Hum","href":"https://docs.metaphi.ai/hum/quickstart#1-install"}},"footer":{"socials":{"github":"https://github.com/metaphi-labs","website":"https://metaphi.ai"}},"seo":{"indexing":"all"},"fonts":{"heading":{"family":"Newsreader","weight":500},"body":{"family":"Newsreader","weight":400}},"styling":{"eyebrows":"section","codeblocks":"dark","latex":true},"contextual":{"options":["copy","view","claude","chatgpt","cursor","mcp"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"metaphi","hasAudioNarration":false,"actualSubdomain":"metaphi","customDomains":["docs.metaphi.ai"],"gitSource":{"type":"github","owner":"metaphi-labs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6aea287e55833ced0b69d511","collectionId":"af3131e5-0265-44a8-9149-ada6f92676bf","liveDeploymentHistoryId":"6aea287e55833ced0b69d511","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"}},"buildId":"6aea287e55833ced0b69d511","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Hum","count":21},{"language":"default","tag":"Kennet","count":18},{"language":"default","tag":"Account","count":15},{"language":"default","tag":"Harwell","count":11},{"language":"default","tag":"Reference","count":9},{"language":"default","tag":"Build with Hum","count":9},{"language":"default","tag":"Twin API","count":8},{"language":"default","tag":"Use Hum","count":6},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"Taskforge","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"img.nav-logo{height:24px!important;width:auto!important}"}],"page":{"pagePath":"hum/hooks","slug":"/hum/hooks","pageMetadata":{"title":"Hooks","description":"A command Hum runs at a point in the loop. It can block. Claude Code and Codex hook files run unchanged.","href":"/hum/hooks"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"A command Hum runs at a point in the loop. It can block. Claude Code and Codex hook files run unchanged.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`events`,children:`Events`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Event`}),_jsx(_components.th,{children:`Can`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PreToolUse`})}),_jsx(_components.td,{children:`Deny the call or rewrite its input`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PostToolUse`})}),_jsx(_components.td,{children:`Add to what the model reads`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Stop`})}),_jsx(_components.td,{children:`Send the model back with a reason`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`UserPromptSubmit`})}),_jsx(_components.td,{children:`Act on your message`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SessionStart`})}),_jsx(_components.td,{children:`Set up`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Notification`})}),_jsx(_components.td,{children:`Reach you: desktop, Slack, mail`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`files`,children:`Files`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`~/.hum/hooks.json`}),`, `,_jsx(_components.code,{children:`\u003crepo>/.hum/hooks.json`}),`, `,_jsx(_components.code,{children:`.claude/settings.json`}),`, `,_jsx(_components.code,{children:`.codex/hooks.json`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"hooks\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"Stop\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"hooks\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"command\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"command\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"make test\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"timeout\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`300`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}]}],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"PreToolUse\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"matcher\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Bash\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"hooks\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"command\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"command\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"$HUM_PROJECT_DIR/.hum/no-rm.sh\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}]}]}}`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`contract`,children:`Contract`}),`\n`,_jsxs(_components.p,{children:[`stdin: one JSON object (`,_jsx(_components.code,{children:`hook_event_name`}),`, `,_jsx(_components.code,{children:`tool_name`}),`, `,_jsx(_components.code,{children:`tool_input`}),`, `,_jsx(_components.code,{children:`tool_response`}),`, `,_jsx(_components.code,{children:`prompt`}),`, `,_jsx(_components.code,{children:`last_message`}),`, `,_jsx(_components.code,{children:`cwd`}),`, `,_jsx(_components.code,{children:`session_id`}),`).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Exit`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`0`}),_jsxs(_components.td,{children:[`Continue. JSON on stdout may set `,_jsx(_components.code,{children:`permissionDecision`}),`, `,_jsx(_components.code,{children:`updatedInput`}),`, `,_jsx(_components.code,{children:`additionalContext`}),`, `,_jsx(_components.code,{children:`continue`}),`, `,_jsx(_components.code,{children:`stopReason`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{children:`Block. stderr is the reason`})]})]})]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`hum hooks # what would fire here; /hooks in a session`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`[hooks]`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`enabled`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`foreign`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # run Claude Code and Codex hook files too; HUM_HOOKS=0 disables all for one run`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Hooks","description":"A command Hum runs at a point in the loop. It can block. Claude Code and Codex hook files run unchanged.","href":"/hum/hooks"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Events","slug":"events","depth":2,"children":[]},{"title":"Files","slug":"files","depth":2,"children":[]},{"title":"Contract","slug":"contract","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"metaphi","siteName":"Metaphi AI","title":"Hooks - Metaphi AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-19T02:54:42.036Z","originalFileLocation":"hum/hooks.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"A command Hum runs at a point in the loop. It can block. Claude Code and Codex hook files run unchanged.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Metaphi AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Hooks - Metaphi AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"A command Hum runs at a point in the loop. It can block. Claude Code and Codex hook files run unchanged.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Metaphi AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.metaphi.ai/hum/hooks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://metaphi.mintlify.app/_mintlify/api/og/v2?division=Build+with+Hum\u0026amp;title=Hooks\u0026amp;description=A+command+Hum+runs+at+a+point+in+the+loop.+It+can+block.+Claude+Code+and+Codex+hook+files+run+unchanged.\u0026amp;theme=c55258f3c61135235ad577bf\u0026amp;signature=e5659ecd371a41571cf1531f3af7a0c229b3e88b3bfd41a92933d3a979294aca\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Hooks - Metaphi AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"A command Hum runs at a point in the loop. It can block. Claude Code and Codex hook files run unchanged.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://metaphi.mintlify.app/_mintlify/api/og/v2?division=Build+with+Hum\u0026amp;title=Hooks\u0026amp;description=A+command+Hum+runs+at+a+point+in+the+loop.+It+can+block.+Claude+Code+and+Codex+hook+files+run+unchanged.\u0026amp;theme=c55258f3c61135235ad577bf\u0026amp;signature=e5659ecd371a41571cf1531f3af7a0c229b3e88b3bfd41a92933d3a979294aca\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/metaphi/S6QvrQomUaNaO7Sl/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Metaphi AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0b0b0a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.metaphi.ai/hum/hooks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/hum/hooks.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.metaphi.ai/#organization\",\"name\":\"Metaphi AI\",\"url\":\"https://docs.metaphi.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/metaphi/xIYieuTDbKefPy06/logo/metaphi-light.svg?fit=max\u0026auto=format\u0026n=xIYieuTDbKefPy06\u0026q=85\u0026s=1b413012ccf945568f2f8a9ef0f99224\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.metaphi.ai#website\",\"name\":\"Metaphi AI\",\"url\":\"https://docs.metaphi.ai\",\"publisher\":{\"@id\":\"https://docs.metaphi.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.metaphi.ai/hum/hooks#webpage\",\"url\":\"https://docs.metaphi.ai/hum/hooks\",\"name\":\"Hooks\",\"description\":\"A command Hum runs at a point in the loop. It can block. Claude Code and Codex hook files run unchanged.\",\"dateModified\":\"2026-10-19T02:54:42.036Z\",\"isPartOf\":{\"@id\":\"https://docs.metaphi.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.metaphi.ai/hum/hooks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.metaphi.ai/hum/hooks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Build with Hum\",\"item\":\"https://docs.metaphi.ai/hum/instructions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hooks\",\"item\":\"https://docs.metaphi.ai/hum/hooks\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.metaphi.ai/hum/hooks#article\",\"headline\":\"Hooks\",\"name\":\"Hooks\",\"description\":\"A command Hum runs at a point in the loop. It can block. Claude Code and Codex hook files run unchanged.\",\"url\":\"https://docs.metaphi.ai/hum/hooks\",\"mainEntityOfPage\":{\"@id\":\"https://docs.metaphi.ai/hum/hooks#webpage\"},\"dateModified\":\"2026-10-19T02:54:42.036Z\",\"publisher\":{\"@id\":\"https://docs.metaphi.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.metaphi.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Metaphi AI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Metaphi AI","nav":{"global":null,"products":[{"product":"Hum","icon":"terminal","description":"The coding agent you work with","groups":[{"group":"Getting started","pages":[{"title":"Overview","href":"/hum/overview"},{"title":"Quickstart","href":"/hum/quickstart"}]},{"group":"Use Hum","pages":[{"title":"Sessions","href":"/hum/sessions"},{"title":"Hum in Slack","href":"/hum/slack"},{"title":"Steer the work","href":"/hum/steering"},{"title":"When it asks you","href":"/hum/asks"},{"title":"Sandbox and approvals","href":"/hum/sandbox"},{"title":"Models and credits","href":"/hum/models"}]},{"group":"Build with Hum","pages":[{"title":"Project instructions","href":"/hum/instructions"},{"title":"Plugins","href":"/hum/plugins"},{"title":"MCP servers","href":"/hum/mcp-servers"},{"title":"Language servers","href":"/hum/language-servers"},{"title":"Agent teams","href":"/hum/agent-teams"},{"title":"Sub-agents","href":"/hum/sub-agents"},{"title":"Skills","description":"A directory with a `SKILL.md`. Hum loads one when the task matches.","href":"/hum/skills"},{"title":"Hooks","href":"/hum/hooks"},{"title":"Run unattended","description":null,"href":"/hum/unattended"}]},{"group":"Reference","pages":[{"title":"Commands","href":"/hum/commands"},{"title":"In a session","href":"/hum/in-a-session"},{"title":"Configuration","href":"/hum/configuration"},{"title":"Troubleshooting","href":"/hum/troubleshooting"}]}]},{"product":"Kennet","icon":"flask","description":"Infrastructure for building and running RL environments","pages":[{"title":"Kennet","href":"/kennet/overview"}]},{"product":"Harwell","icon":"server","description":"The hosted mainframe runtime","pages":[{"title":"Harwell","href":"/harwell/overview"}]},{"product":"Account","icon":"user","description":"Sign-in, organizations, keys and credit for every product","pages":[{"title":"Account","href":"/account/sign-in"}]}]},"basePath":"","title":"Hooks - Metaphi AI","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":[],"chunks":[]}