{"record":{"id":"f7ae04f589ba2c35","repo":"atuinsh/atuin","slug":"atuin-hook-agent-name-is-not-supported-use-atuin-hook","errorCode":null,"errorMessage":"`atuin hook {agent_name}` is not supported. Use `atuin hook install {agent_name}`. {reload_hint}","messagePattern":"`atuin hook (.+?)` is not supported\\. Use `atuin hook install (.+?)`\\. (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin/src/command/client/hook.rs","lineNumber":184,"sourceCode":"            (None, None) => {\n                bail!(\"expected `atuin hook <agent>` or `atuin hook install <agent>`\");\n            }\n            (Some(_), Some(_)) => {\n                bail!(\"hook action cannot be combined with a positional agent\");\n            }\n        }\n    }\n}\n\nfn id_file_path(tool_use_id: &str) -> PathBuf {\n    std::env::temp_dir().join(format!(\"atuin-hook-{tool_use_id}\"))\n}\n\nasync fn handle(agent_name: &str, settings: &Settings) -> Result<()> {\n    let agent = Agent::from_name(agent_name)?;\n\n    if let InstallKind::Extension { reload_hint, .. } = agent.install_kind() {\n        bail!(\n            \"`atuin hook {agent_name}` is not supported. Use `atuin hook install {agent_name}`. \\\n             {reload_hint}\"\n        );\n    }\n\n    let mut input = String::new();\n    std::io::stdin().read_to_string(&mut input)?;\n\n    if input.trim().is_empty() {\n        return Ok(());\n    }\n\n    match HookEvent::from_json_str(&input)? {\n        Some(HookEvent::Start {\n            command,\n            intent,\n            tool_use_id,\n        }) => {","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/atuinsh/atuin/blob/c0c717ab04c881764bcad4b3d169a507e2432643/crates/atuin/src/command/client/hook.rs#L166-L202","documentation":"Some agents integrate via editor/CLI extensions rather than shell JSON hooks. For those, `atuin hook <agent>` (which emits hook JSON for a shell wrapper) is meaningless, so handle() bails and points the user at `atuin hook install <agent>` plus an agent-specific reload hint.","triggerScenarios":"Running `atuin hook <agent>` where Agent::install_kind() returns InstallKind::Extension; the agent's hooks are installed into its extension/config rather than driven by JSON hook input.","commonSituations":"Agents like GUI-based coding assistants that use extension-based integration; users following shell-hook instructions for an extension-based agent.","solutions":["Run `atuin hook install <agent>` instead, then reload as the hint instructs","Follow the printed reload_hint to activate the extension integration","Check the agent's docs for how its Atuin integration is invoked"],"exampleFix":"// before\natuin hook my-extension-agent\n// after\natuin hook install my-extension-agent","handlingStrategy":"validation","validationCode":"# prefer install for extension-based agents\natuin hook install \"$AGENT\" && echo \"reload the agent per its hint\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `atuin hook install <agent>` for extension-based agents","Follow the printed reload_hint after installing","Check the agent's install kind before choosing hook vs install"],"tags":["cli","hook","unsupported-operation","agent"],"backgroundTag":"unsupported-operation","analyzedSha":"c0c717ab04c881764bcad4b3d169a507e2432643","analyzedAt":"2026-09-12T07:40:01.341Z","contentChangedAt":"2026-09-12T07:40:01.341Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}