Skip to content

Speed up Claude and Codex launches - #407

Open
rohita5l wants to merge 1 commit into
mainfrom
codex-settings-first-launch-clean
Open

Speed up Claude and Codex launches#407
rohita5l wants to merge 1 commit into
mainfrom
codex-settings-first-launch-clean

Conversation

@rohita5l

@rohita5l rohita5l commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • skip repeated preflight, gateway detection, model discovery, and config rewriting for configured Claude and Codex launches
  • add --refresh to explicitly refresh Databricks auth, gateway, models, managed config, and agent configuration
  • install Databricks AI Tools only from ucode configure; agent launch commands never install them
  • preserve full setup paths for providers, managed/local config, smart routing, and first-time setup

Testing

  • affected agent/CLI tests: 299 passed
  • Ruff, formatting, and diff checks passed
  • full suite: 1961 passed, 37 skipped; one unrelated Claude binary e2e test remains environment-dependent

@rohita5l
rohita5l force-pushed the codex-settings-first-launch-clean branch from c1b0fd2 to b34d1d5 Compare August 28, 2026 02:20
@rohita5l
rohita5l force-pushed the codex-settings-first-launch-clean branch from b34d1d5 to 00892fa Compare August 28, 2026 02:30
Comment on lines +587 to +588
else:
state[WEB_SEARCH_MCP_STATE_KEY] = web_search_entry

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is redundant right? if the mcp is current, you dont need to reset it

else:
state[WEB_SEARCH_MCP_STATE_KEY] = web_search_entry
else:
state.pop(WEB_SEARCH_MCP_STATE_KEY, None)

@lilly-luo lilly-luo Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit for easier reading

if web_search_model: 
   web_search_entry = _web_search_mcp_entry(
            state["workspace"], web_search_model, state.get("profile")
        )
    if not _web_search_mcp_is_current(state, web_search_entry):
            # _register_web_search_mcp runs multiple `claude mcp` sub processes and can take 0.8s
            _registration_success =  _register_web_search_mcp(state["workspace"], web_search_model, state.get("profile")):
            if _registration_success:
                state[WEB_SEARCH_MCP_STATE_KEY] = web_search_entry
else:
    state.pop(WEB_SEARCH_MCP_STATE_KEY, None)

Comment thread src/ucode/cli.py
return False
if refresh or model or explicit_provider is not None:
return False
if enable_smart_routing_flag or skip_preflight:

@lilly-luo lilly-luo Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? if we're only using the fast path when smart routing is disabled, this means smart routing is going to miss out on the speed up? isn't the goal to make smart routing the default on isaac so it means it would be slow?

Comment thread src/ucode/cli.py
bool,
typer.Option(
"--refresh",
help="Refresh Databricks auth, gateway, models, managed config, and Codex configuration "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit put this help into a const and either drop or parameterize Codex / Claude btw the both

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.

2 participants