Skip to content

feat: inject current time into goal judge prompt#26707

Closed
draplater wants to merge 1 commit into
NousResearch:mainfrom
draplater:feat/goal-judge-current-time
Closed

feat: inject current time into goal judge prompt#26707
draplater wants to merge 1 commit into
NousResearch:mainfrom
draplater:feat/goal-judge-current-time

Conversation

@draplater

Copy link
Copy Markdown
Contributor

Problem

The /goal judge model (used in Persistent Goals / Ralph loop) receives only:

  1. The goal text
  2. The agent's last response

It has no concept of the current time, making it unable to evaluate time-sensitive goals like "keep working until 5pm" — the judge doesn't know what time it is.

Fix

Adds Current time: {current_time} line to both judge prompt templates:

  • JUDGE_USER_PROMPT_TEMPLATE
  • JUDGE_USER_PROMPT_WITH_SUBGOALS_TEMPLATE

Time is computed in judge_goal() as:

current_time = datetime.now(tz=timezone.utc).astimezone().strftime("%Y-%m-%d %H:%M:%S %Z")

Changes

  • hermes_cli/goals.py: +6 lines (import + template format + time computation)
  • All existing tests pass (66/66)

The goal judge only receives the goal text and the agent's last
response. It has no concept of the current time, making it
impossible to evaluate time-sensitive goals like 'keep working
until 5pm'.

This commit adds 'Current time' to both JUDGE_USER_PROMPT_TEMPLATE
and JUDGE_USER_PROMPT_WITH_SUBGOALS_TEMPLATE, computed from
datetime.now().astimezone() at judge call time.
@draplater draplater force-pushed the feat/goal-judge-current-time branch from 21e9d79 to cebd96c Compare May 16, 2026 02:34
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent loop, run_agent.py, prompt builder labels May 16, 2026
teknium1 added a commit that referenced this pull request May 17, 2026
…tors

Adds release-note attribution mappings for 9 contributors from group 3:
- @darvsum (PR #26766)
- @hueilau (PR #26498)
- @Timur00Kh (PR #27114)
- @Grogger (PR #27061)
- @lemassykoi (PR #27042)
- @draplater (PR #26707)
- @pr7426 (PR #27048)
- @therahul-yo (PR #26215)
- @flamiinngo (PR #27205)

#27154 dropped from this batch — already landed on main as 4e9cedc.
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #27302 — your commit was cherry-picked onto current main as part of a batch salvage of low-risk new-contributor PRs. Authorship preserved (feat: inject current time into goal judge prompt). Thanks for the contribution.

@teknium1 teknium1 closed this May 17, 2026
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants