Repository navigation
fix(claude): serialize model and effort in App session metadata - #1443
Closed
Neonforge98 wants to merge 1 commit into
Closed
Neonforge98 wants to merge 1 commit into
Neonforge98 wants to merge 1 commit into
Conversation
Neonforge98
marked this pull request as draft
September 9, 2026 06:23
Neonforge98
force-pushed
the
codex/fix-claude-desktop-effort
branch
from
September 9, 2026 16:03
e4567a9 to
9772324
Compare
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
ORG2's existing Claude App catalog publisher writes the ORG2 model variant (for example
claude-fable-5-1-high) into the native metadata model field. Claude App stores the base model and effort separately. This is a publication-format defect; ordinary Claude Code execution already passes a separate--effortflag and is not repaired by this PR.Solution
Reuse the existing Claude CLI model-variant parser at the metadata writer. Publish the base model and explicit effort separately, preserve existing effort when no override is selected, and retain unrelated provider-owned fields. Regression coverage exercises five effort variants and updates to existing records.
This changes the existing catalog publication only. The catalog record carries the native session ID, working directory, title, timestamps and settings so Claude App can load a session whose conversation remains in the native JSONL transcript. It is not a runtime settings API.
Potential risks
End-to-end first-import effort preservation is still blocked in the installed Claude App. Its resume URL handler forwards only the session UUID to importCliSession. For a session absent from its memory, adoptCliSession rebuilds a record from the transcript; its imported settings include model and permissions but omit effort. The resulting record can overwrite the correctly published metadata. App setEffort updates memory, disk and the active query, but the inspected resume URL does not expose that operation. This PR does not claim to repair that App-owned path and remains Draft for the requested complete handoff behavior.
Two successful High continuations (ORG2 and Claude App) have native transcript effort=high. This disproves the inference that a Low display necessarily means a Low request; it does not establish preservation for every effort level. No automatic App restart, global effort override, private runtime injection or vendor-bundle modification is introduced.
The provider-owned metadata format may change. No schema migration, dependency change, new timer or scan is introduced. Existing records are corrected on ordinary publication, with no bulk history rewrite. Revert the commit and rebuild to restore the previous writer; native conversations remain intact. Cross-process metadata ownership and App discovery cadence are unchanged.
Verification
git diff --check origin/develop...HEADpassed after integration; inspected both changed files for unrelated changes and private data.CARGO_TARGET_DIR=<shared-target> cargo test --manifest-path src-tauri/Cargo.toml --lib claude_desktop_publication_preserves_selected_model_and_effort -- --nocapture— 1 passed.CARGO_TARGET_DIR=<shared-target> cargo test --manifest-path src-tauri/Cargo.toml --lib agent_sessions::cli:: -- --nocapture— 458 passed, 4 ignored, 0 failed. Full workspace tests and a new packaged UI run were not repeated; new-head CI must run after push.claude --helpadvertises --effort. ORG2's ClaudeCode command builder passes --model and --effort for both fresh and resumed turns.Architecture review covered parser reuse and visibility, separate CLI/runtime/catalog meanings, absent-override behavior, provider boundary, serialized fields, and loaded-versus-first-import initialization asymmetry. Compilation validation is recorded below; unrelated structural cleanup was excluded. Performance: no new background owner or retained state; no full lifecycle performance certification is claimed.