Skip to content

[FEATURE] terminalSequence field on hook #4882

@xibaisike

Description

@xibaisike

What would you like to be added?

ClaudeCode v2.1.141 release added a terminalSequence field to hook JSON output so hooks can emit terminal-side effects such as desktop notifications, window-title updates, and bells without a controlling terminal.

Why is this needed?

anthropics/claude-code#36850

Additional context

Example:

  1. ~/.claude/hooks/notify.sh
#!/bin/bash
afplay -v 0.5 /System/Library/Sounds/Tink.aiff 2>/dev/null
jq -nc '{terminalSequence: ""}'
  1. ~/.claude/settings.json
{
  "hooks": {
    "PermissionRequest": [
      {
        "matcher": "",
        "hooks": [{ "type": "command", "command": "~/.claude/hooks/notify.sh" }]
      }
    ],
    "Stop": [
      {
        "matcher": "",
        "hooks": [{ "type": "command", "command": "~/.claude/hooks/notify.sh" }]
      }
    ]
  }
}

Metadata

Metadata

Assignees

Labels

category/cliCommand line interface and interactionpriority/P3Low - Minor, cosmetic, nice-to-fix issuesroadmap/hooks-eventsRoadmap: Hook and event systemscope/interactiveInteractive CLI featuresscope/shellShell command executiontype/feature-requestNew feature or enhancement request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions