Skip to content

feat(task_step): wake and delivered lines are labelled in the task's time zone - #723

Merged
earakely-scale merged 3 commits into
mainfrom
edgararakelyan/wake-lines-in-the-tasks-zone
Nov 16, 2026
Merged

earakely-scale merged 3 commits into
mainfrom
edgararakelyan/wake-lines-in-the-tasks-zone

Conversation

@earakely-scale

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

Copy link
Copy Markdown
Collaborator

Part of FD-5419.

Why

The lines an agent receives between turns were always labelled in UTC: the user's messages in always_on, what came due on notifications/v1, and the hook's scheduled person messages. In the weekend-away task (HB1.12, run agent-jr2tl2un), Nora lives in Denver.

  • Her first message reached the agent as [Sat Feb 6, 12:30 AM UTC] Nora: …, although for her it was Friday at 5:30 PM, and the computer's screen, set to Denver, showed Friday evening.
  • The agent then wrote to her in UTC: "I checked the trip at about 6:33 AM UTC".

UTC was chosen to match get_time and schedule_check. get_time now answers in the universe's zone too (#702), and schedule_check takes any offset, so a zone that names itself is just as unambiguous.

What changes

  • label_time(at, zone="UTC") labels in an IANA zone and names it: Fri Feb 5, 5:30 PM MST in standard time, MDT in daylight time. A zone with no abbreviation is named by its offset (UTC-03). With the default, the output is the same as before.
  • Which zone:
    • always_on passes its task zone (self.zone): the user sim's zone, else the one sync_env_clock gave the world.
    • prompt_agent passes its user sim's zone when it has a built-in one, else the one zone sync_env_clock gave the world (labels_zone). Each env's latest arm counts, so a re-arm in another zone wins, and a rate change (set_env_clock_rate) keeps the zone. Several zones, or none, means UTC.
    • The advance-to-next-event hook labels the person's messages in the zone the env clock was armed in, so they agree with what prompt_agent delivers beside them.
    • The judge's wake-by-wake summary (render_for_judge) reads the zone the run's record keeps, which survives a timeline cut to its tail.
  • Docs: the module docstring and the hook's README.

A task with no zone reads exactly as before, and that includes both integration tests.

Tests

  • New:
    • the label in standard time, daylight time, a zone named by its offset, and UTC;
    • the zone rule (one zone, none, several);
    • prompt_agent labelling in the zone sync_env_clock set, and in UTC without one;
    • the hook labelling the person's messages in the clock's zone.
  • Updated: the always_on unit tests' expected labels, whose test user lives in New York, and two opening-files tests, whose user lives in Los Angeles. The labels were converted by script from the same instants.
  • tst/unit/task_step passes: 3213 tests.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with no outstanding findings.

Summary

Labels wake times and delivered messages in the task's time zone, with UTC as the fallback.

  • Delivered alerts now show times in the task's zone.
  • Always-on conversations show timestamps in the task's time zone.
  • Hook-delivered person messages use the world's clock zone.

Reviews (5) · Last reviewed commit: "fix(task_step): a clock rate change keep..." · Reviewed by Greptile

…time zone

always_on, prompt_agent's delivered lines and the advance-to-next-event hook labelled every line in UTC, so a person
in Denver whose first message came at 5:30 PM on Friday reached the agent as "Sat Feb 6, 12:30 AM UTC", while the
computer's screen showed Friday evening. Lines now read in the task's zone and name it ("Fri Feb 5, 5:30 PM MST"):
the user sim's zone, else the one sync_env_clock gave the world, else UTC, as before.

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 22:05
…e's summary the run's own zone

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale merged commit 181b94a into main Nov 16, 2026
38 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/wake-lines-in-the-tasks-zone branch November 16, 2026 23:45
@earakely-scale

Copy link
Copy Markdown
Collaborator Author

For the docs site: wherever the docs show what an agent receives between turns (always_on, prompt_agent's notifications/v1 delivery, the advance-to-next-event hook), the time labels now read in the task's time zone and name it, for example [Fri Feb 5, 5:30 PM MST · your scheduled check]. The zone is the user sim's, else the one sync_env_clock set (each env's latest arm; a rate change keeps it). A task with no zone reads in UTC as before. get_time answers in UTC and the universe's zone, and schedule_check still returns UTC times.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant