Repository navigation
Conversation
allozaur
force-pushed
the
allozaur/fix/agentic-loop-resume-after-reload
branch
from
November 20, 2026 16:09
648985b to
682c8fd
Compare
The share dialog gets a "Sign in with Hugging Face" button next to the access-token form. It runs OAuth with PKCE in the browser: the app registers itself with Hugging Face for the redirect URL of the origin it is served from, opens the authorization page in a popup (or this tab when the popup is blocked), and the page that comes back trades the code for tokens and tells the other tabs on a BroadcastChannel. Tokens stay in localStorage and are renewed with the refresh token before they expire. When Hugging Face turns the registration down or grants no write access, the dialog says so and points to signing in with an access token. Assisted-by: Claude (Opus 5.5 Medium)
Signing in with Hugging Face asked for write-repos and manage-repos, so the consent page said the app could manage every repository of the account. It now asks for contribute-repos: the app can create datasets and write only to the ones it created. A client registered for other scopes registers again on the next sign-in. A share to a dataset the sign-in may not write to now says why and what to do, in place of the Hub's bare 403. Assisted-by: Claude (Opus 5.5 Medium)
The agentic loop runs in the browser tab, so a reload on /chat/[id] dropped tool execution and the following LLM turns. Reattaching to the server stream only replays the current LLM turn. Mark an in-flight agentic flow in sessionStorage and, once discovery settles, rebuild the interrupted turn from persisted messages. Resume from the unanswered tool calls, or start the next LLM turn when all results are in. Already-answered tool calls are skipped. Also clear streaming state per message id on stream cleanup so a late attach cannot wipe a newer generation's permission card. Assisted-by: Claude (Opus 5.5 Medium)
allozaur
force-pushed
the
allozaur/fix/agentic-loop-resume-after-reload
branch
from
November 23, 2026 11:46
682c8fd to
e0407b8
Compare
allozaur
changed the base branch from
master
to
allozaur/feat/hf-oauth-sign-in
November 23, 2026 11:46
allozaur
force-pushed
the
allozaur/feat/hf-oauth-sign-in
branch
4 times, most recently
from
November 24, 2026 18:57
9f91b89 to
d94b69b
Compare
This branch has not been deployed
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.
Overview
Reloading a chat in the middle of a multi-step tool run now picks the run back up and finishes it, instead of leaving the chat stuck or half-finished.
Additional information
Stacked on #92, so merge that first. Known gaps: the resume marker lives in per-tab sessionStorage, so closing the tab ends the run. A streaming tool's partial output is kept and the tool is not re-run.
Cause
The agentic loop runs in the browser tab. When the page reloads, reattaching to the server stream only replays the current LLM turn, so tool execution and the following turns never continue.
What changed
parseToolCallsand copy$statevalues with$state.snapshotbefore writing them to IndexedDB.ui/apps/chatlayout.Testing
svelte-check: 0 errors. ESLint, Prettier and unit tests (810) pass on the stacked branch.Requirements
Claude (Opus 5.5 Medium)