# Checking for new messages before waking Claude Code — retained record

> Retained reddit record from reddit:ClaudeCode.

Canonical: https://highsignal.app/data/records/f6571866112286ae

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:ClaudeCode)  published 2026-11-07 15:39 ingested 2026-11-08 02:39

[original source ↗](https://www.reddit.com/r/ClaudeCode/comments/1xq99ff/checking_for_new_messages_before_waking_claude/)

## retained text



```
My agents can wake on a routine or Slack event and re-read a long thread even when nothing changed. I built ctxlayer to put a small check before that model call.

Version 3.4.1 is a SQLite CLI/skill with one database file. `has-new` is an exit-code gate the runner checks before waking the LLM. If there's new material, `context --only-new` returns a thin slice. After processing it, `commit` advances that agent's read cursor. Each agent has its own cursor.

For Claude Code, the plugin install is:  
`claude plugin marketplace add Unmeshl/ctxlayer`  
`claude plugin install ctxlayer@ctxlayer`

Installing the plugin alone isn't the same as wiring the gate into your wake path. The runner needs to check it before calling the model.

It isn't an MCP server and doesn't enforce budgets. My savings measurement is scheduled for November 9–20; I don't have numbers to report yet.

Repo: [github.com/Unmeshl/ctxlayer](https://github.com/Unmeshl/ctxlayer)

Where would you put this check in your Claude Code workflow, and what could make it skip work it should have seen?
```



document fetched 2026-11-08 00:32 · canonical https://reddit.com/r/ClaudeCode/comments/1xq99ff/checking_for_new_messages_before_waking_claude
