Agents Builders

Tool call capture hook

Archived
tool-call-capture-hook

Created

Jun 30, 21:40

Started

Jun 30, 21:46

Completed

Jun 30, 23:22

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

tool-call-capture-hook

Repositories

mcritchie-studio

Release Slug

Branch

feat/tool-call-capture-hook

QA URL

Production URL

tooling

Acceptance Criteria

  • PostToolUse hook posts each tool call
  • Derive task stage mascot from marker
  • Hook failure never blocks the session
  • Document settings json install snippet

Expected Test Plan

  • [unit] hook builds capture payload from input
  • [integration] hook posts to capture endpoint

Checks Run

  • [unit] tool_name->kind mapping, truncation, outcome, marker derivation, payload shape
  • [integration] real hook mints token + POSTs right shape to /api/v1/atomic_actions
  • [integration] no session_id posts nothing; closed port still exits 0
  • [full-suite@9a84c6bb07178dc88450a2df24a081b2246ee7ca] bin/rails test green
  • [rubocop@9a84c6bb07178dc88450a2df24a081b2246ee7ca] bin/rubocop clean

Agent Context

Phase B live-capture, half 2. A Claude Code PostToolUse hook (bin/ script or lib) reading the hook JSON on stdin (session_id, tool_name, tool_input, tool_response, cwd), mapping to the capture contract, deriving task_slug/stage/mascot from the active-feature marker (the bin/task marker the status line reads), and POSTing to POST /api/v1/atomic_actions (parallel task atomic-capture-api-endpoint). Contract fields: session_id, kind (tool name mapped: Read->read, Edit->edit, Bash->bash, etc), task_slug?, mascot?, input (tool_input), output (tool_response, truncated), outcome (ok/error), actor (agent), stage?, occurred_at. MUST be non-blocking — exit 0 ALWAYS, a hook failure can never break the session. Endpoint URL configurable via env (ATOMIC_CAPTURE_URL, default local :3000). Leave tokens/cost and event/result slugs null (not available from a hook). Provide the settings.json hook snippet + an install step (mirror bin/install-agent-docs). Do NOT modify the operator's global settings.json — document it; the orchestrator installs it after review.

Stage Timeline

Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. means the agent didn't report that metric.

Sizing Avi · PO MEDIUM Dev MEDIUM Actual XL ≠ forecast
  1. Created Designed
    C Caterpie
    Caterpie
    Model
    Duration
    Tokens
    Cost
    Completed Jun 30, 21:40 · 8 days ago
    api
  2. Designed Building
    C Caterpie
    Caterpie
    Model
    claude-opus-4-8
    Duration
    6 minutes
    Tokens
    7,404,752
    Cost
    ~$5.00
    Started Jun 30, 21:40
    Completed Jun 30, 21:46 · 8 days ago
    cli
  3. Building Submitted
    C Caterpie
    Caterpie
    Model
    claude-opus-4-8
    Duration
    12 minutes
    Tokens
    4,999,823
    Cost
    ~$2.71
    Started Jun 30, 21:46
    Completed Jun 30, 21:59 · 8 days ago
    cli
  4. Submitted Reviewed Review Activity
    C Carl
    Carl primary
    S Shannon
    Shannon light
    Model
    claude-opus-4-8
    Duration
    2 minutes
    Tokens
    1,897,191
    Cost
    ~$1.31
    Started Jun 30, 21:59
    Completed Jun 30, 22:01 · 8 days ago
    cli
  5. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    under a minute
    Tokens
    1,921,899
    Cost
    ~$1.30
    Started Jun 30, 22:01
    Completed Jun 30, 22:02 · 8 days ago
  6. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    about 1 hour
    Tokens
    35,364,506
    Cost
    ~$23.29
    Started Jun 30, 22:02
    Completed Jun 30, 23:22 · 8 days ago
  7. Shipped Archived
    Model
    Duration
    3 days
    Tokens
    Cost
    Started Jun 30, 23:22
    Completed Jul 04, 03:23 · 4 days ago

Conversation

QA review feedback, agent handoffs, and follow-up notes for this task.

No task feedback has been recorded yet.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

MEDIUM

Dev

MEDIUM

Actual

XL