You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ae8fbeb
Browse filesBrowse the repository at this point in the historyBrowse files
fix: take forkedFrom from the rollout and the usage model from the thread
Third review round:
- thread/list answers forkedFromId null and thread/read does not, so a
fork's row changed between the two and sent false changes. forkedFrom is
now the forked_from_id of the rollout's session_meta, read once with the
usage, for list and subscription rows alike; the first line is read in
64 KB steps.
- usage.model follows the thread's current model, which can change without
a new token count.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copy file name to clipboardExpand all lines: docs/air-extensions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1044,7 +1044,7 @@ Every row carries these fields in `_meta.jetbrains.air`; all but `archived` only
1044
1044
|`archived`|`true` for a thread from the archived Codex list, `false` otherwise, whatever the `archived` filter. Always present. |
1045
1045
|`lastPromptAt`| ISO time of `Thread.recencyAt`: Codex moves it when a turn starts and orders threads by it. |
1046
1046
|`model`|`Thread.model`. |
1047
-
|`forkedFrom`|`Thread.forkedFromId`. |
1047
+
|`forkedFrom`|The thread it was forked from: `forked_from_id` of the `session_meta` line of its rollout, which the adapter reads with the usage, see [Token usage](#token-usage). Until then `Thread.forkedFromId`, which `thread/read` answers and `thread/list` does not. |
1048
1048
|`state`| Only for a thread that this adapter has loaded: `running`, `requires_action` (waiting for an approval or for user input), or `idle`. Omitted otherwise, never `unknown`. |
1049
1049
|`lastTurnEndedAt`| ISO time of the last `turn/completed` that this adapter saw for a session of this connection. Forgotten when the thread is deleted. |
1050
1050
|`usage`| The token usage of the thread, see [Token usage](#token-usage). Omitted until the adapter has read it, and for a thread whose rollout has no token count. |
@@ -1065,7 +1065,7 @@ The adapter sends no `cost`: Codex reports none.
1065
1065
-`inputTokens` is fresh input only: Codex's input minus the cache reads and the cache writes, at least 0, as
1066
1066
`PromptResponse.usage` counts it. `cachedReadTokens` and `cachedWriteTokens` are the cache reads and writes.
1067
1067
`outputTokens` includes `reasoningTokens`.
1068
-
-`model` is `Thread.model`, the thread's latest model.
1068
+
-`model` is `Thread.model`, the thread's latest model, the same as the row's `model`.
1069
1069
- A fork counts only its own work. A rollout whose first line, `session_meta`, names a `forked_from_id` is a
1070
1070
fork; `Thread.forkedFromId` does not tell, as `thread/list` leaves it out. The first record of a fork carries
1071
1071
the total of the history it inherited plus the usage of its own first request, so the adapter subtracts that
0 commit comments