> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memloom.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Notify the daemon a Claude Code session ended

> What the Claude Code session-end hook installed by `memloom connect claude-code`
calls. Distills exactly the one session at `path` in the background: the hook gets a
202 immediately and never waits on distillation, so a slow LLM call can't hang the
editor. `path` must resolve inside `~/.claude/projects` and end in `.jsonl`; anything
else is rejected before it reaches the filesystem. Subject to the daily unattended
call budget reported at `/import/claude-code/status`.




## OpenAPI

````yaml /openapi.yaml post /import/claude-code/notify
openapi: 3.1.0
info:
  title: memloom local API
  version: 0.1.0
  description: >
    The HTTP API served by the `memloom serve` daemon on your machine. The CLI,
    the MCP server,

    and the viewer all route through this API. The daemon is the single owner of
    the store, so

    every client shares one consistent view of your memories.


    No authentication: the daemon binds to `127.0.0.1` only and is reachable
    solely from your

    own machine. Browser clients on other localhost ports are allowed via CORS.
servers:
  - url: http://127.0.0.1:4319
    description: Local memloom daemon
security: []
paths:
  /import/claude-code/notify:
    post:
      summary: Notify the daemon a Claude Code session ended
      description: >
        What the Claude Code session-end hook installed by `memloom connect
        claude-code`

        calls. Distills exactly the one session at `path` in the background: the
        hook gets a

        202 immediately and never waits on distillation, so a slow LLM call
        can't hang the

        editor. `path` must resolve inside `~/.claude/projects` and end in
        `.jsonl`; anything

        else is rejected before it reaches the filesystem. Subject to the daily
        unattended

        call budget reported at `/import/claude-code/status`.
      operationId: notifyClaudeCodeSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - path
              properties:
                path:
                  type: string
                  description: Absolute path to the session's .jsonl transcript.
                  example: /home/me/.claude/projects/-home-me-app/3f2a1c9e-....jsonl
      responses:
        '202':
          description: Accepted; distillation runs in the background.
          content:
            application/json:
              schema:
                type: object
                properties:
                  accepted:
                    type: boolean
                    example: true
        '400':
          description: >-
            Path is outside the Claude Code sessions directory, or not a .jsonl
            file.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string

````