Answer: All hooks receive common fields via stdin: session_id, transcript_path, cwd, hook_event_name, and timestamp. Status: Confirmed Entry: tool/gemini-cli/agents-and-automation/hook-input-schema Revision: 1 Digest: sha256:4ab3bcbdeb5c29c8 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:18:35Z Last changed: 2026-11-13T03:18:35Z Last verified: 2026-11-20T12:53:06Z Next check: 2026-11-21T12:53:06Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of session_id | session_id | [1] | 2026-11-20 transcript_path | transcript_path | [1] | 2026-11-20 cwd | cwd | [1] | 2026-11-20 hook_event_name | hook_event_name | [1] | 2026-11-20 timestamp | timestamp | [1] | 2026-11-20 Sources: [1] Google. "Hooks reference". https://geminicli.com/docs/hooks/reference.md Role: primary. Accessed: 2026-11-20T12:53:06Z Quote: ""session_id": string, // Unique ID for the current session" (Supports: session_id) Quote: ""transcript_path": string, // Absolute path to session transcript JSON" (Supports: transcript_path) Quote: ""cwd": string, // Current working directory" (Supports: cwd) Quote: ""hook_event_name": string, // The firing event (for example "BeforeTool")" (Supports: hook_event_name) Quote: ""timestamp": string // ISO 8601 execution time" (Supports: timestamp) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: 06d37f2f66812ee78bb46c37a112203376f0bae4d3b8b44ac79d0bda4b86a118 (captured 2026-11-13T03:18:34Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:18:35Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:53:06Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:53:06Z Last attempt: 2026-11-20T12:53:06Z Notes and limitations: Extracted automatically from a single official source (section "Base input schema"). Related: https://latestn.com/tool/gemini-cli/agents-and-automation/link-skill-local-development How do I link a Gemini CLI Agent Skill for local development? https://latestn.com/tool/gemini-cli/agents-and-automation/make-hooks-fast How do I make Gemini CLI hooks run faster? https://latestn.com/tool/gemini-cli/agents-and-automation/manage-skills-interactive-session How do I manage Gemini CLI Agent Skills in an interactive session? https://latestn.com/tool/gemini-cli/agents-and-automation/extract-structured-json-output How do I get structured JSON output from Gemini CLI for use in scripts? https://latestn.com/tool/gemini-cli/agents-and-automation/headless-json-output-format How do I get JSON output from Gemini CLI in headless mode? https://latestn.com/tool/gemini-cli/agents-and-automation/hook-exit-codes What exit codes do Gemini CLI hook scripts need to return? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:18:35Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/agents-and-automation/hook-input-schema/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/agents-and-automation/hook-input-schema POST: https://latestn.com/dispute/tool/gemini-cli/agents-and-automation/hook-input-schema with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/agents-and-automation/hook-input-schema?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What input fields does a Gemini CLI hook receive on stdin? Revision 1, last verified 2026-11-20T12:53:06Z. https://latestn.com/tool/gemini-cli/agents-and-automation/hook-input-schema (accessed 2026-11-21T09:57:21Z). @misc{LatestN_tool_gemini_cli_agents_and_automation_hook_input_schema_r1, title = {What input fields does a Gemini CLI hook receive on stdin?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/agents-and-automation/hook-input-schema}}, note = {Revision 1; digest sha256:4ab3bcbdeb5c29c8; last verified 2026-11-20T12:53:06Z; accessed 2026-11-21T09:57:21Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/agents-and-automation/hook-input-schema