-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
Feature: Gateway should inject timestamps for TUI/web messages #3658
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
When the current time was moved from the system prompt to session_status for cache efficiency (66eec29), it created a gap: TUI and web clients don't provide timestamp context to agents.
The Problem
- Channel plugins (Discord, Telegram, etc.) inject timestamps into messages:
[2026-01-28 18:46 CST] User: hello - TUI and web clients send raw messages without timestamps
- Frontier models can call
session_statusto get the time, but smaller models (7B, etc.) won't think to do this - Result: lesser models have no way to know the current date/time
Proposed Solution
Gateway should inject timestamps into incoming user messages when not already present. This:
- Keeps the system prompt cacheable (no per-request time changes)
- Gives all models timestamp context from the most recent message
- Requires no changes to individual clients (TUI, web, future clients)
- Matches existing behavior of channel plugins
Why Not Just Document session_status?
Smaller models struggle with multi-step reasoning ("I don't know the time → which tool has it → call that tool"). They need explicit context, not self-serve tools. Injecting timestamps is the same pattern that already works for Discord/Telegram users.
Related
Closes gap identified in #3652 (closed as intended, but surfaced this edge case).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.