Where did my coding agent's 49 minutes go?
说明与用途
session‑profiler 发现,代理在合并和清理工作树时花费的 49 分钟中,47 分钟用于一次完整的测试套件运行。此洞察促使工作流程改变:在迭代期间运行相关测试子集,将完整运行委托给后台作业。
问题
A coding agent spent 49 minutes on a merge and worktree cleanup, but the agent did not explain where the time was spent.
结果
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.
工作流
- 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
证据
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.
- 记录日期: 2026-10-22T15:11:23.915Z