feat(session_status): include ISO-8601 and Unix timestamps for scheduling (fixes #10841)#10836
Open
jeanlucthumm wants to merge 2 commits intoopenclaw:mainfrom
Open
feat(session_status): include ISO-8601 and Unix timestamps for scheduling (fixes #10841)#10836jeanlucthumm wants to merge 2 commits intoopenclaw:mainfrom
jeanlucthumm wants to merge 2 commits intoopenclaw:mainfrom
Conversation
This was referenced Feb 7, 2026
bfc1ccb to
f92900f
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
Author
|
Not stale |
Contributor
|
But in need of a rebase... |
e2c014f to
8528ab6
Compare
Author
|
@HenryLoenwind all good |
HenryLoenwind
approved these changes
Mar 1, 2026
|
This pull request has been automatically marked as stale due to inactivity. |
Author
|
not stale |
|
This pull request has been automatically marked as stale due to inactivity. |
Author
|
Not stale |
|
This pull request has been automatically marked as stale due to inactivity. |
Author
|
not stale |
|
This pull request has been automatically marked as stale due to inactivity. |
Author
|
not stale |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes: #10841
The cron scheduler requires ISO-8601 timestamps for
schedule.atjobs, but agents don't have access to the current time in a machine-readable format. When users ask to "set a reminder in 30 minutes", the agent has to guess the target timestamp — often getting it wrong.The system prompt only includes the timezone (e.g.,
Time zone: America/Chicago), not the actual time. The existing hint says to callsession_status, but that tool only returned human-readable time like:This isn't useful for calculating
now + 1800 secondsor formatting an ISO-8601 timestamp.Solution
Enhance
session_statusto include machine-readable timestamps:Also update the system prompt hint to mention these formats are available for scheduling.
Why not inject time into the system prompt?
Several PRs have attempted to add current time to the system prompt:
The problem is prompt cache stability. The system prompt is cached, and injecting a timestamp that changes every second/minute breaks caching. This was an intentional design decision (see commit 66eec29).
Our approach keeps the system prompt stable while giving agents access to precise timestamps when they need them via a tool call.
Related Issues
Main tracking issue: #10841
Test Plan
session_statusnow returns ISO-8601 and Unix timestampsGreptile Overview
Greptile Summary
session_statustool output to include machine-readable current timestamps (ISO-8601and Unix seconds) alongside the existing human-readable time.session_statusoutput and the system prompt hint text.src/agents/tools/session-status-tool.tsand prompt construction insrc/agents/system-prompt.ts, aligning with the repo’s existing “tool call for current time” approach rather than injecting time into the system prompt.Confidence Score: 5/5
session_statusoutput formatting. Only noted issue is a brittle test/implicit contract around Unix timestamp digit length, which is easy to adjust.(2/5) Greptile learns from your feedback when you react with thumbs up/down!