# ai\_code\_commit\_sessions

Links commits to the AI sessions that touched their files, including before sessions arrive. One row per commit, session ID and tool. Written for every commit upload, including while AI code percentage is turned off, when no ai\_code\_commits row is stored.

Group: ai

[All tables](/schema.md)

[View HTML reference](https://docs.getdx.com/schema/ai_code_commit_sessions/)

| Column | Type | Description | References |
| --- | --- | --- | --- |
| id | number | Unique identifier for the row. |  |
| commit\_sha | string | Git commit SHA. Matches pull\_request\_commits.sha and, when the commit's attribution is stored, ai\_code\_commits.commit\_sha. |  |
| commit\_timestamp | date | Timestamp when the commit was made. |  |
| session\_external\_id | string | External session identifier supplied by the tool. Match using ai\_tool as well. | [ai\_sessions](/schema/ai_sessions.md) |
| ai\_tool | string | Tool of the linked session. \_\_unqualified\_\_ when the tool is unknown; such a link matches only when exactly one tool has that external ID. |  |
| row\_created\_at (DX internal) | date | When DX created this database row. |  |
| row\_updated\_at (DX internal) | date | When DX last updated this database row. |  |
