Repository navigation
Conversation
agent-hook (folded runs with a count), agent-title (meaning changes only), agent-mark (from, to, held and the rule that fired) and agent-restore, at the quiet level. npm run diag -- --agent shows the timeline. No screen, title or conversation text is written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
… whys (#152) - agent-hook: a run of one state keeps folding across the model's thinking gaps (repeats at most every 30 s, a new line after a minute of silence); a 5 s quiet gap made nearly every signal a line of its own. - A failure kind outside Claude Code's own list is written as `other` (it is pty bytes). - agent-title `none` only once it has held 2 s: Codex's child titles between its spinners no longer write a none/working pair each. - At most 40 hook, title and mark lines per tab per 10 s; the next line says `dropped`, and diag.mjs shows it. - `why` lists only the rules noted in the last second: a busy tab used to keep every older rule alive in the list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
Owner
Author
|
Adversarial review, fixed in 1f685f7 (tests first, each failed on the old code):
Behaviour: no indicator rule changed (diff of Gates: typecheck, lint (0 errors), 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #152.
The diagnostics log (#140) now records the agent indicator, so a wrong mark like #151 (restored tabs showed Finished after a restart) can be read from
diag.jsonlrather than guessed. Quiet level, always on.What changed
core/renderer/lib/agentDiag.ts(new): the record, pure helpers plus the page's one instance.agent-hook: every OSC 777 prism-agent signal (id,state,kind). A run of the same state on a tab is folded: the first is written at once, the rest counted and written as one line withrepeatswhen the state changes, the tab closes, or after 5 s with no signal from it (tis the last repeat's). A turn of 40 tool calls is two lines.agent-title: the title's meaning (idle/working/starting/question/none), only when it changes, never the text and never each spinner frame.agent-mark: each move of a tab's mark (from,to,held,why,agent,restoredms when within a minute of a restore).whyis the rule that fired:hook <state>(, box on screen,, tab in front),spinner after <phase>,idle title after work (an Esc),title <state>,poll found/lost agent,screen read: question box,answer key, box gone,output scored working/output went quiet,stopped working while away,tab looked at,working again,agent gone,closed.agent-restore: a tab restored with an agent resume (id,cwd,resume: true).useAgentIndicator.ts:noteWhyat each decision point and one read-only effect that writes the moves. No rule changed (the gate e2e below all pass unchanged).diag.ts:record(k, fields)for a page's own record kinds;diagIpc.ts: main accepts the fouragent-*kinds from the page (and no otheragent-kind).termActivity.markResume(id, session, cwd?): logsagent-restore; App passes the folder.tools/diag.mjs:--agent(the timeline: agent lines, tab and shell crumbs, sessions, marks),--tab <id>;--alland--kindsshow them; the default problem view showsagent-mark/agent-restoreamong the context before a problem.--helpprints the whole header.docs/diagnostics.md(kinds table, a section on reading the marks),PRIVACY.md(one clause: the indicator's states, never screen, title or conversation text).Prism gets this too
This is a
core/change, so Prism gets the record when it takes this core. Nothing to wire beyond what #140 already needs (startDiagin the page): the hook and title lines and the marks come fromuseAgentIndicator. Optional: pass the tab's folder as the third argument ofmarkResumesoagent-restorecarriescwd(without it,cwdis null).Tests
agentDiag.test.ts(folding, the quiet sweep, kinds, the meaning-change filter, mark order and held marks, why freshness, restore, close) and apageLinecase for the new kinds.agentDiag(new): a shell stands in for Claude; reads the scenario profile'slogs\diag.jsonland asserts the hook sequence["working","workingx2","done","question","working","done"], the mark moves with their why (none>working: hook working,working>done: hook done,done>none: tab looked at,none>question: hook question,question>working: hook working, tab in front,working>none: hook done, tab in front), titles["idle","working","none"], and that a marker string on the screen and in the title never reaches the file.npm test110 files / 1571 tests, e2eagentHooks37/0,attention25/0,indicator12/0,indicatorStyles74/0,diagLog26/0,agentDiag12/0.🤖 Generated with Claude Code
https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t