Skip to content

Emulo v0.6.4: the coach report says what it counted

Choose a tag to compare

@ohad6k ohad6k released this 24 Sep 22:50
· 36 commits to main since this release
cf49128

Fixed

  • --coach stated causes it cannot see. Every check is a text match on the messages you typed, yet 0.6.3 printed the reason as fact: three identical sends meant "the model had already given everything that prompt could get", a message saying "as I said" meant you "re-explain things the agent was already told" and "paid for twice", a reword run "usually means the first one was missing a constraint", and a correction rate was "high enough to point at the opening prompt rather than the model". None of that is in the text. Found in a review that checked each claim the report prints against what the code measures. Titles and meanings now say what was counted ("Messages that say you already said it") and offer the fix as a possibility ("If the agent had lost it, stating it once in a profile or rules file saves retyping it"). The report says once, under its header, that these are text matches that cannot tell why you repeated something or whether the agent forgot anything, and that each finding shows its receipts so you can judge. Each finding's key and the --json shape are unchanged.
  • A phrase inside quoted or pasted text counted as you restating context. An email you were answering ("> like I said last week") or a paragraph you asked to have proofread ("As I said in the last update...") read as you repeating yourself. Fenced code blocks, lines starting with >, and double-quoted spans, straight or curly, are now masked before the restated-context phrases and the correction openers are matched, and a receipt is windowed on the phrase that was counted rather than on an earlier quoted copy. A genuine "as I said, use pnpm not npm" still counts. One deliberate side effect: a correction written after a quoted line now counts, because the first words you wrote yourself are a correction. A paste with no quote marks at all still counts, since nothing in the text tells it apart from your own words.
  • The browser scan at /scan carried the same claims. It runs its own port of --coach, so it gets the same titles and meanings, the same text-match line under the result, and the same quoting rule. Its intro no longer says you "re-explained context", and its search description no longer promises to find "lost context".
  • The README said --coach finishes in seconds. It now says it takes about a minute on a big history, and describes the checks as text matches.

Verified

  • 19 new tests in tests/test_usage_report.py: ten for the quoting rule (pasted paragraph, curly quotes, fenced block, quoted email line, a quoted line after the first line of a message, a long paste of unclosed curly quotes that must stay fast, a genuine "as I said", a genuine phrase next to a quote, a receipt that must window on the counted copy when the same phrase also sits inside the quote, a correction after a quoted line), one guard that a correction opener inside a quote still does not count (openers only match at the start of a message, so it passed before this change and is not evidence for the masking), four for the wording (no cause stated as fact, no dashes, keys unchanged, every check fires on the fixture), two for the printed report (the text-match line appears exactly once, --json keeps every key), and two for history edge cases. With HOME, USERPROFILE, CODEX_HOME and XDG_DATA_HOME all pointed at an empty directory, --coach and --coach --json exit 1 with the existing "no session logs found" message, name every path they looked in, and write nothing. A single Claude Code session with three messages produces a readable report and valid JSON.
  • Against one real history (1,394 sessions, 5,701 messages), restated-context matches went from 71 to 66. All five dropped matches were pasted or generated text rather than something typed: two of Emulo's own mining chunks sent through Claude Code, an agent-written design brief, a message between agent sessions, and a notes digest. Repeat sends (11) and corrections (79, 1%) did not change. A run takes about a minute over roughly 1,400 sessions on one Windows machine (three runs: 54 to 71 s), and each run left the directory it ran from empty.
  • Not fixed, found by the same run: 10 of the remaining 66 matches sit inside those mining chunks, which reach --coach as if they were typed. That is an unmarked paste the quoting rule cannot see.
  • A review before release timed the quoting rule on adversarial input and found one slow path: an opening curly quote with no closing one made the match scan to the end of the message once per quote. German-style pastes close with U+201C, so a 400k-character one took 12.7 s in Python and froze the browser scan for 11 s. The pattern now stops at the next opening quote, and both implementations have a timing test that fails on the old pattern. The same review found that nothing tested a > line after the first line of a message; both now do.
  • Full suite on Python 3.11 with the [pro] extra: 544 tests, 5 skipped, 0 failures. On Python 3.13 without cryptography: 522 tests, 13 skipped, 0 failures. On Windows the symlink tests skip, and the two release pin tests skip until the v0.6.4 tag exists.
  • Site tests after a clean npm ci: 39 tests, 0 failures, including a new parity case where the browser scan and emulo.py must produce the identical report for quoted, fenced, curly-quoted and > text. On the same nine-message fixture, the page drove through its real folder-picker path now shows "Messages that say you already said it. 3 messages" where it showed "You re-explain things the agent was already told. 6 messages": the three markers it no longer counts were all inside quoted or pasted text.
  • The v0.6.4 bootstrap runtime pins emulo.py to SHA-256 9006632a609e8f48 (prefix); MINING_PROMPT.md is unchanged at ee22077c2cda3c1c (prefix). Full digests in .agents/skills/emulo/runtime.json.
  • Not verified: Python 3.8, because no 3.8 interpreter is installed on the release machine, and pip install emulo==0.6.4 from PyPI, because the version is not published at the time of writing.