Skip to content

[FEATURE]: add lastMessage timestamp on opencode session list --format json output #21078

Closed as not planned

Description

@jesses-code-adventures

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

During development of a mobile app that leverages opencode, I found the updated timestamp wasn't what I needed when sorting sessions by recent activity; sessions that hadn't been opened for >6 months surfaced updated values from the current day.

This might speak to a separate bug, or to background processes that update this timestamp. Either way, I thought having an additional lastMessage would be more useful, and thought others might like it too.

I've opened this as an issue, but am maintaining my own fork for the time being that has the implementation. Happy to open this as a PR if the feature is desired. I have put the feature behind a --last-msg flag for the time being, as I understand we'd likely want to avoid an needless join in the existing implementation.

Example output:

oc-mobile  main
➜ opencode session list -n 5 --format json --last-msg
[
  {
    "id": "ses_2a397767cffe2V6ewVchWulr7Q",
    "title": "Missing session message despite 200 accepted",
    "updated": 1775372570659,
    "created": 1775371848067,
    "lastMessage": 1775372558096,
    "projectId": "0b76fc226574acbd89ef908ae637186c2e862366",
    "directory": "/Users/jessewilliams/Coding/sound-systems/oc-mobile"
  }
]

Activity

  1. added
    discussion
    on Apr 5, 2026
  2. added
    core
    on Apr 5, 2026
  3. removed
    discussion
    core
    on May 3, 2026
  4. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions