Skip to content

perf(core): avoid duplicate first-turn filesystem discovery#30670

Draft
apanasenko-oai wants to merge 1 commit into
mainfrom
apanasenko/ttft-startup-filesystem
Draft

perf(core): avoid duplicate first-turn filesystem discovery#30670
apanasenko-oai wants to merge 1 commit into
mainfrom
apanasenko/ttft-startup-filesystem

Conversation

@apanasenko-oai

@apanasenko-oai apanasenko-oai commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Remove avoidable remote filesystem work from first-turn startup.

  • Reuse the project root discovered for AGENTS loading during the immediately adjacent skills warmup.
  • Require an exact discovery-cwd match and never retain the hint across turns.
  • Replace the serial skills marker walk with bounded concurrent discovery.
  • Defer turn-diff display-root discovery until the first exact patch delta.

This is the startup-filesystem slice split out of #30632.

Measured effect

The baseline turn spent 438.6 ms in turn_diff_display_roots before the first model request.
Post-change no-tool traces contain no display-root span, proving that the entire operation is absent unless a patch diff actually needs it.

Validation

  • CI is green at the current head.
  • just test -p codex-core-skills repo_skill_roots passed 2 tests.
  • just test -p codex-core display_roots_are_initialized_only_when_supplied passed.
  • just fmt passed, with an unrelated justfile rewrite discarded.
  • just bazel-lock-update completed without changing MODULE.bazel.lock.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant