Expand description
Pull out structured metadata (request id, model, usage) from raw request/response shapes.
Functions§
- extract_
cwd - Extract the Claude Code working-directory marker from a request body’s
systemfield. Looks for a line starting withPrimary working directory:(case-sensitive, anchored to line start) and returns the trimmed path. Handles bothsystem: "..."(string) andsystem: [{"type":"text","text":"..."}](block list) shapes. - extract_
model_ from_ request_ body - extract_
request_ id