Repository navigation
cli: -m picks the model for a run; -read-only sends nothing off the machine and takes piped input - #418
Merged
Conversation
…achine and takes piped input
- -m "model" uses that model on the provider in use, "provider:model" switches
provider too ("local:" back to the local server), "provider:" keeps that
provider's model. For this run only, never persisted. A model name may hold a
colon (qwen2.5-coder:7b): the part before it is a provider only when it names
one.
- -read-only turns the agent's own internet use off for the run, as /offline
does, and can't be overridden: no web tool (it is left out of the catalog — a
fetched URL can carry the code it was shown), no update check, no
statistics. The model connection is untouched.
- -read-only takes what is piped in as part of the task, up to 512 KB with the
cut stated: git diff main | ipsupport-code -read-only "review this diff".
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
- -m never reaches disk: every connection save (SaveGlobal, SaveProviders — /rename, key and temperature edits, /ai key …) writes the model and provider from before -m. An explicit /model or /ai choice ends that; it is the user's to keep. -m "" and a colon with nothing before it are errors; spaces around the provider are trimmed. - Piped input: stdin that is a device (/dev/null) is not read; a pipe nobody writes to (ssh, a supervisor) is waited on 10 s for its first byte, then the task runs without it. Approvals no longer read the task's stdin — past the 512 KB cap a "y" line in a diff would have answered one. - The read-only prompt no longer names the web tool it doesn't have. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…its for a pipe's reader - A session started with -m never changes the saved model or provider: every connection save writes the ones from before -m, /model and /ai included, which switch for the session and say so. The earlier rule — an explicit choice ends -m — leaked through each entry point it missed (a failed /ai, /config's staged changes, /login, a local /model leaving a cloud provider saved). A preset -m alone created for a built-in keeps a key added in the session but not the -m model. - append to a named pipe waits up to a second for its reader to open it (a blocking open waited forever; the non-blocking one failed at once when the reader opened a moment later — TestSnapFileSkipsFIFO was flaky for it). Co-Authored-By: Claude Opus 5.5 <[email protected]>
- What follows a model on disk follows it back: a session /model no longer clears the saved model's hand-set context size (model, context_window and context_window_manual are restored together). - A preset added in a -m session is held to the model it was first saved with. - The provider saved before -m, removed in the session, is not saved by name (the next launch would refuse it): local instead. - The preset -m alone made for a built-in is not saved for the context size detection found for its model either. - /login and a reload of the settings end -m: the connection is then the one on disk, and setting it up is saving it. - /ai add and a staged /config model change say they are for this session only. - A build without -m clears the run-only state. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A reload that fails no longer ends -m: the session keeps its connection and the protection with it; only a reload that loads does. - The overlay's bookkeeping changes only after a save is on disk: a preset added in the session becomes a baseline then, and one no longer saved is forgotten (added again, it starts over). The fallback to local for a removed pre -m provider is computed per save, not stored. - build clears the run-only state first, whatever then fails. - /ai add of a new preset no longer says its model is session-only — it is saved as given; an edit of an existing one still says so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s -m only once in use - Once a save without the pre -m provider is on disk (local written in its place), the overlay forgets it: added again later it is a new preset, not one to make active again. - A reload ends -m only after the reloaded settings are wired in. - The /config panel's provider edit says the saved model is kept in a -m session, as /ai add does; a new preset is saved as given. - Tests: a failed save moves no baseline; a re-added provider is not reactivated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
provider too ("local:" back to the local server), "provider:" keeps that
provider's model. For this run only, never persisted. A model name may hold a
colon (qwen2.5-coder:7b): the part before it is a provider only when it names
one.
does, and can't be overridden: no web tool (it is left out of the catalog — a
fetched URL can carry the code it was shown), no update check, no
statistics. The model connection is untouched.
cut stated: git diff main | ipsupport-code -read-only "review this diff".
Checked end to end with the built binary against a fake model server: the request carried the -m model and the piped diff. Each change has a test that fails with it reverted. go test ./..., -race on cmd/agent, windows/darwin builds pass.
🤖 Generated with Claude Code