Context / regression
Quiet hours should not be a control-plane policy that silently withholds or delays agent actions. Per the tool-use principles we want the agent to see the relevant runtime facts and make/justify the decision, not have a background subsystem enforce user-contact policy invisibly.
The current direction is fragmented:
- Closed, not merged / should not be revived as-is
- Open time-awareness work to salvage / consolidate
- Open caching regressions related to this work
Goal
Move from control-plane quiet-hours enforcement to agent-visible, timezone-aware tool context:
- Fix the caching regression(s).
- Give the agent reliable current time + user timezone context on every turn and on relevant tool calls.
- For time-sensitive tools (email, calendars, agent mailbox, send/wait/scheduler-style tools, future autonomy/watch tools), surface a clear advisory when the action appears outside the user's normal contact window — but do not block or delay it in the control plane.
Proposed design
1. Stable prompt cache, live time outside the cached system prompt
- Keep the cached system prompt byte-stable across turns.
- Replace the ambiguous
Conversation started: mental model with a stable session-start anchor only.
- Inject volatile time context through the existing ephemeral user-message context path, e.g.
Runtime time context:
- Current time: 2026-04-29 08:34:12 America/Los_Angeles (UTC-07:00)
- User timezone: America/Los_Angeles
- Session started: 2026-04-29 08:00:02 America/Los_Angeles
2. Tool-runtime time advisory, not enforcement
Add a small shared helper/context object available to tool handlers, for example:
ToolRuntimeTimeContext(
now=<aware datetime>,
user_timezone="America/Los_Angeles",
contact_window=("08:00", "23:00"),
within_contact_window=True | False,
advisory="It is 02:14 in the user's timezone; this may be outside their normal contact window. Ask/consider deferring unless urgent."
)
Tools may include this in their returned JSON/result text when relevant. The control plane must not silently suppress, defer, or rewrite the action.
Examples:
wait / process.wait / future agent-mailbox wait:
- Return current local time and deadline/elapsed-time interpretation.
- If waiting would cross the user's normal contact window, warn the agent.
- Email/calendar/mailbox tools:
- Include
current_time, user_timezone, and contact_window_advisory in reads/searches and before sends/creates where relevant.
send_message / proactive delivery paths:
- Warn if sending outside the window; do not block. The agent can explicitly say why it is sending now or choose to schedule/defer.
3. Remove/avoid control-plane quiet-hours semantics
- No core gateway/scheduler/autonomy subsystem should silently hold messages merely because of quiet hours.
- If a subsystem keeps a user-configured contact window, it should expose that as agent context/advisory only.
- Any future hard block must be a separate, explicit user-configured safety setting with visible tool feedback, not the default quiet-hours behavior.
Implementation slices
-
Immediate cache correctness
-
Core time context consolidation
-
Tool runtime advisory helper
- Add a shared helper for aware
now, resolved user timezone, configurable advisory window, and advisory text.
- Wire it into time-sensitive tools first: wait/process-wait, email/calendar/agent-mailbox if present, send/proactive-delivery surfaces.
- Ensure tool output is advisory and visible to the model.
-
Docs / principles alignment
- Document: "time policy is surfaced to the agent; control plane does not silently enforce quiet hours."
- Add tests that verify no quiet-hours path silently suppresses delivery/action without returning an advisory to the agent.
Acceptance criteria
Non-goals
- Building a full policy engine.
- Adding a broad autonomy control plane.
- Hard-blocking sends/actions outside contact windows by default.
- Moving volatile time data into the system prompt.
Suggested priority
P1. This blocks reliable gateway use because caching/schema pollution is already user-visible (#17335), and the quiet-hours direction is an architectural regression if it lands as hidden control-plane enforcement.
Context / regression
Quiet hours should not be a control-plane policy that silently withholds or delays agent actions. Per the tool-use principles we want the agent to see the relevant runtime facts and make/justify the decision, not have a background subsystem enforce user-contact policy invisibly.
The current direction is fragmented:
feat: Add profile-scoped gateway autonomy runtimeintroduced gateway autonomy with quiet-hours controls in the control plane. It is closed and unmerged; do not resurrect the quiet-hours enforcement shape.feat: drain Ockham outbox notifications via Hermes schedulerwas closed and unmerged; it explicitly held approvals/digests during quiet hours. That is the wrong semantic for Hermes core unless the agent is told and chooses deferral.Current time+ timezone into the user-message/ephemeral context path, preserving prompt-cache stability.get_tool_definitions()quiet-mode cache pollution causes duplicate LCM schemas in Gateway. This should be treated as an immediate bug fix._build_system_promptinvalidate prompt caching for upstream inference servers? #15866/perf: system prompt timestamp changes after compression, invalidating prefix cache on local LLM backends #8687/perf: stabilize system prompt timestamp across compression cycles #8689/feat(caching): multi-block system prompt with tiered TTLs (v2) #5713: system-prompt timestamp / prompt-cache invalidation concerns. The durable direction is stable cached system prompt + volatile current-time context in user-message/tool-runtime context.Goal
Move from control-plane quiet-hours enforcement to agent-visible, timezone-aware tool context:
Proposed design
1. Stable prompt cache, live time outside the cached system prompt
Conversation started:mental model with a stable session-start anchor only.2. Tool-runtime time advisory, not enforcement
Add a small shared helper/context object available to tool handlers, for example:
Tools may include this in their returned JSON/result text when relevant. The control plane must not silently suppress, defer, or rewrite the action.
Examples:
wait/process.wait/ future agent-mailbox wait:current_time,user_timezone, andcontact_window_advisoryin reads/searches and before sends/creates where relevant.send_message/ proactive delivery paths:3. Remove/avoid control-plane quiet-hours semantics
Implementation slices
Immediate cache correctness
Core time context consolidation
Current time:is not in_build_system_prompt().Tool runtime advisory helper
now, resolved user timezone, configurable advisory window, and advisory text.Docs / principles alignment
Acceptance criteria
get_tool_definitions(quiet_mode=True)cache pollution is fixed; repeated Gateway agents do not accumulate duplicate tool schemas.Non-goals
Suggested priority
P1. This blocks reliable gateway use because caching/schema pollution is already user-visible (#17335), and the quiet-hours direction is an architectural regression if it lands as hidden control-plane enforcement.