Version
LifeOS 7.40.4. Same code on main today (Tools/Anthropic.ts, 1021 lines).
What is broken
Anthropic.ts prints its report only to stdout and saves State/last-check.json at the end of every successful run. So the report exists exactly once. If the output gets cut (an agent piping it through tail, a terminal scrollback limit, a tool-output size cap), the delta is gone, and a second run reports nothing because the state has already moved on.
The argument parser makes this easy to hit. It reads the first non--- argument as the day count and checks only for --force. Any other flag, --help included, is ignored and a full scan runs, which saves the state.
We lost the delta this way on two runs in a row and had to rebuild it from the previous state file in git.
Where (file:line)
LifeOS/install/skills/Upgrade/Tools/Anthropic.ts:94-97 (argv: day count and --force only)
LifeOS/install/skills/Upgrade/Tools/Anthropic.ts:1011 (saveState after the report is printed to stdout)
Suggested fix
- Write every report to a file as well, for example
Logs/report-<timestamp>.md, and print its path at the end. The run history in Logs/run-history.jsonl already records counts, so the report next to it fits.
- Make
--help print usage and exit without fetching or saving state. Reject unknown flags the same way.
Optional: a --no-save flag for a dry run that leaves the state untouched.
This overlaps with the rewrite announced in #2227 (pagination and the import.meta.main guard), so it may be easiest to fold in there.
Version
LifeOS 7.40.4. Same code on
maintoday (Tools/Anthropic.ts, 1021 lines).What is broken
Anthropic.tsprints its report only to stdout and savesState/last-check.jsonat the end of every successful run. So the report exists exactly once. If the output gets cut (an agent piping it throughtail, a terminal scrollback limit, a tool-output size cap), the delta is gone, and a second run reports nothing because the state has already moved on.The argument parser makes this easy to hit. It reads the first non-
--argument as the day count and checks only for--force. Any other flag,--helpincluded, is ignored and a full scan runs, which saves the state.We lost the delta this way on two runs in a row and had to rebuild it from the previous state file in git.
Where (file:line)
LifeOS/install/skills/Upgrade/Tools/Anthropic.ts:94-97(argv: day count and--forceonly)LifeOS/install/skills/Upgrade/Tools/Anthropic.ts:1011(saveStateafter the report is printed to stdout)Suggested fix
Logs/report-<timestamp>.md, and print its path at the end. The run history inLogs/run-history.jsonlalready records counts, so the report next to it fits.--helpprint usage and exit without fetching or saving state. Reject unknown flags the same way.Optional: a
--no-saveflag for a dry run that leaves the state untouched.This overlaps with the rewrite announced in #2227 (pagination and the
import.meta.mainguard), so it may be easiest to fold in there.