#12178·goose

docs: hooks guide examples use prefixed tool names (developer__shell) that the CLI never sends

Author: yajoCreated Sep 17, 2026Updated Sep 17, 2026

Summary

The Context Engineering Hooks guide uses developer__shell in its tool-event example, but the CLI never sends that name. The developer extension is a platform extension with unprefixed_tools: true, so its shell tool is sent as just shell.

Why this matters

Hook authors copying the example matcher (developer__shell) get a rule that never fires on CLI sessions: developer__shell as a regex does not occur inside the actual payload value shell (matchers are unanchored regexes, and the example name is longer than the real one). We hit this while building a PreToolUse shell policy plugin: the hook silently never ran in CLI sessions.

Evidence

Source (identical in v1.49.0 and main):

  • crates/goose/src/agents/platform_extensions/mod.rs — the developer PlatformExtensionDef sets unprefixed_tools: true.
  • crates/goose/src/agents/extension_manager/mod.rs
    let public_name = if expose_unprefixed {
        tool.name.to_string()
    } else {
        format!("{}__{}", name, tool.name)
    };
    
    so the public name of the shell tool is shell.

Confirmed at runtime on v1.49.0: a PreToolUse hook that dumps the payload to a log receives "tool_name": "shell", and the installed binary does not contain the string developer__shell at all.

The same page also shows developer__image_processor in a tool-permissions UI example; that tool name does not exist anywhere in the codebase, so the docs' tool-name examples appear to predate the current platform-extension refactor.

Suggested fix

  • Use the bare shell name in the hooks guide examples (it is the name the CLI, ACP and Desktop all send for the developer extension's shell tool).
  • Optionally add a note to the hooks guide that platform extensions listed in platform_extensions/mod.rs with unprefixed_tools: true (developer, analyze) expose their tools without the {extension}__ prefix, while regular MCP extensions keep the {extension}__{tool} form.
  • Refresh the developer__image_processor example in the tool-permissions guide with a name that exists.

Assisted-by: OpenCode + glm-5.3-flash