Repository navigation
fix(agent-poll): forced looks and a failing query no longer launch PowerShell nonstop (core 0.41.1) - #238
Merged
Conversation
…werShell nonstop (core 0.41.1) Perf review 2026-10-16 (research\prism-terminal\2026-10-16-perf-review.md), the worst finding and two small ones: - Every title frame and hook signal of an agent the poll had not reported forced a PowerShell + CIM query. A Claude the poll can never see (under WSL or SSH) therefore kept queries running back to back while it worked, half to a whole core. The page now asks at most once in 15 s per tab, and main holds forced looks 5 s apart (AGENT_FORCE_GAP). - A query that always fails (WMI broken, AppLocker, Constrained Language) launched PowerShell every 2.5 s for the app's life. Failures now back off, doubling from 5 s to a minute (AGENT_FAIL_MAX), forced looks included, and the third in a row writes `agent-poll-failing` to the diagnostics log. - A pointer moving over the unfocused window re-rendered App twice a second; it now does only when the tab in front has a Finished or Failed mark to take down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 16, 2026
…werShell nonstop (core 0.41.1) (#238) Perf review 2026-10-16 (research\prism-terminal\2026-10-16-perf-review.md), the worst finding and two small ones: - Every title frame and hook signal of an agent the poll had not reported forced a PowerShell + CIM query. A Claude the poll can never see (under WSL or SSH) therefore kept queries running back to back while it worked, half to a whole core. The page now asks at most once in 15 s per tab, and main holds forced looks 5 s apart (AGENT_FORCE_GAP). - A query that always fails (WMI broken, AppLocker, Constrained Language) launched PowerShell every 2.5 s for the app's life. Failures now back off, doubling from 5 s to a minute (AGENT_FAIL_MAX), forced looks included, and the third in a row writes `agent-poll-failing` to the diagnostics log. - A pointer moving over the unfocused window re-rendered App twice a second; it now does only when the tab in front has a Finished or Failed mark to take down. Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Maxaubert
added a commit
that referenced
this pull request
Oct 16, 2026
…(core 0.41.6) (#243) * fix(indicator): a short-lived Claude no longer leaves its tab marked (core 0.41.6) The agent mark goes up on Claude's title and only the process poll takes it back. Since #238 spaced the forced looks, a Claude that lived a few seconds could come and go between two looks: the poll's "no agent" was unchanged, so never sent, and the mark stayed. Prism's full e2e caught it ("claude leaving clears the detection", core 0.41.2, twice). When the title stops naming an agent only the title vouched for, or the prompt comes back after one, the poll is now asked for its answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA * fix(indicator): only the title's end asks the poll again, not the prompt MEASURED (Claude Code 2.1.301, 2026-10-16): quitting, Claude writes an empty title and ConPTY then restores the shell's, so a real exit always ends the title. Asking on the prompt too wiped the hook state of the e2e's stand-in agents (a pwsh prompt between steps): 4 agentHooks and indicator checks failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 16, 2026
…(core 0.41.6) (#243) * fix(indicator): a short-lived Claude no longer leaves its tab marked (core 0.41.6) The agent mark goes up on Claude's title and only the process poll takes it back. Since #238 spaced the forced looks, a Claude that lived a few seconds could come and go between two looks: the poll's "no agent" was unchanged, so never sent, and the mark stayed. Prism's full e2e caught it ("claude leaving clears the detection", core 0.41.2, twice). When the title stops naming an agent only the title vouched for, or the prompt comes back after one, the poll is now asked for its answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA * fix(indicator): only the title's end asks the poll again, not the prompt MEASURED (Claude Code 2.1.301, 2026-10-16): quitting, Claude writes an empty title and ConPTY then restores the shell's, so a real exit always ends the title. Asking on the prompt too wiped the hook state of the e2e's stand-in agents (a pwsh prompt between steps): 4 agentHooks and indicator checks failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
PR 1 of 3 from the performance review (owner, 2026-10-16: "do all"). Report:
research\prism-terminal\2026-10-16-perf-review.md.1. The worst finding: forced process queries with no limit (verified high)
Every title frame and every hook signal of an agent the poll had not reported called
termAgentLook, and main ran a fresh PowerShell + CIM query for each. A Claude the poll can never see (under WSL or SSH: its process is not in the Windows tree) therefore kept PowerShell queries running back to back while it worked, an estimated half to a whole core.askLookasks at most once in 15 s per tab (forgotten on close).AGENT_FORCE_GAP).2. A failing query never backed off (verified medium)
On a machine where the query always fails (WMI broken, AppLocker, Constrained Language) PowerShell ran every 2.5 s for the app's life. Failures now back off 5, 10, 20, 40 s, then a minute (
AGENT_FAIL_MAX), forced looks included; the third failure in a row writesagent-poll-failingto the diagnostics log. An answer resets it.3. Pointer moves re-rendered App twice a second (verified low)
Over the unfocused window, only when the tab in front has a Finished or Failed mark to take down.
Tests: 2 new poll tests (the failure backoff sequence and its reset; the forced-look gap), 2 updated for the gap. Unit 2184 pass. e2e
indicator,agentHooks(43),indicatorStyles,launchSkeleton,imagePaste: all pass.Core 0.41.0 -> 0.41.1, app 0.55.0 -> 0.55.1.
🤖 Generated with Claude Code
https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA