Skip to content

Model registration: never ask questions while serving - #2597

Merged
Matlan1 merged 3 commits into
masterfrom
claude/no-prompts-in-server
Oct 22, 2026
Merged

Matlan1 merged 3 commits into
masterfrom
claude/no-prompts-in-server

Conversation

@Matlan1

@Matlan1 Matlan1 commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Summary

Adding a folder of models from the GUI failed as soon as one file was already registered under another name: the server asked "already registered as ... [a]lias / [c]opy / ..." on its own console window, nobody answered, the prompt aborted and the whole add was reported as failed.

The registration questions now check can_prompt(): stdin is a terminal and the process is not serving. run_advertised (both localm serve and localm gui) serves inside prompts_disabled(), so a model added through the GUI or the API takes the existing non-interactive answer (a duplicate is skipped with a note, the rest of the folder is registered). The terminal CLI still asks.

🤖 Generated with Claude Code

The duplicate and name-conflict questions are asked only when can_prompt() is true: stdin is a terminal and the process is not serving. run_advertised serves inside prompts_disabled(), so a model added through the GUI or the API takes the non-interactive answer instead of aborting at the server's console.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Matlan1 Matlan1 added the full-ci Run the full two-platform lint+hygiene+tests matrix on this PR label Oct 22, 2026
Matlan1 and others added 2 commits October 22, 2026 21:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Matlan1
Matlan1 merged commit 1874e80 into master Oct 22, 2026
31 checks passed
@Matlan1
Matlan1 deleted the claude/no-prompts-in-server branch October 22, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Run the full two-platform lint+hygiene+tests matrix on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant