Repository navigation
feat(gateway): get_time answers in the universe's zone, which sync_env_clock arms the clock in - #702
Open
earakely-scale wants to merge 3 commits into
Open
earakely-scale wants to merge 3 commits into
earakely-scale wants to merge 3 commits into
Conversation
…v_clock arms the clock in An agent asking get_time for the time got UTC alone unless it already knew its user's zone, and nothing in the environment told it: in the FD-5483 pilot, Sonnet took 00:32 UTC for Nora's time and scheduled its "morning" check for 00:32 in Denver, missing the 06:00 cancellation it was there to catch. sync_env_clock now arms the gateway's clock in its timezone (set_time's time_zone), which the clock keeps until a re-arm or a clear and shows in its state, and get_time answers with time_zone and local_time in it when the agent asks for no other zone. Tool dates stay UTC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a warning and recorded, and the step goes on Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…out the environment's setup words Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What changes
get_timenow answers in the universe's time zone, the onesync_env_clock'stimezonearms the clock in, as well as in UTC.Before, the gateway's
get_timeanswered in UTC alone unless the agent passed atime_zone, and nothing in the environment told the agent which zone that should be. In the FD-5483 pilot ("A weekend away", Nora in Denver), Sonnet:get_timewith no zone and got00:32Z;It slept through the 06:00 cancellation it was there to catch. A person's assistant knows their user's local time; the computer's own clock showed Denver time, but the gateway's tool gave no sign of it.
sync_env_clockarms the gateway's clock with itstimezone(set_time's new optionaltime_zone).Clockkeeps the zone for that arm: a re-arm names its own zone or none, and a clear drops it. It shows the zone in/clock/stateand refuses an unknown name (400).get_timeanswers withtime_zoneandlocal_timein that zone when the agent asks for no other. Atime_zoneargument still picks another zone. With no zone armed it answers as before.time_zoneandlocal_timewhen the user's time zone is known, the same instant on their clock, for telling them the time in their own terms. It says nothing about how the environment was set up. Tool dates stay UTC, as before.set_timerequest liststime_zone.get_timewill answer agents in UTC alone and that the gateway env needs putting again, and recordsget_time_zonein its clock configuration. It doesn't fail: a store keeps its gateway env's image until it's put again, and tasks with a zone ran on such gateways before this change.Testing
sync_env_clock's arm body carriestime_zone, with an unzoned arm unchanged;tst/unit/task_step,tst/unit/env/gatewayandtest_env.py: 4220 passed.ruff checkis clean.sync_env_clockarms Friday 17:30 inAmerica/Denver, and the deployed gateway'sget_time, asked with no argument, answers{"current_time": "2027-02-06T00:30:00Z", "time_zone": "America/Denver", "local_time": "2027-02-05T17:30:00-07:00"}. The test passes.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issue was found.Summary
get_timenow includes the zone set bysync_env_clockand the matching local time. An explicittime_zonestill overrides it.Reviews (5) · Last reviewed commit: "fix(gateway): get_time says when your us..." · Reviewed by Greptile