All log entries for a single agent call have same "created" timestamp?
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3561236. --> Reported by: [ultimike](https://www.drupal.org/user/51132) Related to !1156 >>> <p>[Tracker]<br> <strong>Update Summary: </strong>All log entries for a single agent call have same "created" timestamp?<br> <strong>Short Description: </strong>Log entries created during a single agent call get the same "created" timestamp, even if the agent takes a few minutes.<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>It appears that for a single AI Agent call that takes several minutes, all log entries for that call get the same "created" timestamp. </p> <p>For example, I just ran an agent that made 9 API calls. Each of the 9 `ai_log` table entries for these API calls have the same "created" timestamp: 1764765657</p> <p>In the "output_text", there is a "created" timestamp - for the 9 log entries I'm looking at, this "created" timestamp ranges from 1764765661 to 1764765714.</p> <p>It appears that maybe the `ai_log.created` value for each entry is being set at the time that the agent begins. </p> <h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4> <p>Run any agent, look at the `ai_log` table.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Set the `ai_log.created` value when the API call is actually made.</p>
issue