Skip to content

ao session get shows created (local) and updated (UTC) in different timezones #214

@codebanditssss

Description

@codebanditssss

Bug

ao session get renders created and updated in different timezones for the same session: created in local time, updated in UTC.

Analyzed against: 3e64c15 | Confidence: High

Reproduction

ao spawn --project <p> --prompt hi      # created+updated both local at first
ao session rename <id> "x"
ao session get <id>
# created: 2026-06-13T01:17:58+05:30      <- local (+05:30)
# updated: 2026-06-12T19:51:27Z           <- UTC (Z)

Root Cause

The session manager's clock defaults to plain time.Now (local) in New (backend/internal/session_manager/manager.go), and seedRecord stamps CreatedAt/UpdatedAt from it at spawn. Every other session write uses time.Now().UTC() — rename (service/session/service.go), activity (storage/sqlite/store/session_store.go). So once any UTC-writing path touches the row, created (local) and updated (UTC) disagree. The CLI formats both with time.RFC3339, which faithfully preserves each value's zone.

Fix

Default the session manager clock to UTC, matching the rest of the codebase. created and updated then render consistently.

Impact

Confusing, inconsistent timestamps in ao session get and the JSON API; any consumer diffing the two fields sees a spurious offset. Labels: bug, priority: low.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: lowNice to have, no rush

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions