AIコーディングエージェントは人間のようにログを記録するか?実証研究
Do AI Coding Agents Log Like Humans? An Empirical Study
April 10, 2026
著者: Youssef Esseddiq Ouatiti, Mohammed Sayagh, Hao Li, Ahmed E. Hassan
cs.AI
要旨
ソフトウェアのロギングは、複雑なシステムの維持とデバッグに不可欠であるが、AIコーディングエージェントがこの非機能要件をどのように扱うかは未だ明らかでない。従来の研究では人間のロギング慣行が特徴付けられているが、AIコーディングエージェントの挙動や、それを制御するための自然言語指示の有効性は未検討である。このギャップを埋めるため、我々は81のオープンソースリポジトリから4,550件のエージェントによるプルリクエストを実証研究した。エージェントのロギングパターンを人間のベースラインと比較し、明示的なロギング指示の影響を分析した。その結果、エージェントは58.4%のリポジトリで人間よりもロギング変更頻度が低いものの、変更を行う場合はより高いログ密度を示すことがわかった。さらに、明示的なロギング指示は稀(4.7%)であり、かつ無効であった。エージェントは建設的な要求に対して67%の確率で非遵守だった。最後に、生成後のログ修正の72.5%を人間が行っており、明示的なレビューフィードバックなしでロギングや可観測性の問題を修正する「沈黙の清掃係」として機能していることを観察した。これらの発見は、自然言語指示における二重の失敗(すなわち、ロギング指示の不足とエージェントの低い遵守率)を示しており、一貫したロギング慣行を確保するためには決定論的ガードレールが必要であることを示唆している。
English
Software logging is essential for maintaining and debugging complex systems, yet it remains unclear how AI coding agents handle this non-functional requirement. While prior work characterizes human logging practices, the behaviors of AI coding agents and the efficacy of natural language instructions in governing them are unexplored. To address this gap, we conduct an empirical study of 4,550 agentic pull requests across 81 open-source repositories. We compare agent logging patterns against human baselines and analyze the impact of explicit logging instructions. We find that agents change logging less often than humans in 58.4% of repositories, though they exhibit higher log density when they do. Furthermore, explicit logging instructions are rare (4.7%) and ineffective, as agents fail to comply with constructive requests 67% of the time. Finally, we observe that humans perform 72.5% of post-generation log repairs, acting as "silent janitors" who fix logging and observability issues without explicit review feedback. These findings indicate a dual failure in natural language instruction (i.e., scarcity of logging instructions and low agent compliance), suggesting that deterministic guardrails might be necessary to ensure consistent logging practices.