Skip to content

performance: kiro-cli-term adds ~1.5s delay to shell startup #3614

@AbdelrahmanHafez

Description

@AbdelrahmanHafez

Checks

Operating system

macOS 26.2.0 (Apple M1 Pro)

Expected behaviour

Shell startup should be fast. Without kiro-cli, my fish shell starts in ~70ms.

Actual behaviour

With kiro-cli enabled, shell startup takes ~1.5-1.7 seconds. This happens on every new terminal window/tab or tmux window.

After extensive debugging, I narrowed down the issue to kiro-cli-term itself. When I set PROCESS_LAUNCHED_BY_Q=1 to prevent kiro-cli-term from launching, startup drops from 1.5s to 70ms. However, autocomplete stops working without kiro-cli-term.

Interestingly, the shell integration hooks themselves are fast:

  • kiro-cli init fish pre: ~20ms
  • kiro-cli init fish post: ~45ms
  • fig_precmd (the prompt hook): ~23ms

So the ~1.4s delay is somewhere in kiro-cli-term's initialization, not in the fish shell hooks.

Steps to reproduce

  1. Have kiro-cli installed with fish shell integrations
  2. Open a new terminal window or tmux window
  3. Observe ~1.5s delay before the prompt appears

To verify it's kiro-cli-term causing the delay:

  1. Create a file ~/.config/fish/conf.d/00_0_skip_kiro.fish with content:
    set -gx PROCESS_LAUNCHED_BY_Q 1
  2. Open a new terminal - startup is now ~70ms
  3. But autocomplete no longer works

Environment

[q-details]
version = "1.24.0"
hash = "0728b2464fed0b53e63abbb9ce12fa38a0542d69"
date = "2026-01-15T23:42:41.840104Z (4d ago)"
variant = "full"

[system-info]
os = "macOS 26.2.0 (25C56)"
chip = "Apple M1 Pro"
total-cores = 10
memory = "16.00 GB"

[environment]
cwd = "/Users/USER/dev"
cli-path = "/Users/USER/dev"
os = "Mac"
shell-path = "/opt/homebrew/Cellar/fish/4.3.3/bin/fish"
shell-version = "4.3.3"
terminal = "Kitty"
install-method = "brew"

[env-vars]
SHELL = "/opt/homebrew/bin/fish"
TERM = "tmux-256color"
__CFBundleIdentifier = "net.kovidgoyal.kitty"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions