[codex] redesign Windows Desktop client - #168
Merged
Merged
Conversation
Provider layer (openai_provider.cpp, anthropic_provider.cpp) already handles all transient failures with 3 attempts and exponential backoff. The AgentLoop retry was redundant and introduced two bugs: 1. Duplicate stream chunks: the failed attempt already emitted partial text via the on_chunk callback (flushed to UI). The retry re-emitted the same content from the start. 2. Response.text corruption: on final failure, response.text contained debris from the last failed attempt.
Provider layer handles transient errors (5xx, 429, curl). AgentLoop catches one class of error the provider cannot handle internally: context-window errors. When the LLM returns a 400-level error about context length, AgentLoop triggers compaction (maybe_compact()) and retries once. Removed: general retry loop that re-invokes chat() on all error types Kept: context-window specific recovery with single retry
…vider Provider layer handles all transient errors (5xx, 429, curl errors) with 3 attempts and exponential backoff. AgentLoop now only catches for logging before propagating the exception upstream. Context-window retry was also removed: all callers (fork_skill_tool, worldbuilding_tools) already catch exceptions from sub_loop.run() and return errors as tool results. The heuristic-based compact+retry was unreliable — if token counting underestimates, compaction won't help either.
ULookup
marked this pull request as ready for review
June 21, 2026 17:41
Combine C++ build/config entries from windows-desktop-redesign with standard dev-environment entries from main.
Keep main's retry-safe text snapshots, llm_start timing, and improved exception logging from Agent industrial hardening batch.
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.
Summary
Why
The previous client exposed only part of the Runtime API and did not match the approved Windows Desktop information architecture. This branch aligns the shell and ten workspaces with the supplied design references while keeping every visible value tied to a real API field or an explicitly unavailable state.
Validation
api/client.ts)Draft status
Browser fidelity QA, native-size screenshots, the final desktop preflight, and whole-branch review are still in progress and will be added to this PR. Native Tauri execution currently lacks external Rust/Cargo tooling and
merak.exe; source-level desktop checks will still be completed.