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
Message timestamp option is missing in OpenCode CLI v2.0.8 #49742
I'm using OpenCode CLI v2.0.8, and found the option of message timestamps is missing which is inconvenient.
In CLI v1.18.31, pressing Ctrl+P, then can find and toggling the timestamp for each message:
But in CLI v2.0.8, it's missing.
Plugins
No response
OpenCode version
2.0.8
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal
Reacted by Denis Feklushkin, Christian Centonze, benknab, Joao Paulo Fernandes, pistata112, github user, MihaiAnca13, Artem Pavlov, Kirill Znamenskiy and ognivo777
I checked v2 (origin/v2 head db80806651) against the v1 line (production, which is the 1.18.31 you're comparing against) and this is a regression from the v2 rewrite rather than a new feature request: v1 shipped the toggle, and the v2 rewrite dropped all three parts of it.
What v1 had
Part
v1 location
Keybinding
packages/tui/src/config/keybind.ts:100 — session_toggle_timestamps: keybind("none", "Toggle message timestamps"), mapped to the command id at :307 (session.toggle.timestamps)
Command palette entry
packages/tui/src/routes/session/index.tsx:126 (command id list), :695-701 (title Show timestamps / Hide timestamps, aliases: ["toggle-timestamps"])
packages/tui/src/routes/session/index.tsx:1440 — <Show when={ctx.showTimestamps()}> printing Locale.todayTimeOrDateTime(props.message.time.created); :1390 (metadataVisible) also gates the spacing above it
What v2 has now
timestamp does not appear anywhere in packages/tui/src except an unrelated comment in component/devtools-bar.tsx:168 — there is no command id, no keybinding, no setting and no render site.
The session.toggle.* family exists otherwise and has a consistent shape: session.toggle.thinking (routes/session/index.tsx:953), session.toggle.scrollbar (:967), session.toggle.exploration_grouping (:980), each flipping TUI config through configState.update((draft) => { draft.session = { ...draft.session, ... } }).
The config schema has scrollbar (packages/tui/src/config/index.tsx:150), thinking (:151) and grouping (:154), but no timestamps field.
Time formatting already exists and is used elsewhere: Locale.time (packages/tui/src/util/locale.ts:7) and Locale.datetime (:12) are called from routes/session/dialog-fork.tsx:68 and routes/session/dialog-timeline.tsx:29. That is exactly why the Timeline popup shows times while the transcript does not.
Proposed fix (alignment with the existing siblings, no new machinery)
add a boolean to the session block of packages/tui/src/config/index.tsx next to scrollbar;
register session.toggle.timestamps next to session.toggle.scrollbar in routes/session/index.tsx, flipping that value through the same configState.update path;
gate the created-time line in the message row on that value, using the existing Locale.time(message.time.created).
Cross-references: #43243 asks for the same surface on the v2 line (open since 2026-08-18) — since v1 already shipped it, restoring it is a regression fix rather than a new UI direction; #42782 (24h/locale formatting) would then apply to this surface too.
One product question I'd rather ask before writing code: should the v2 surface be a palette toggle like v1, or a config-file-only setting? I'll follow whichever you prefer — my default plan is the toggle, matching session.toggle.thinking and session.toggle.scrollbar. Happy to have the issue assigned if that direction looks right.
Reacted by cateyes99, Victor Elijha, Ingvar33 and ᴛᴜʀʙᴏ
Thanks — that settles my question. I'll keep v2 consistent with v1: the palette toggle, not a config-file-only setting.
Concretely, matching the existing session.toggle.* siblings on the v2 line — a timestamps boolean in the session block of packages/tui/src/config/index.tsx next to scrollbar; a session.toggle.timestamps command registered beside session.toggle.scrollbar in routes/session/index.tsx, flipping it through the same configState.update path; and the created-time line in the message row gated on it via the existing Locale.time. Same command id as v1's session.toggle.timestamps, so the v1 workflow (and any keybinding you add for it) carries over unchanged.
I'll open the PR against the v2 line, where the surface was dropped, and cross-reference #43243 and #42782.
Still reproducible on v2.0.21 (Termux, aarch64 Android, 80x24): no /timestamps slash command in the v2 command list (packages/tui/src/app.tsx), no timestamps entry anywhere in the v2 keybind schema, and no message-timestamp rendering path in TUI source at tag v2.0.21 — the only timestamp usages are session-list/stash relative times. Adding a data point that the regression from the rewrite still has not been picked up since the fix plan above.
I have a V2 version of this working locally and would like to take it on. Here's what it looks like. If the approach works for you, could a maintainer assign this to me? Feedback on the design is welcome.
/timestamps toggles it in the session view (same command id as V1, session.toggle.timestamps, no default key). The setting is stored as session.timestamps in cli.json and is off by default.
The time is right-aligned on the first line of each user message and on the first row of each agent reply (when the reply finished). Long first lines wrap before the time. With the setting off, nothing changes.
Each time only shows what changed since the previous one: nothing within the same minute (so a quick reply doesn't get its own stamp), just the time on the same day, and the day plus time when the day changes: Today 2:36 AM, Sun 2:36 AM within the last week, or Oct 2, 2:35 AM (with the year if it's not the current one). The first time in a session is compared with today.
Before
After
More screenshots
@argszero you mentioned a V2 PR earlier. If you already started on this, I'm happy to leave it to you or help instead.
I have a V2 version of this working locally and would like to take it on. Here's what it looks like. If the approach works for you, could a maintainer assign this to me? Feedback on the design is welcome.
/timestamps toggles it in the session view (same command id as V1, session.toggle.timestamps, no default key). The setting is stored as session.timestamps in cli.json and is off by default.
The time is right-aligned on the first line of each user message and on the first row of each agent reply (when the reply finished). Long first lines wrap before the time. With the setting off, nothing changes.
Each time only shows what changed since the previous one: nothing within the same minute (so a quick reply doesn't get its own stamp), just the time on the same day, and the day plus time when the day changes: Today 2:36 AM, Sun 2:36 AM within the last week, or Oct 2, 2:35 AM (with the year if it's not the current one). The first time in a session is compared with today.
Before
After
More screenshots
@argszero you mentioned a V2 PR earlier. If you already started on this, I'm happy to leave it to you or help instead.
Agree with bringing this back, and the toggle + session.timestamps approach looks right.
One placement note on the screenshots: in v1 the timestamp sat at the bottom of the user's sent message, which worked well. Right-aligned on the first line feels a bit odd to me — on narrow terminals (e.g. 80x24 on Termux) it competes with long first lines and forces wrapping logic, while bottom placement stays out of the way and matches v1.
Would it be possible to render it below the message content like v1 did, rather than right-aligned?
Still missing on v2.0.31 (Windows 11, Windows Terminal): no /timestamps in the command palette, no session.toggle.timestamps binding, and no timestamps field in the cli.json schema served for that build.
One data point that may help prioritise it: there is no plugin-side workaround. The V2 CLI plugin slot API exposes app, home.footer.*, prompt.footer.*, session.composer.top, session.panel and sidebar.*, with no message-level slot, and timestamp appears nowhere in the plugin types. A plugin can read message.time.created, but it has nowhere to render it on the transcript, so this has to land in the TUI.
That makes @Maximilian-Pichler's local implementation the only path I can see, and I would like to see it land.
@rekram1-node i take from the contributing guidelines, that this would need a UI review before implementing anything. is this the right way to do this, or should i ask another maintainer to have a look at it?
Also hit this after moving from v1 (which had the Ctrl+P timestamps toggle). Confirming the data is already available per message in v2 via the API — GET /api/session/<id>/message returns time.created / time.streamed / time.completed for each message. jq workaround while this lands:
SID=$(opencode api get /api/session | jq -r '.data | sort_by(.time.updated) | last | .id')
opencode api get "/api/session/$SID/message"| jq -r \
'.data[] | select(.type=="user" or .type=="assistant") | "\(.time.created/1000 | strftime("%d/%m %H:%M:%S")) [\(.type)]"'
Glad to see a working version in the thread — session.timestamps is exactly the shape I'd expect. 👍
Thanks for the report, @cateyes99, and for the screenshots comparing the two versions.
In short, you'd like v1's message-timestamp toggle (Ctrl+P → show a timestamp on each message) brought back in v2. v2 is a separate implementation from v1, and it doesn't have this option yet. It wasn't removed by accident, so I've marked this as a feature request. Maintainers will consider it.
A plugin can't add this for now either, because the v2 TUI plugin API has no hook for rendering content on individual messages.
My workflow keeps day-scoped reports inside long-running sessions; when I scroll
an older part of a session I can usually see the response duration, but not the
wall-clock time an exchange happened, so I can't tell "this report was written
at ~14:00 on 15.09". The v1 /timestamps toggle that v2 dropped covered exactly
this.
Plan above (API isPartial: true + session.timestamps config) fully matches
my usage. One request: when porting the toggle back, please cover the Desktop
chat surface too, not only the TUI — the desktop transcript renderer has the
same gap and no toggle today.
Adding the use case from #63016 (closed as a duplicate of this issue):
I run long sessions and need to correlate transcript messages with external events and logs — when something fails outside OpenCode (CI, a service, another terminal), there is no way to tell when a given message was produced. The v1 toggle fixed exactly that; without it the opencode api + jq workaround means scripting a query for every "what happened around 14:32?" instead of just reading the transcript.
Environment: v2 on Linux, terminal UI (matches the regression description — worked in v1.18.31, gone in v2). Happy to test a build once the session.timestamps + palette toggle lands.
+1 on restoring this in v2, with one requirement the current proposals don't fully cover: the format.
I need ISO 8601 with full date and time (2026-11-13T09:41:07+02:00), not hh:mm or a localized date, so transcript lines can be matched against external logs/CI output and parsed unambiguously across DST and timezone changes.
It should apply to both user and assistant messages (ideally tool/thinking lines too), not only the assistant footer after completion. session.date_format: "iso" in feat(tui): add configurable reply timestamps #62530 renders a date only, and that PR covers the assistant footer only.
The data already exists: time.created on every message from GET /api/session/{id}/message.
Activity
argszero commentedon Sep 18, 2026
I'd like to work on this.
I checked
v2(origin/v2headdb80806651) against the v1 line (production, which is the 1.18.31 you're comparing against) and this is a regression from the v2 rewrite rather than a new feature request: v1 shipped the toggle, and the v2 rewrite dropped all three parts of it.What v1 had
packages/tui/src/config/keybind.ts:100—session_toggle_timestamps: keybind("none", "Toggle message timestamps"), mapped to the command id at:307(session.toggle.timestamps)packages/tui/src/routes/session/index.tsx:126(command id list),:695-701(titleShow timestamps/Hide timestamps,aliases: ["toggle-timestamps"])packages/tui/src/routes/session/index.tsx:262—kv.signal<"hide" | "show">("timestamps", "hide")packages/tui/src/routes/session/index.tsx:1440—<Show when={ctx.showTimestamps()}>printingLocale.todayTimeOrDateTime(props.message.time.created);:1390(metadataVisible) also gates the spacing above itWhat v2 has now
timestampdoes not appear anywhere inpackages/tui/srcexcept an unrelated comment incomponent/devtools-bar.tsx:168— there is no command id, no keybinding, no setting and no render site.session.toggle.*family exists otherwise and has a consistent shape:session.toggle.thinking(routes/session/index.tsx:953),session.toggle.scrollbar(:967),session.toggle.exploration_grouping(:980), each flipping TUI config throughconfigState.update((draft) => { draft.session = { ...draft.session, ... } }).scrollbar(packages/tui/src/config/index.tsx:150),thinking(:151) andgrouping(:154), but no timestamps field.Locale.time(packages/tui/src/util/locale.ts:7) andLocale.datetime(:12) are called fromroutes/session/dialog-fork.tsx:68androutes/session/dialog-timeline.tsx:29. That is exactly why the Timeline popup shows times while the transcript does not.Proposed fix (alignment with the existing siblings, no new machinery)
sessionblock ofpackages/tui/src/config/index.tsxnext toscrollbar;session.toggle.timestampsnext tosession.toggle.scrollbarinroutes/session/index.tsx, flipping that value through the sameconfigState.updatepath;Locale.time(message.time.created).Cross-references: #43243 asks for the same surface on the v2 line (open since 2026-08-18) — since v1 already shipped it, restoring it is a regression fix rather than a new UI direction; #42782 (24h/locale formatting) would then apply to this surface too.
One product question I'd rather ask before writing code: should the v2 surface be a palette toggle like v1, or a config-file-only setting? I'll follow whichever you prefer — my default plan is the toggle, matching
session.toggle.thinkingandsession.toggle.scrollbar. Happy to have the issue assigned if that direction looks right.cateyes99 commentedon Sep 19, 2026
I'd prefer keeping it in the consistent way for both v1 & v2 :)
argszero commentedon Sep 19, 2026
Thanks — that settles my question. I'll keep v2 consistent with v1: the palette toggle, not a config-file-only setting.
Concretely, matching the existing
session.toggle.*siblings on the v2 line — atimestampsboolean in thesessionblock ofpackages/tui/src/config/index.tsxnext toscrollbar; asession.toggle.timestampscommand registered besidesession.toggle.scrollbarinroutes/session/index.tsx, flipping it through the sameconfigState.updatepath; and the created-time line in the message row gated on it via the existingLocale.time. Same command id as v1'ssession.toggle.timestamps, so the v1 workflow (and any keybinding you add for it) carries over unchanged.I'll open the PR against the v2 line, where the surface was dropped, and cross-reference #43243 and #42782.
DEAD1nsane commentedon Oct 1, 2026
Still reproducible on v2.0.21 (Termux, aarch64 Android, 80x24): no
/timestampsslash command in the v2 command list (packages/tui/src/app.tsx), no timestamps entry anywhere in the v2 keybind schema, and no message-timestamp rendering path in TUI source at tag v2.0.21 — the onlytimestampusages are session-list/stash relative times. Adding a data point that the regression from the rewrite still has not been picked up since the fix plan above.Maximilian-Pichler commentedon Oct 14, 2026
I have a V2 version of this working locally and would like to take it on. Here's what it looks like. If the approach works for you, could a maintainer assign this to me? Feedback on the design is welcome.
/timestampstoggles it in the session view (same command id as V1,session.toggle.timestamps, no default key). The setting is stored assession.timestampsin cli.json and is off by default.Today 2:36 AM,Sun 2:36 AMwithin the last week, orOct 2, 2:35 AM(with the year if it's not the current one). The first time in a session is compared with today.Before


After
More screenshots
@argszero you mentioned a V2 PR earlier. If you already started on this, I'm happy to leave it to you or help instead.
DEAD1nsane commentedon Oct 15, 2026
Agree with bringing this back, and the toggle +
session.timestampsapproach looks right.One placement note on the screenshots: in v1 the timestamp sat at the bottom of the user's sent message, which worked well. Right-aligned on the first line feels a bit odd to me — on narrow terminals (e.g. 80x24 on Termux) it competes with long first lines and forces wrapping logic, while bottom placement stays out of the way and matches v1.
Would it be possible to render it below the message content like v1 did, rather than right-aligned?
HernanVillalba commentedon Oct 16, 2026
Still missing on v2.0.31 (Windows 11, Windows Terminal): no
/timestampsin the command palette, nosession.toggle.timestampsbinding, and notimestampsfield in thecli.jsonschema served for that build.One data point that may help prioritise it: there is no plugin-side workaround. The V2 CLI plugin slot API exposes
app,home.footer.*,prompt.footer.*,session.composer.top,session.panelandsidebar.*, with no message-level slot, andtimestampappears nowhere in the plugin types. A plugin can readmessage.time.created, but it has nowhere to render it on the transcript, so this has to land in the TUI.That makes @Maximilian-Pichler's local implementation the only path I can see, and I would like to see it land.
Maximilian-Pichler commentedon Oct 17, 2026
@rekram1-node i take from the contributing guidelines, that this would need a UI review before implementing anything. is this the right way to do this, or should i ask another maintainer to have a look at it?
BR Max
joaopaulooooo commentedon Oct 21, 2026
Also hit this after moving from v1 (which had the Ctrl+P timestamps toggle). Confirming the data is already available per message in v2 via the API —
GET /api/session/<id>/messagereturnstime.created/time.streamed/time.completedfor each message. jq workaround while this lands:Glad to see a working version in the thread —
session.timestampsis exactly the shape I'd expect. 👍opencodejr commentedon Oct 28, 2026
Thanks for the report, @cateyes99, and for the screenshots comparing the two versions.
In short, you'd like v1's message-timestamp toggle (Ctrl+P → show a timestamp on each message) brought back in v2. v2 is a separate implementation from v1, and it doesn't have this option yet. It wasn't removed by accident, so I've marked this as a feature request. Maintainers will consider it.
A plugin can't add this for now either, because the v2 TUI plugin API has no hook for rendering content on individual messages.
cep207 commentedon Nov 5, 2026
Same need on the Desktop app side (Windows).
My workflow keeps day-scoped reports inside long-running sessions; when I scroll
an older part of a session I can usually see the response duration, but not the
wall-clock time an exchange happened, so I can't tell "this report was written
at ~14:00 on 15.09". The v1 /timestamps toggle that v2 dropped covered exactly
this.
Plan above (API
isPartial: true+session.timestampsconfig) fully matchesmy usage. One request: when porting the toggle back, please cover the Desktop
chat surface too, not only the TUI — the desktop transcript renderer has the
same gap and no toggle today.
sagaciouszu commentedon Nov 10, 2026
Adding the use case from #63016 (closed as a duplicate of this issue):
I run long sessions and need to correlate transcript messages with external events and logs — when something fails outside OpenCode (CI, a service, another terminal), there is no way to tell when a given message was produced. The v1 toggle fixed exactly that; without it the
opencode api+jqworkaround means scripting a query for every "what happened around 14:32?" instead of just reading the transcript.Environment: v2 on Linux, terminal UI (matches the regression description — worked in v1.18.31, gone in v2). Happy to test a build once the
session.timestamps+ palette toggle lands.Lauri-Nomme commentedon Nov 12, 2026
+1 on restoring this in v2, with one requirement the current proposals don't fully cover: the format.
2026-11-13T09:41:07+02:00), nothh:mmor a localized date, so transcript lines can be matched against external logs/CI output and parsed unambiguously across DST and timezone changes.session.date_format: "iso"in feat(tui): add configurable reply timestamps #62530 renders a date only, and that PR covers the assistant footer only.time.createdon every message fromGET /api/session/{id}/message.