Repository navigation
Description
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
Problem
The AI model has no awareness of how much time passes between user messages within a conversation. The static <omo-env> block provides the session start time, but this is set once at session initialization and never updates.
This causes a concrete usability problem: when a user asks a question, leaves for hours or days, then returns and replies, the AI treats it as if seconds have passed. It says things like "wait a few minutes, I'm still working on it" when in reality the user has been gone for 3 days.
Current Workaround
Using a UserPromptSubmit hook that:
- Reads current timestamp
- Reads last message timestamp from a state file
- Calculates human-readable elapsed time
- Outputs to stdout (which gets injected as AI-visible context per the hooks spec)
- Updates the state file
This produces context like:
[Time Context] Current time: 2026-03-03 17:58 CET | Last user message: 3 days 2 hours ago
Proposed Native Feature
Per-message timestamps should be a first-class feature in OpenCode, not a hook workaround. Specifically:
- Inject current datetime into each user message's context (updating the stale
<omo-env>block, or adding a separate per-message timestamp) - Track elapsed time between user messages and make it visible to the AI
- Per-session state: Track the last AI response time as well, so the model knows if it was the one that went silent vs. the user
Why This Should Be Native
- Every user benefits — time awareness is universally needed, not niche
- Hook workaround is fragile — relies on file I/O, shell execution, and stdout injection semantics
- Model can't distinguish between "user is typing slowly" (30 sec gap) and "user left for the weekend" (3 day gap) without this
- The
<omo-env>block already exists — extending it with a per-messageCurrent timefield is minimal effort
Related Issues
- [FEATURE]: Add timestamp next to messages in chat (both agent and user messages) #8634 — Timestamp display in chat UI (visual only, not AI-visible)
- feat: Add
!\command\`` dynamic context syntax in skills #10892 — Dynamic context via!commandsyntax in skills - Native Claude Code hooks compatibility (PreToolUse, PostToolUse, Stop) #12472 — Native Claude Code hooks compatibility
Activity
github-actions commentedon Mar 3, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:(e.g.[FEATURE]: Inject per-message timestamps as AI-visible context)Please edit this issue to address the above within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
[-]Feature Request: Inject per-message timestamps as AI-visible context[/-][+][FEATURE]: Inject per-message timestamps as AI-visible context[/+]github-actions commentedon Mar 3, 2026
Thanks for updating the issue! Everything looks good now — the title is properly formatted and the feature request is well-explained with a clear problem statement and proposed solution. The compliance flag has been removed.
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.