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

Open
#47 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
50/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
shell
Domain
api, documentation

Research direction

Start with the UserPromptSubmit hook reference and reproduce the issue using pool exec, .poolside/settings.local.yaml, and capture.sh. Compare the documented payload with the keys recorded in events.jsonl for both -p modes, then verify that the prompt field is present and reflects the submitted or rewritten prompt, or that the documentation accurately describes the supported behavior.

Written by the indexing model from the issue text.

Description

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: https://github.com/CryptoJones/omind/pull/312. The rest of the hook protocol worked as documented on the first try, including both deny paths on PreToolUse.

Dominant language
No language data
Stars
426
Forks
25
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from poolsideai/pool

All issues in poolsideai/pool

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.