Skip to content

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
mainfrom
edgararakelyan/get-time-in-the-universes-zone
Open

earakely-scale wants to merge 3 commits into
mainfrom
edgararakelyan/get-time-in-the-universes-zone

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

get_time now answers in the universe's time zone, the one sync_env_clock's timezone arms the clock in, as well as in UTC.

Before, the gateway's get_time answered in UTC alone unless the agent passed a time_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:

  • called get_time with no zone and got 00:32Z;
  • took that for Nora's time;
  • scheduled its "morning" check 7 hours on, telling her "I set a check for 7:32 AM UTC";
  • so the check fired at 00:32 in Denver.

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_clock arms the gateway's clock with its timezone (set_time's new optional time_zone).
  • The gateway's Clock keeps 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/state and refuses an unknown name (400).
  • get_time answers with time_zone and local_time in that zone when the agent asks for no other. A time_zone argument still picks another zone. With no zone armed it answers as before.
  • Its description says the result also has time_zone and local_time when 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.
  • The card's set_time request lists time_zone.
  • An older gateway image answers the arm without keeping the zone. The step then logs a warning that get_time will answer agents in UTC alone and that the gateway env needs putting again, and records get_time_zone in 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

  • New unit tests, each failing without the change:
    • a clock armed in a zone answers in it with no argument, and in another zone when asked;
    • the arm route takes the zone, its state shows it, and a re-arm or a clear drops it;
    • an unknown zone is refused;
    • sync_env_clock's arm body carries time_zone, with an unzoned arm unchanged;
    • a gateway that didn't keep the zone is named in a warning and the record, and the step goes on;
    • the description test's new wording.
  • tst/unit/task_step, tst/unit/env/gateway and test_env.py: 4220 passed. ruff check is clean.
  • End to end, the FD-5483 pilot's no-model test on an x86 host (local Docker), with this branch installed and the gateway image built from it. sync_env_clock arms Friday 17:30 in America/Denver, and the deployed gateway's get_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

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new blocking issue was found.

Summary

get_time now includes the zone set by sync_env_clock and the matching local time. An explicit time_zone still overrides it.

  • Gateway time answers now include the task's local clock by default.

Reviews (5) · Last reviewed commit: "fix(gateway): get_time says when your us..." · Reviewed by Greptile

…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>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 16, 2026 00:16
…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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant