Skip to content

feat(agents): inject current date into prompt context - #774

Open
shunk031 wants to merge 2 commits into
mainfrom
feat/agent-date-hooks
Open

shunk031 wants to merge 2 commits into
mainfrom
feat/agent-date-hooks

Conversation

@shunk031

@shunk031 shunk031 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Motivation

Make the current local date and time available to both agent workflows at prompt submission time, so progress reports can use a fresh timestamp.

Changes

  • Add a shared ~/.agents/date_context.py hook that emits the local timestamp in ISO 8601 format.
  • Wire the hook into Claude Code's UserPromptSubmit event.
  • Add the chezmoi symlink template for the shared hook.

Testing

  • make setup
  • Hook output smoke check for the event name, ISO 8601 timestamp, and first-prompt start-time guidance
  • JSON parsing
  • Python syntax and AST checks
  • git diff --check
  • chezmoi source mapping validation

Co-authored-by: Codex <noreply@openai.com>
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.22%. Comparing base (58fcdfe) to head (aa15274).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #774      +/-   ##
==========================================
+ Coverage   80.86%   81.22%   +0.35%     
==========================================
  Files          25       25              
  Lines        1113     1113              
==========================================
+ Hits          900      904       +4     
+ Misses        213      209       -4     
Flag Coverage Δ
macos 41.66% <ø> (ø)
rockylinux 80.63% <ø> (-0.35%) ⬇️
ubuntu 79.87% <ø> (+1.00%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: Codex <noreply@openai.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