Skip to content

feat: tool timeline — collapsible per-turn list of tools called with timing and status #57

@VforVitorio

Description

@VforVitorio

What problem does this solve?

After a multi-tool turn the user sees individual ✓ tool_name lines but has no summary of the full sequence or how long each step took, making it hard to understand what the agent did or where time was spent.

Proposed solution

After each turn that called ≥ 1 tool, print a compact timeline panel:

┌─ tools  (3 calls · 2.1 s) ──────────────────────┐
│  ✓  read_file      src/agent/core.py   0.04 s    │
│  ✓  run_shell      uv run pytest       1.83 s    │
│  ✓  write_file     src/agent/core.py   0.03 s    │
└──────────────────────────────────────────────────┘
  • Collapsed to one line by default; press a key to expand (or always expanded in verbose mode)
  • Color-code by tool category: read=muted, write=accent, shell=warning, error=red

Technical notes:

  • _wrap_tool_verbose already intercepts each call; add timing there
  • Accumulate calls per turn in a list, render after model.act() returns
  • Rich Table with no header, fixed columns for name / arg / duration / status

Acceptance criteria:

  • Timeline appears after turns that used tools
  • Each row shows tool name, key argument, and wall-clock duration
  • Failed tool calls shown in red
  • No output when turn used zero tools

Alternatives considered

None considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions