Repository navigation
Conversation
…eld instead of taking Claude offline Settings saved any text typed into Claude's "Auto-compact after" field, such as 50000, 300k or 300,000. The server then failed to decode the instance config and marked the Claude instance unavailable, so new Claude threads could not start until the field was cleared. Provider settings fields now carry a validator built from their own schema. The settings text input commits only values that schema decodes (empty stays valid where the field is omitted when empty). A rejected value stays in the field, marked aria-invalid, with a short error line beneath it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — Provider settings text inputs now keep invalid values local and show an inline error instead of saving them. The stale-draft finding remains subject to the separate blocking gate; the remaining change presents no material operational or product-policy risk. Needs human approval because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…d value comes back A rejected draft was only hidden when the saved value changed, so a saved value going A to B and back to A showed the old draft and its error again. Clear it as soon as a different saved value arrives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note Written by Verified in a real dev environmentverified unchanged head
Not verifiedan authenticated claude turn and actual token-threshold compaction: claude is installed but has no login on this vm. native desktop/mobile clients, screen-reader speech, and remote/tunnel connections were not exercised. invalid writes from other clients remain outside this web-only fix. |
|
Note 🤖 Opus 5.5 replying on behalf of Victor. Thank you for testing this end to end. Reproducing on main that |




Problem
Settings > Providers > Claude > Auto-compact after accepts any text. A value outside 100,000 to 1,000,000, such as
50000,300kor300,000, saves with no error, and then the Claude instance shows as Disabled ("Invalid config for instance 'claudeAgent': Expected a string matching the RegExp …"), reports no models, and new Claude threads on it cannot start until the user finds and clears the field.Change
The field schema already says what is valid (
TrimmedString.check(Schema.isPattern(...))inpackages/contracts/src/settings.ts); the settings form never checked it before saving.deriveProviderSettingsFieldsnow gives each field anisValid(value)built from its own schema, andProviderSettingsTextInputcommits only values that pass. A rejected value stays in the field witharia-invalidand "Enter a valid value.", and is never sent to the server. The Add provider dialog renders the same form, so it gets the same check.Scope
Bug fix: one wrong keystroke in one settings field disables the Claude provider. Fixes #35041. I found no other open or closed PR or issue covering it. Not in this PR: the server still accepts an invalid instance config from other clients.
Verification
To see it on Linux web on
main: open Settings > Providers > Claude, type300kinto Auto-compact after, press Enter. Claude turns Disabled with the invalid-config error.Run today on
main01b815ffc2, this heade79f54f5e2, and the head merged locally with thatmainas0e134479fd(not pushed), each T3 server from source as "Test machine" with a fresh home,--no-seed, a placeholderANTHROPIC_API_KEYand no Claude account. Web input was typed in T3's Browser panel; desktop input was sent through the Electron debugging port. The PR's tests fail on main's form (2 failed, 6 passed) and pass on the head and merged tree (8 passed). On main300ksaves ({"autoCompactWindow":"300k"}) and Claude turns Disabled; on the head and merged tree it is rejected in the field, nothing is saved, and Claude stays authenticated.Web on main 01b815f: Claude Disabled with the invalid-config error after 300k
Web on the head e79f54f: 300k outlined red with "Enter a valid value.", Claude Authenticated
Not checked: screen reader output (
aria-invalidis in the step log). Mobile has no editor for this field.Desktop and merged-tree captures, other values, change detail and unedited output
Steps on
main: open Settings > Providers > Claude, type300kinto Auto-compact after, press Enter. The server stores the instance config as typed, then fails to decode it when it starts the provider.Change detail:
isValiddecodes the value the way the server does, so surrounding spaces still pass. An empty value stays valid where the field is dropped when empty. A rejected value is linked to the short "Enter a valid value." line. Entering a valid value or clearing the field removes the error. So does a new saved value arriving from elsewhere, such as another device. This works for any provider field with a schema check, not just this one. Today onlyautoCompactWindowhas one, so no other field changes behavior. In the Add provider dialog a rejected value is left out of the new instance while the field shows the error. It adds no setting and changes no valid behavior. Decoding an invalid instance config inupdateProviderInstancewould be a separate hardening fix.Desktop on main 01b815f: Claude Disabled with the invalid-config error after 300k
Desktop on the head e79f54f: 300k outlined red with "Enter a valid value.", Claude Authenticated
Web on the merged tree 0e134479fd: 300k outlined red with "Enter a valid value.", Claude Authenticated
Head
e79f54f5e2:50000and300,000are rejected the same way;300000,1000000and300000save, and clearing removes the setting.Head e79f54f: 300000 in the field, no error, Claude Authenticated
Head
e79f54f5e2: with300krejected, writing500000to the settings file replaces it and clears the error.Head e79f54f: the field shows 500000 with no error after the settings file changed
Head
e79f54f5e2: in the Add provider dialog300kis rejected, and the new Claude instance is created without it.Head e79f54f, Add provider dialog: 300k outlined red with "Enter a valid value."
Tests on main (the PR's test files with main's form), the head, the merged tree:
Saved settings after
300k: web on main, desktop on main, web on the head, desktop on the head, the merged tree:Every value on the head, in order (field state read from the page, saved value read from the test server's settings file):
The settings file write, and the Add provider result:
Generated with Claude Opus 5.5 in T3 Code Nightly