chronos AGENTS.md

Instructions that help an AI coding agent keep track of real time, session duration, recent events, and tool-use history. They use a ledger, meaning a chronological record of actions and their results.

In plain words
What is it for?
Use them to monitor elapsed time, inspect recent tool failures, detect stale files or processes, and keep a session's action history.
Why use it?
They help the agent notice stale information, avoid immediately repeating failed actions, and decide when to check time-related state. If no ledger exists, they specify a basic system-time fallback.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/othmanadi/chronos/agents-md
Clone the repo
git clone --depth 1 https://github.com/OthmanAdi/chronos

Made for: Codex, OpenCode.

Per session 577 This file is loaded in full into every session.
When invoked 577 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00577 $0.00577
Opus 5 $0.00289 $0.00289
Sonnet 5 $0.00115 $0.00115
Haiku 4.5 $0.00058 $0.00058

Measured 2d ago against content hash 83d32209b9d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

chronos AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

chronos — Time Awareness (AGENTS.md mirror)

This file mirrors SKILL.md for agents that load AGENTS.md instead of or in addition to skills (Codex, ADAL, OpenClaw, Hermes, PI-mono).

See SKILL.md for the full spec. Quick reference below.

You have a ledger (or you don't)

If hooks are installed on your platform (Claude Code, Codex, OpenCode-plugin), you'll see chronos baseline in your context at session start with:

  • now_utc, now_local, tz, ledger path, state path, session id

On every user turn:

  • now_utc, turn, session_duration, since_last_user

Tool-use ledger at ledger path is JSONL — one line per event:

  • PreToolUse: {tool_use_id, tool, args_hash, started_at, started_epoch}
  • PostToolUse: {tool_use_id, tool, finished_at, finished_epoch, duration_ms, success}

If not installed: use date -u + stat -c %Y as fallback. State it explicitly.

7 triggers — when to consult time

  1. Retry check. Same tool + args_hash failed < 60s ago → change strategy. 10min+ → re-run ok.
  2. Staleness check. git/processes > 5min, files > 1h or modified-since, memory > 7 days, API > 5min.
  3. Progress verbosity. < 5min terse, 5–30min paragraph, > 30min structured recap.
  4. Long-command degradation. Last 3 durations growing? Surface, don't wait silently.
  5. Idle-loop. since_last_user > 15min in autonomous mode → pause, summarize, ask.
  6. No vague time. Replace "just now" / "a moment" with concrete delta from ledger.
  7. Date questions. Read SessionStart baseline if fresh, else date -u.

Read the ledger

# last 10 min of events
scripts/ledger_read.sh --since 10m

# last 3 Bash runs
scripts/ledger_read.sh --tool Bash | tail -n 6

# specific args_hash
scripts/ledger_read.sh --tool Bash --args-hash abc123 --last

Failure modes

  • Don't count turns for elapsed time — use wall clock.
  • Don't trust your own "just now" from earlier in context.
  • Don't hang silently in autonomous mode.
  • If no ledger: say so, use shell fallback.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 52 lines · 577 tokens per session scan A 83d32209b9d8

Subscribe to this mod's changes

chronos AGENTS.md is an instructions file published in the GitHub repository OthmanAdi/chronos (3 stars, last pushed 29d ago), licensed MIT. It adds 577 tokens to every session, about $0.0029 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.