Skip to content

Commit a2f3d74

Browse files
derek-palmerclaude
andcommitted
fix(doctor): always warn on missing provider key; hint --prompt-only in skill mode
doctor was returning [ok] when skill mode active + provider configured + key missing. forerunner generate (without --prompt-only) still refuses to run in that case, so the ok was misleading. Now always emits warn; appends a --prompt-only hint when skill mode is detected so the user knows the key-free path exists. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3ba9345 commit a2f3d74

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

‎src/codeforerunner/doctor.py‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,16 @@ def _check_provider_api_key(repo: Path) -> list[Finding]:
296296
env_var = cfg.api_key_env.get(provider) or _DEFAULT_PROVIDER_ENV.get(provider, "")
297297
if os.environ.get(env_var):
298298
return [Finding("ok", "provider-api-key", f"{provider}: {env_var} is set")]
299-
if _skill_mode_active():
300-
return [
301-
Finding(
302-
"ok",
303-
"provider-api-key",
304-
f"{provider}: ${env_var} not set; skill mode active — agent handles generation",
305-
)
306-
]
307299
return [
308300
Finding(
309301
"warn",
310302
"provider-api-key",
311-
f"{provider}: ${env_var} is not set; `forerunner generate` will refuse to run",
303+
f"{provider}: ${env_var} is not set; `forerunner generate` will refuse to run"
304+
+ (
305+
" (use `--prompt-only` for key-free bundle output)"
306+
if _skill_mode_active()
307+
else ""
308+
),
312309
)
313310
]
314311

0 commit comments

Comments
 (0)