#2046·serena

Codex PostToolUse hook failed due to non-existing `serena-hooks reset`

Author: Stavr0sStuffCreated Sep 16, 2026Updated Sep 16, 2026

Preconditions:

  • I have made sure it's an actual issue, not a question (use GitHub Discussions instead).
  • I have actually encountered this issue in practice. Issues that are based on (AI-based) code analysis only will be closed without comment.
  • I have consulted the user guide and verified that the issue cannot be resolved by adjusting configuration/following recommended workflows.
  • I have looked for similar issues and discussions, including closed ones.

Issue details:

  • I have provided a meaningful title and description.
  • I have explained how the issue arose and, where possible, added instructions on how to reproduce it.
  • I have added details on my setup: Serena version, MCP client, OS, the programming language(s), relevant configuration adjustments and project specifics.

System config:

  • Windows 11 (git bash --> zsh)
  • Serena 1.7.0
  • Codex CLI 0.154.0

Steps to reproduce:

• Called serena.activate_project({"project":"C:\\Users\\Steven\\dev\\vsclaude"})
  └ The project with name <XXXX>  is activated.
    Active language servers: typescript.
    File encoding: utf-8.
    Onboarding has not been performed yet. Ask the user whether to perform onboarding via the `onboarding` tool.

    IMPORTANT: If you have not yet read the 'Serena Instructions Manual', do it now before continuing!

• Hook failed
  └ hook exited with code 1

Codex traced this to the PostToolUseHook calling serena-hooks reset which is not an available serena-hooks command. Manual check confirms this:

❯ serena-hooks --help
Usage: serena-hooks [OPTIONS] COMMAND [ARGS]...

  Commands that send reminders to agents when appropriate, to be used in
  hooks.

Options:
  --help  Show this message and exit.

Commands:
  activate      Set this as hook at session startup to prompt the agent...
  auto-approve  Set this as hook at PreToolUse to auto-approve Serena...
  cleanup       Set this as hook at session end all hook data for the...
  remind        Set this as hook at PreToolUse to remind the agent to use...

I'm not sure if the doc is just outdated, or a wrong serena-hooks executable is bundled with serena 1.7.0

Unrelated: the same setup doc refers to an outdated hooks setting for codex, I got depreciation warnings in codex. The new setting to enable hooks in ~/.codex/config.toml is:

[features]
hooks = true