CodeTracer: Towards Traceable Agent States

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Li, Han, Yao, Yifan, Zhu, Letian, Feng, Rili, Ye, Hongyi, Wang, Jiaming, He, Yancheng, Zou, Pengyu, Zhang, Lehan, Lei, Xinping, Huang, Haoyang, Deng, Ken, Sun, Ming, Zhang, Zhaoxiang, Ye, He, Liu, Jiaheng
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866911595172462592
author Li, Han
Yao, Yifan
Zhu, Letian
Feng, Rili
Ye, Hongyi
Wang, Jiaming
He, Yancheng
Zou, Pengyu
Zhang, Lehan
Lei, Xinping
Huang, Haoyang
Deng, Ken
Sun, Ming
Zhang, Zhaoxiang
Ye, He
Liu, Jiaheng
author_facet Li, Han
Yao, Yifan
Zhu, Letian
Feng, Rili
Ye, Hongyi
Wang, Jiaming
He, Yancheng
Zou, Pengyu
Zhang, Lehan
Lei, Xinping
Huang, Haoyang
Deng, Ken
Sun, Ming
Zhang, Zhaoxiang
Ye, He
Liu, Jiaheng
contents Code agents are advancing rapidly, but debugging them is becoming increasingly difficult. As frameworks orchestrate parallel tool calls and multi-stage workflows over complex tasks, making the agent's state transitions and error propagation hard to observe. In these runs, an early misstep can trap the agent in unproductive loops or even cascade into fundamental errors, forming hidden error chains that make it hard to tell when the agent goes off track and why. Existing agent tracing analyses either focus on simple interaction or rely on small-scale manual inspection, which limits their scalability and usefulness for real coding workflows. We present CodeTracer, a tracing architecture that parses heterogeneous run artifacts through evolving extractors, reconstructs the full state transition history as a hierarchical trace tree with persistent memory, and performs failure onset localization to pinpoint the failure origin and its downstream chain. To enable systematic evaluation, we construct CodeTraceBench from a large collection of executed trajectories generated by four widely used code agent frameworks on diverse code tasks (e.g., bug fixing, refactoring, and terminal interaction), with supervision at both the stage and step levels for failure localization. Experiments show that CodeTracer substantially outperforms direct prompting and lightweight baselines, and that replaying its diagnostic signals consistently recovers originally failed runs under matched budgets. Our code and data are publicly available.
format Preprint
id arxiv_https___arxiv_org_abs_2604_11641
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle CodeTracer: Towards Traceable Agent States
Li, Han
Yao, Yifan
Zhu, Letian
Feng, Rili
Ye, Hongyi
Wang, Jiaming
He, Yancheng
Zou, Pengyu
Zhang, Lehan
Lei, Xinping
Huang, Haoyang
Deng, Ken
Sun, Ming
Zhang, Zhaoxiang
Ye, He
Liu, Jiaheng
Software Engineering
Artificial Intelligence
D.2.5; D.2.6; I.2.11
Code agents are advancing rapidly, but debugging them is becoming increasingly difficult. As frameworks orchestrate parallel tool calls and multi-stage workflows over complex tasks, making the agent's state transitions and error propagation hard to observe. In these runs, an early misstep can trap the agent in unproductive loops or even cascade into fundamental errors, forming hidden error chains that make it hard to tell when the agent goes off track and why. Existing agent tracing analyses either focus on simple interaction or rely on small-scale manual inspection, which limits their scalability and usefulness for real coding workflows. We present CodeTracer, a tracing architecture that parses heterogeneous run artifacts through evolving extractors, reconstructs the full state transition history as a hierarchical trace tree with persistent memory, and performs failure onset localization to pinpoint the failure origin and its downstream chain. To enable systematic evaluation, we construct CodeTraceBench from a large collection of executed trajectories generated by four widely used code agent frameworks on diverse code tasks (e.g., bug fixing, refactoring, and terminal interaction), with supervision at both the stage and step levels for failure localization. Experiments show that CodeTracer substantially outperforms direct prompting and lightweight baselines, and that replaying its diagnostic signals consistently recovers originally failed runs under matched budgets. Our code and data are publicly available.
title CodeTracer: Towards Traceable Agent States
topic Software Engineering
Artificial Intelligence
D.2.5; D.2.6; I.2.11
url https://arxiv.org/abs/2604.11641