Repository navigation
Conversation
…e refusing a send The directory bootstrap loads the agent list once; if that request failed (engine mid re-init, e.g. while a rebuild re-stages its config) the list stayed empty for the window's lifetime and every send was refused with "Select an agent and model" even though a model was picked. The send guard now reloads the catalog once (agents fresh + all providers queries, single-flight, 8 s bound) and re-reads before refusing; the refusal names what is missing (agents didn't load / selected model's provider isn't connected). The agent is never defaulted to build.
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Problem
After a dev-mode "Rebuild from Main" plus a window reload, every send in every session was refused with "Select an agent and model", even with a model picked. The window kept refusing until the next reload.
The failing window was running the same build as a working one. That 10:53 rebuild never deployed, and the window reloaded mid-rebuild. The engine log shows a config re-init at 15:55:51Z, triggered when the rebuild re-staged agent cards, and during it a request failed (
ENOENTon a deleted project folder).bootstrapDirectoryloads the agent list once (ensureQueryData(loadAgentsQuery…).then(setStore("agent", …))), with no retry after that. If that one request fails,store.agentstays[]for the window's lifetime,local.agent.current()isundefined, and the guard atsubmit.ts:425refuses every send. Its message wrongly blames the model.Fix
context/server-sync.tsx: newreloadCatalog(directory). It re-fetches the agent list withstaleTime: 0(so a cached failure isn't reused), writes it back into the child store, and refetches every providers query. It is single-flight per directory.components/prompt-input/catalog-recovery.ts: newresolveWithCatalogRecovery, a pure function. It reads the selection, and if anything is missing it reloads once, bounded at 8 s with errors swallowed, then reads again.submit.ts: the guard goes through the recovery step before refusing, and the refusal now names what is missing:build, because that would quietly give a plan-mode chat write access.Verification
catalog-recovery.test.ts: 14 tests.submit.tsandserver-sync.tsxwiring.src/components/prompt-inputsuite: 95 pass, 4 fail, 3 errors. The same 4 failures and 3 errors happen on unmodifiedmain; they are import errors at module load insubmit.test.ts,submit-concise.test.tsandharness.test.ts.refresh_manifestthendrift_gate: PASS../.notturno/gates: GREEN.