Skip to content

Instantly share code, notes, and snippets.

@oneryalcin
Created May 19, 2026 17:21
Show Gist options
  • Select an option

  • Save oneryalcin/fecc5210d9d80e2d39d7c078b8daaeee to your computer and use it in GitHub Desktop.

Select an option

Save oneryalcin/fecc5210d9d80e2d39d7c078b8daaeee to your computer and use it in GitHub Desktop.
Claude code Message Types and Event Types

⏺ Here's what v2.1.144 has today (covering CLI 2.1.97+, 134 $defs total):

  17 top-level message types

  The 17 things that can appear as a JSONL line in ~/.claude/projects/<proj>/*.jsonl:

  Core conversation — UserMessage, AssistantMessage, SystemMessage, SummaryMessage, ProgressMessage, AttachmentMessage

  Session metadata — AgentNameMessage, AITitleMessage, CustomTitleMessage, LastPromptMessage, AgentSettingMessage, PermissionModeMessage

  Workflow state — BridgeSessionMessage, WorktreeStateMessage, PRLinkMessage, FileHistorySnapshot, QueueOperation

  38 attachment subtypes (AttachmentMessage.attachment.type)

  ┌───────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
  │       Group       │                                                                                                            Subtypes                                                                                                            │
  ├───────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ Hooks (8)         │ hook_success, hook_blocking_error, hook_non_blocking_error, hook_cancelled, hook_additional_context, hook_deferred_tool, hook_error_during_execution, hook_permission_decision, hook_stopped_continuation, hook_system_message │
  ├───────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ Plan mode (3)     │ plan_mode, plan_mode_exit, plan_mode_reentry, plan_file_reference                                                                                                                                                              │
  ├───────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ Auto mode (2)     │ auto_mode, auto_mode_exit                                                                                                                                                                                                      │
  ├───────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ Files/context (6) │ file, directory, edited_text_file, nested_memory, compact_file_reference, relevant_memories                                                                                                                                    │
  ├───────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ Skills/tools (5)  │ skill_listing, invoked_skills, command_permissions, deferred_tools_delta, mcp_instructions_delta                                                                                                                               │
  ├───────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ Tasks/goals (5)   │ task_reminder, todo_reminder, task_status, goal_status, max_turns_reached                                                                                                                                                      │
  ├───────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ Misc (7)          │ queued_command, output_style, agent_mention, date_change, budget_usd, structured_output                                                                                                                                        │
  └───────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  10 system subtypes (SystemMessage.subtype)

  api_error, away_summary, bridge_status, compact_boundary, informational, local_command, microcompact_boundary, scheduled_task_fire, stop_hook_summary, turn_duration

  9 content blocks (message.content[])

  text, thinking, tool_use, tool_result, image, document, tool_reference (deferred-tools), server_tool_use (advisor), advisor_tool_result

  43 built-in tools

  File / shell (8) — Bash, bash (lowercase, Haiku variant), PowerShell, Read, Write, Edit, Glob, Grep

  Tasks / agents (10) — Agent, Task (legacy), TaskCreate, TaskUpdate, TaskList, TaskGet, TaskStop, TaskOutput, TodoWrite, Monitor

  Plan / worktree (4) — EnterPlanMode, ExitPlanMode, EnterWorktree, ExitWorktree

  Teams / messaging (4) — TeamCreate, TeamDelete, SendMessage, SendUserFile

  Scheduling (4) — CronCreate, CronDelete, CronList, ScheduleWakeup

  MCP / notifications (5) — ListMcpResourcesTool, ReadMcpResourceTool, WaitForMcpServers, PushNotification, RemoteTrigger

  Web / asking / sharing (4) — WebFetch, WebSearch, AskUserQuestion, ShareOnboardingGuide

  Other (4) — Skill, ToolSearch, NotebookEdit, KillShell

  7 progress subtypes (ProgressMessage.data.type)

  mcp_progress, bash_progress, hook_progress, agent_progress, waiting_for_task, query_update, search_results_received

  6 permission modes

  default, acceptEdits, bypassPermissions, dontAsk, plan, auto

  ---
  Provenance breakdown — of the 38 attachment subtypes: 25 were observation-derived (PR #2), 13 are binary-canonical from mine_binary.py (PR #6). Of the 43 tools: 33 always-loaded + captured from API (PR #2), 3 platform-conditional from mine_tools.py (PR #7,
  PowerShell/SendUserFile/RemoteTrigger), plus 7 legacy / shorthand entries that survive from older schemas (bash, Task, TodoWrite, KillShell, etc.).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment