Repository navigation
Description
What already works
Startup does parse existing config. internal/app/status.go:323-325 calls configReader.DetectFile() for every auto Agent that has a config path, and internal/config/discovery.go:161 reads the file with a per-adapter parser (ReadCodexConfig, ReadClaudeConfig, ReadOpenAICompatibleConfig, ReadOpenClawConfig, ReadAiderConfig, ReadHermesConfig). The result reaches the UI as AgentStatus.detected and frontend/src/components/AgentManageRow.tsx:78-106 renders it, distinguishing "we wrote this" from 检测到的配置,非 OneAgent 写入 via managedByOneAgent.
So the reading half is done. This issue is about what happens next.
The gap
detected is display-only. Nothing consumes it as input:
frontend/src/state/wizardReducer.tsnever readsstatus.agents[id].detected. The wizard seeds its model fromproviderDefaultModel()(:92), which readsproviders[provider].default_modelfrom the manifest — not from what is on disk.frontend/src/pages/AgentSelectionPage.tsxpassesstate.status.agentsthrough but does not usedetectedto preselect anything.- There is no reverse lookup from a detected
baseUrlto a known Provider ID.grepforProviderForBaseURL/providerForBase/matchProviderfinds nothing ininternal/orfrontend/src/. - There is no "adopt this config" affordance anywhere.
EnvironmentOverviewPage.tsxhas only threenavigate()calls (:22,:25,:29), all of which start the wizard from scratch.
The concrete consequence: a user who already has ~/.codex/config.toml pointing at PPIO with deepseek/deepseek-v4-pro sees that endpoint and model correctly reported in the overview, then still has to walk the full wizard and retype both. OneAgent knows the answer and asks anyway.
There is a second, subtler cost. internal/app/status.go:373 sets firstRun from whether ~/.oneagent exists, and frontend/src/App.tsx:64 routes on it. A user with six configured Agents but no ~/.oneagent is treated as a blank slate.
Suggested scope
-
Reverse-resolve a detected endpoint to a Provider. Add a lookup from
baseUrlto a Provider ID overproviders(built-in and user).internal/provider/store.goalready holds every entry'sBaseURL; normalising throughprovider.OpenAIBaseURL()before comparing would handle the/v1variants. Return no match rather than guessing —customdeliberately has noDefaultModel(store.go:99-102) for the same reason. -
Seed the wizard from
detectedwhen there is no Profile binding. Precedence should sit below an explicit user choice but above the manifest default:chosen > detected > providerDefaultModel > first listed. The current chain atwizardReducer.ts:348ischosen || probeModel || seeded || models[0];detectedbelongs betweenprobeModelandseeded. -
Offer adoption explicitly in the overview.
targetSummary()already computes the检测到的配置,非 OneAgent 写入case atAgentManageRow.tsx:102. That row is exactly where a "create a Profile from this" action belongs — the user can see what would be adopted before agreeing to it.
Deliberate non-goals
Do not auto-adopt silently. Two reasons. detected carries no credential — the readers are documented at internal/config/discovery.go:1-3 as never returning credential values, and Detected has no key field — so adoption can recover the endpoint and model but never the key, and a Profile that looks complete but cannot authenticate is worse than an obviously empty one. And overwriting a hand-maintained config without being asked is the failure mode managedByOneAgent exists to keep visible.
Also do not widen Detected to carry secrets in order to close that gap.
Priority
P2. The reading infrastructure is in place and correct; this is wiring it into the flow that currently ignores it.
Activity
Paulkm2006 commentedon Aug 7, 2026
To read and convert existing configurations from local agents involves complex config file resolving, environment variable reading and deduplication with existing providers and profiles. Indeed, this function might help advanced users who already installed and configured agents manually to migrate to OneAgent smoothly, but come with a great cost for developers and regular users who won't use it. Marked as not planned for now.