Cut shell startup time by deferring completions

dotfiles · OpenClaw · branch perf/startup · claude-opus-5 · cwd /home/user/code/dotfiles · id a15bb9e8-8df4-5256-6393-57ad5c4e897a · 2026-06-29 15:52 · 2 msgs · 26 tools · 1 min read · updated 2 months ago

Startup was dominated by loading completion scripts that were rarely used.

tools: Read, Edit, Bash
← dotfiles Download .md
Tool calls
Read Read: 6 calls (46.2%) 6 Bash Bash: 5 calls (38.5%) 5 Edit Edit: 2 calls (15.4%) 2
Token usage9.0K total
Input7.5K
Cache creation0
Cache read0
Output1.5K
Cache hit ratio0%· cold cache

Startup was dominated by loading completion scripts that were rarely used.

Conversation

Turn 1 — User

New terminals take almost a second to become usable.

Turn 2 — Assistant

Profiled the startup file. Most of the time was loading completion scripts eagerly, including several for tools not installed on this machine.

They are now loaded lazily on first use of the command, and missing tools are skipped rather than failing silently. Startup went from roughly nine hundred milliseconds to under two hundred.

Turn 3 — User

Do completions still work on first use?

Turn 4 — Assistant

Yes — the first tab press pays the load cost once, then it is cached for the session. Noticeable only if you are looking for it.

Subjects

  • [[Shell]]
  • [[Configuration]]

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date