Problem
The App::with_provider() and App::with_provider_and_path() constructors create an App with a provider already set, which means set_provider() runs before set_config() can be called. This causes the AgentConfig and system prompt to be built with default values rather than the user's config.
Current Behavior
Any code path using with_provider or with_provider_and_path (e.g., tests, alternate entry points) will silently ignore all config options — systemPromptAdditions, projectContext, commandAliases, autoApprove, etc.
Proposed Fix
Either:
- Remove these convenience constructors in favor of the
with_project_path + set_config + set_provider pattern
- Or make them accept a
ResolvedConfig parameter
Option 1 is simpler and avoids API surface expansion.
Related
PR #261 — Wire config options, context compaction, and auto-index on startup
Problem
The
App::with_provider()andApp::with_provider_and_path()constructors create anAppwith a provider already set, which meansset_provider()runs beforeset_config()can be called. This causes theAgentConfigand system prompt to be built with default values rather than the user's config.Current Behavior
Any code path using
with_providerorwith_provider_and_path(e.g., tests, alternate entry points) will silently ignore all config options —systemPromptAdditions,projectContext,commandAliases,autoApprove, etc.Proposed Fix
Either:
with_project_path+set_config+set_providerpatternResolvedConfigparameterOption 1 is simpler and avoids API surface expansion.
Related
PR #261 — Wire config options, context compaction, and auto-index on startup