CodeTracer: 추적 가능한 에이전트 상태를 향하여
CodeTracer: Towards Traceable Agent States
코드 에이전트는 빠르게 발전하고 있지만, 디버깅은 점점 더 어려워지고 있습니다. 프레임워크가 복잡한 작업에 대한 병렬 툴 호출 및 다단계 워크플로우를 조정함에 따라, 에이전트의 상태 변화 및 오류 전파를 관찰하기가 어렵습니다. 이러한 실행 과정에서 초기에 발생하는 작은 오류가 에이전트를 비생산적인 루프에 빠뜨리거나 심각한 오류로 이어져, 숨겨진 오류 체인을 형성하고 에이전트가 언제, 왜 잘못되었는지 파악하기 어렵게 만듭니다. 기존 에이전트 추적 분석은 단순한 상호 작용에 초점을 맞추거나 소규모의 수동 검사에 의존하는 경우가 많아, 확장성과 실제 코딩 워크플로우에 대한 유용성이 제한됩니다. 본 논문에서는 CodeTracer라는 추적 아키텍처를 제시합니다. CodeTracer는 진화하는 추출기를 통해 다양한 실행 결과물을 분석하고, 지속적인 메모리를 갖는 계층적 추적 트리를 통해 에이전트의 전체 상태 변화 기록을 재구성하며, 오류 발생 지점과 그 이후의 연쇄를 정확하게 파악하기 위한 오류 발생 지점 위치 추적 기능을 제공합니다. 체계적인 평가를 위해, 널리 사용되는 코드 에이전트 프레임워크 4개를 사용하여 다양한 코딩 작업(예: 버그 수정, 리팩토링, 터미널 상호 작용)에서 생성된 방대한 실행 경로 데이터를 수집하여 CodeTraceBench를 구축했습니다. 이 데이터셋은 단계 및 세부 수준에서 오류 위치 추적을 위한 감독 데이터를 포함합니다. 실험 결과, CodeTracer는 직접 프롬프트 방식 및 간단한 기본 모델보다 훨씬 우수한 성능을 보이며, 진단 신호를 재생하면 동일한 예산 내에서 원래 실패했던 실행을 일관되게 복구할 수 있음을 확인했습니다. 본 논문에서 제시된 코드와 데이터는 공개적으로 제공됩니다.
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.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.