claude-code - 💡(How to fix) Fix Feature request: Expose Epoch companion output programmatically (hooks / file / event) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45401Fetched 2026-04-09 08:06:16
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

The Epoch companion (the turtle that comments in the speech bubble) often raises useful observations — security concerns, edge cases, second opinions on code changes. Currently, these are visual-only: the user sees them but they don't enter the conversation context unless manually copy-pasted.

Request: Expose Epoch's comments programmatically so they can be captured and injected into the agentic loop.

Root Cause

Epoch is positioned as a "watcher" — but a watcher whose observations are only visual is an incomplete feedback loop. Making its output programmatic would:

  • Enable automated review workflows (Epoch flags concern → Claude addresses it)
  • Create audit trails of what Epoch observed during a session
  • Allow hooks to route Epoch observations to external systems (Slack, logs)
  • Make the companion genuinely agentic instead of decorative
RAW_BUFFERClick to expand / collapse

Summary

The Epoch companion (the turtle that comments in the speech bubble) often raises useful observations — security concerns, edge cases, second opinions on code changes. Currently, these are visual-only: the user sees them but they don't enter the conversation context unless manually copy-pasted.

Request: Expose Epoch's comments programmatically so they can be captured and injected into the agentic loop.

Use case

In our workflow, Epoch frequently catches things that would benefit from Claude acting on them directly — e.g., "could this cause email spam?" during a code change. Today the user has to read Epoch's bubble, copy the text, and paste it as a new message. This breaks flow, especially in fast-paced sessions.

If Epoch's output were accessible, it could serve as an automatic "second reviewer" whose observations feed back into the conversation without manual intervention.

Proposed approaches (any of these would work)

  1. Hook event OnEpochComment — fires when Epoch generates a comment, with the comment text available to the hook. The hook could inject it into context via user-prompt-submit or similar.

  2. File output — Epoch writes its latest comment to a known path (e.g., ~/.claude/projects/.../epoch-latest.json with { timestamp, comment, context }). A user-prompt-submit hook could read and inject it.

  3. System prompt injection — Epoch's comment is automatically appended to the next user message as a <epoch-observation> tag, similar to how <system-reminder> works today.

  4. Session JSONL integration — Epoch's comments are logged in the session file alongside tool calls and messages, making them retrievable for post-session analysis.

Why this matters

Epoch is positioned as a "watcher" — but a watcher whose observations are only visual is an incomplete feedback loop. Making its output programmatic would:

  • Enable automated review workflows (Epoch flags concern → Claude addresses it)
  • Create audit trails of what Epoch observed during a session
  • Allow hooks to route Epoch observations to external systems (Slack, logs)
  • Make the companion genuinely agentic instead of decorative

Environment

  • Claude Code CLI + Desktop (Windows 11)
  • Opus 4.6 with hooks and custom skills

extent analysis

TL;DR

Implementing an OnEpochComment hook to capture and inject Epoch's comments into the conversation context is the most likely fix.

Guidance

  • Investigate the feasibility of implementing an OnEpochComment hook, as proposed in the issue, to fire when Epoch generates a comment and make the comment text available for injection into the context.
  • Consider the file output approach as a potential alternative, where Epoch writes its latest comment to a known path, and a user-prompt-submit hook reads and injects it into the conversation.
  • Evaluate the system prompt injection method, where Epoch's comment is automatically appended to the next user message as a <epoch-observation> tag, for its potential to streamline the process.
  • Assess the session JSONL integration approach for its potential to log Epoch's comments alongside tool calls and messages, enabling post-session analysis and automated review workflows.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The choice of approach depends on the specific requirements and constraints of the project, including the existing infrastructure and the desired level of automation.

Recommendation

Apply a workaround by implementing the OnEpochComment hook, as it seems to be the most direct and efficient way to expose Epoch's comments programmatically and integrate them into the conversation context.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING