@giladbarnea/pi-time-sense

Give Pi agents ongoing sense of time.

Packages

Package details

extension

Install @giladbarnea/pi-time-sense from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@giladbarnea/pi-time-sense
Package
@giladbarnea/pi-time-sense
Version
1.0.4
Published
Jul 15, 2026
Downloads
701/mo · 701/wk
Author
giladbarnea
License
MIT
Types
extension
Size
10.5 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-time-sense

Long-running agents lose track of time.

pi-time-sense quietly gives your Pi agent temporal awareness.

  • ✔︎ Cache-friendly
  • ✔︎ Behind the scenes; non-disruptive
  • ✔︎ Tactful: injects the current time at a configurable cadence

I wanted the equivalent of the agent glancing at a wristwatch.

Install

pi install npm:@giladbarnea/pi-time-sense

No configuration is required.

Configure

The default interval is 15 minutes.

Run /time-sense to change it. Or edit ~/.pi/agent/pi-time-sense.json:

{
  "intervalMinutes": 5,
  "slashTimeSenseSettings": true
}

slashTimeSenseSettings controls whether /time-sense is available. It defaults to true.

Changes made with /time-sense apply immediately. After editing the file, run /reload.

What it does

  • Adds a small, hidden timestamp only in response to session activity
  • Never wakes an idle agent or starts a turn of its own
<current-time>Mon 2026-07-13 07:05:13 GMT+3 (session +18m4s)</current-time>

How it works

pi-time-sense looks for three opportunities to add the current time:

  • You send a message
  • A tool call finishes
  • A run fully settles

Why "at most"?

pi-time-sense is opportunistic. The configured interval sets its cadence, not an alarm.

It hitchhikes on activity already happening in the session.

If the agent does nothing, pi-time-sense does nothing.

Technically, each timestamp is:

  • Persisted at the end of the transcript
  • Visible to the agent ("sensed" by it 🙂)
  • Hidden from the UI

Cache-friendly

Because pi-time-sense only appends, the existing prompt prefix remains cacheable. Cache works as usual.