Skip to content

UserPromptSubmit hook payload carries no prompt field under pool exec (docs list it) #47

Description

@CryptoJones

Summary

The hooks reference (https://docs.poolside.ai/hooks) says the UserPromptSubmit event adds a prompt field ("which reflects any earlier hook's rewrite"). Under pool exec on pool 1.0.16 the payload delivered to the hook has no prompt key at all, whether the prompt is passed with -p "..." or on stdin with -p -.

Reproduce

.poolside/settings.local.yaml in the workspace:

hooks:
  UserPromptSubmit:
    - name: capture
      matcher: "*"
      command: /abs/path/capture.sh

capture.sh:

#!/bin/sh
in=$(cat); printf '%s\n' "$in" >> /abs/path/events.jsonl; exit 0

Then:

pool exec --unsafe-auto-allow -d "$PWD" -p "Reply with exactly the word ok and use no tools."
printf 'Reply with exactly the word ok and use no tools.\n' | pool exec --unsafe-auto-allow -d "$PWD" -p -

Both runs deliver this payload (keys only; values elided):

{"hook_api_version": "1.0", "hook_event_name": "UserPromptSubmit", "event_id": "evt-2", "session_id": "...", "cwd": "...", "trajectory_path": "..."}

No prompt. Every other event matched the docs (PreToolUse/PostToolUse carry tool_name, tool_input, tool_call_id, tool_output; Stop carries reason; SessionStart carries source).

Why it matters

A UserPromptSubmit hook that injects additional_context based on what the user asked has nothing to key on. The query is recoverable by parsing the <user_query> block out of the latest tool_call.inference.start record in trajectory_path, which is what we do as a fallback, but that is a workaround on an undocumented file format.

Environment

  • pool 1.0.16 (latest per the update check), Linux x86_64
  • Observed under pool exec. Not yet checked under the interactive TUI or pool acp, so this may be exec-specific.

Context

Found while wiring omind's memory/guard hooks into pool: CryptoJones/omind#312. The rest of the hook protocol worked as documented on the first try, including both deny paths on PreToolUse.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions