Skip to content

fix: API ignores agent and cwd fields from ProcessHookEvent #32

@tumberger

Description

@tumberger

Problem

The CLI populates agent and cwd in every ProcessHookEventRequest, but the API handler never reads them:

  • agent — the agent type (e.g. "claude") is sent per event but discarded. Only stored once at session creation inside client_info JSON.
  • cwd — the working directory per event is sent but completely ignored. This means if the agent changes directories during a session, that context is lost.

Impact

  • No way to filter/query events by agent type without joining to the session
  • No per-event working directory in the audit trail — only the initial cwd from session creation
  • Wasted bytes on the wire (minor)

Fix

The API handler should read these fields and either:

  1. Store them as first-class columns on mcp_events (preferred for queryability)
  2. At minimum, include them in the request_json blob

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions