perf(open): Cut the fixed delays before the harness starts - #104
Merged
Merged
Conversation
Keep the resolving logo within a 200 ms launch budget without changing the final banner. Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex
Resolve Claude from PATH without a version spawn and cache confirmed flag support by binary identity. Co-Authored-By: Codex <codex@openai.com>
Repeat ENOENT against the unchanged executable and cover unrelated probe errors. Co-Authored-By: Codex <codex@openai.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.



codedeck openspent about 950 ms before the harness started, and most of it was fixed waiting inside CodeDeck, not Claude Code:ensureDaemonStartedslept 200 ms before its first socket check, while the daemon accepts in 60 to 80 ms;claudetwice before the launch:whichplusclaude --versioninresolveBinary(78 ms, version unused) andclaude --append-system-prompt-fileinassertSupport(176 ms).Changes:
playBootderives its frame delay from a 200 ms budget (190 ms total). Same frames, same final banner, non-TTY path untouched.ensureDaemonStartedpolls every 25 ms until a 6 s deadline. Same error, same budget.resolveBinaryscans PATH in process and keepsdetectBinaryas the fallback.assertSupportrecords support in<base>/claude-support.json, keyed by realpath, size and mtime, only when the probe prints the missing-argument error. Unknown option, ENOENT and other failures are never recorded.Spec:
.specs/features/open-boot-latency/spec.md(R1 to R10).Known limitation: when
claudeis a version-manager wrapper (mise, asdf, volta), realpath is the wrapper, so upgrading the real binary does not invalidate the record. Accepted because the probe only guards a long-standing flag and the real launch still reports the error. Documented at the lookup.Measurements
Fake
claudeon PATH, isolatedRUN_AGENT_DIR, pty viascript(1),open general --effort high --no-worktree, 7 runs per build, base252485bvs this branch:--no-theme--no-themeFake
claudeinvocations per warm open: 3 before (version, probe, launch), 1 after (launch).Tests
Scoped batches on the pre-rebase HEAD:
npx vitest run tests/open-boot.test.ts tests/ipc-daemon-start.test.ts tests/open-claude-probes.test.ts: 11 passed; the size-key test added afterwards passed innpx vitest run tests/open-claude-probes.test.ts(6 passed)npx vitest run tests/open-: 281 passednpx vitest run tests/ps.test.ts tests/claims-cli.test.ts: 44 passednpx tsc --noEmit -p .: clean;npm run build: okNot covered: Claude Code's own time to input-ready with and without the plugin (needs the authenticated account),
scripts/pty-gate.shand the theme and rename gates, and the codex and opencode launchers, which keep the same probe pattern.