Where did my coding agent's 49 minutes go?
Description and use
The session‑profiler revealed that 47 of the 49 minutes spent by the agent on merging and cleaning the worktree were consumed by a single full test‑suite run. This insight led to a workflow change: run relevant test subsets during iteration and delegate full runs to background jobs.
Problem
A coding agent spent 49 minutes on a merge and worktree cleanup, but the agent did not explain where the time was spent.
Outcome
The profiler revealed that most of the session time was spent on a single test‑suite run, not on the agent’s work. This insight led the author to change how they interact with agents, running relevant subsets of tests during iteration and delegating full runs to background jobs.
Workflow
- Install session‑profiler plugin for Claude Code or Codex
- Ask the agent to "profile this session"
- Open the local report on 127.0.0.1
- Inspect timeline, tool calls, and background jobs
- Identify longest steps and their durations
- Adjust workflow to run tests in subsets or parallel tasks
Evidence
47 of those 49 minutes were a single full test‑suite run.
The profiler treats messages the app injects (a side session finishing, a message from another session) as wake‑ups, so the gap before them shows up as a wait, not as the agent working.
In my Codex history, about 64% of commands are recorded as taking under a millisecond, because the log captures only how long they took to start.
- Record date: 2026-10-22T15:11:23.915Z