Skip to content

fix(harness): expires_in_ms replacing expires_at in agent guidance - #952

Closed
anthonyiscoding wants to merge 1 commit into
feat/agent-terminal-workersfrom
fix/lifecycle-prefer-duration
Closed

fix(harness): expires_in_ms replacing expires_at in agent guidance#952
anthonyiscoding wants to merge 1 commit into
feat/agent-terminal-workersfrom
fix/lifecycle-prefer-duration

Conversation

@anthonyiscoding

Copy link
Copy Markdown
Contributor

lifecycle.expires_in_ms exists (added on the base branch), but every piece of text a model reads before making the call still said expires_at:

  • prompts/default.txt — the lifecycle line under "Optional, on either shape"
  • the unbounded-cron warning — "a bounded run sets lifecycle { max_fires | expires_at }"
  • the standing-binding note — "give a standing binding a lifecycle bound ({ max_fires | expires_at })"
  • the one-shot-wake note — "Set lifecycle { expires_at: <epoch ms> }"

A model copies the shape it is shown, so it kept sending an absolute epoch. An agent has no clock, so that value is a remembered date — five months stale in the report that prompted this:

harness/invalid_request: `lifecycle.expires_at` must be in the future:
1774738800000 is not after 1787778411587 (epoch ms, now).

1774738800000 is 2026-03-28; now was 2026-08-26.

What changes

All four now name expires_in_ms. The prompt keeps one sentence on the absolute form — it is still accepted, and anyone reading a stored binding will meet it — but says why not to reach for it: you do not know what time it is.

No logic changes. expires_at still works, and the seconds rescue and clock-aware refusal on the base branch are untouched.

Base

Stacked on feat/agent-terminal-workers, which is where expires_in_ms is introduced (PR #937). Retarget to main once that lands, or merge them in order.

Checks

cargo test --lib in harness/: 441 pass. One advisory test now asserts the note names expires_in_ms and no longer names expires_at.

🤖 Generated with Claude Code

`lifecycle.expires_in_ms` exists, but every piece of text around the call still
said `expires_at`: the prompt's lifecycle line, the unbounded-cron warning, the
standing-binding note, and the one-shot-wake note. A model copies the shape it
is shown, so it kept sending an absolute epoch — and an agent has no clock, so
the value is a remembered date, five months stale in the report that prompted
this, and refused every time.

All four now name `expires_in_ms`. The prompt keeps one sentence on the absolute
form, because it is still accepted and someone reading a stored binding will see
it — but it says why not to reach for it: you do not know what time it is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Aug 26, 2026 9:15pm
workers-tech-spec Ready Ready Preview Aug 26, 2026 9:15pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e9c1fdc-6d27-4c54-b4d6-33a2436e72f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 68 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@anthonyiscoding
anthonyiscoding marked this pull request as ready for review August 26, 2026 21:26
@anthonyiscoding anthonyiscoding changed the title fix(harness): guidance names the deadline a caller can get right fix(harness): expires_in_ms replacing expires_at in agent guidance Aug 26, 2026
@anthonyiscoding
anthonyiscoding deleted the fix/lifecycle-prefer-duration branch August 26, 2026 21:36
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.

2 participants