Skip to content

TD-5230: the packaged app's ring and cursors survive the helper's slow start - #116

Merged
captcrock merged 1 commit into
mainfrom
td/5230-overlay-startup
Nov 3, 2026
Merged

captcrock merged 1 commit into
mainfrom
td/5230-overlay-startup

Conversation

@captcrock

Copy link
Copy Markdown
Contributor

What

In the packaged Mac app the overlay helper is the frozen tstd --cu-overlay, which unpacks itself before Python starts. Its first ack took 2.4 to 5.4 s on a Mac, but the sidecar waited 1 s and then switched the overlay off for the rest of the process. So the packaged app often had no ring and no agent cursor at all; the source build never shows this because its helper starts in well under a second.

  • The first command after a spawn is a hide probe allowed 15 s; later commands keep the 1 s budget, and any failure still degrades quietly.
  • The server starts the helper in a background thread at launch, so the agent's first action rarely waits.
  • Server test children run with TST_CU_MCP_OVERLAY=0, so no test opens windows now that the server starts the helper at launch.

Found in the TD-5227 live check on the packaged build: an episode opened right after the sidecar started took 1.46 s and left no helper running. DECISIONS.md entry added.

Tests

  • New: a slow first ack is waited out (fails with the old 1 s budget, checked), prewarm spawns once, a failed prewarm degrades. Painter tests updated for the probe.
  • tst-cu-mcp on macOS: 662 passed; the 3 failures (DarwinBackend has no hit_test) fail the same on main. mypy: the same 4 errors as main.
  • Live: the new code drove the packaged helper through a 5.4 s cold start and lit the ring on the targeted display.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HUthoCdmzg2hy89ssk2cSF

…w start

In the packaged Mac app the overlay helper is the frozen tstd, which unpacks
itself before Python starts; its first ack took 2.4 to 5.4 s on a Mac. The
sidecar waited 1 s and then switched the overlay off for the life of the
process, so the packaged app often showed no ring and no agent cursor at
all. The source build's helper starts in well under a second, which is why
only the packaged app showed it. Found in the TD-5227 live check.

The first command after a spawn is now a hide probe allowed 15 s; later
commands keep the 1 s budget. The server starts the helper in a background
thread at launch, so the agent's first action rarely waits. Test children
of the server run with the overlay off so no test opens windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HUthoCdmzg2hy89ssk2cSF
@captcrock
captcrock merged commit 35b073c into main Nov 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant