> ## Content Index
> Fetch the complete content index at: https://sanghunkang.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Claude Code 세션 종료 시 resume 명령어 자동 클립보드 복사
- URL: https://sanghunkang.com/ko/claude-code-resume-clipboard-hook-ko/
- Published: 2026-04-05T12:29:44.000Z
- Updated: 2026-04-05T12:29:44.000Z
- Author: Sanghun Kang
- Tags: dev, #ko, #multi

Claude Code를 쓰다 보면 세션을 종료 후 재시작해야 할 때가 있다. 종료하면 `claude --resume {session_id}` 형태로 터미널에 뜨는데, 매번 이걸 드래그해서 복사하는 게 번거로워서 자동화했다.

Claude Code의 hook 기능을 쓰면 이걸 자동화할 수 있다.

## 설정

`~/.claude/settings.json`에 `SessionEnd` hook을 추가한다.

```json

"hooks": {
  "SessionEnd": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "jq -r '\"claude --resume \" + .session_id' | pbcopy"
        }
      ]
    }
  ]
}

```

세션이 종료되면 hook이 세션 정보를 JSON으로 받는다. `jq`로 `session_id`를 꺼내서 `claude --resume {id}` 형태로 조합한 뒤, `pbcopy`로 클립보드에 넣는다.

## 사용

세션 종료 후 터미널에서 `Cmd+V`. 끝.