fix(subagents): release resident-file lease on terminal state (follow-up to #660)#694
Closed
merchloubna70-dot wants to merge 3 commits into
Closed
Conversation
All system prompts were English-only, causing DeepSeek V4 to reason and respond in English even when users wrote in Chinese or other languages. Add a Language Mirror section to base.md and base.txt that instructs the model to detect the user's primary language and use it for both reasoning (thinking tokens) and the final reply.
base.txt is not referenced via include_str! in prompts.rs. Only base.md is loaded (BASE_PROMPT). Remove the redundant change to base.txt as noted by Gemini Code Assist review.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Hmbown
added a commit
that referenced
this pull request
May 5, 2026
#660) Resident-file leases were stamped as "pending" at spawn time because the agent id is only assigned by the manager later. The release function introduced in 2ee926924 matches by agent id, so it could never find those entries and leases would persist for the lifetime of the process. After spawn returns the real agent id, replace any "pending" entry with it so the existing release-on-terminal-state path actually fires. Resolves the documented v0.8.12 caveat noted in the CHANGELOG. Closes the loop with PR #694, which proposed a release-by-file-path API but did not address the placeholder problem itself. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
|
Thanks for the follow-up! Closing without merge — the original lease-release work in #660 already releases by |
MMMarcinho
pushed a commit
to MMMarcinho/DeepSeek-TUI
that referenced
this pull request
May 6, 2026
Hmbown#660) Resident-file leases were stamped as "pending" at spawn time because the agent id is only assigned by the manager later. The release function introduced in 2ee926924 matches by agent id, so it could never find those entries and leases would persist for the lifetime of the process. After spawn returns the real agent id, replace any "pending" entry with it so the existing release-on-terminal-state path actually fires. Resolves the documented v0.8.12 caveat noted in the CHANGELOG. Closes the loop with PR Hmbown#694, which proposed a release-by-file-path API but did not address the placeholder problem itself. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Fixes lease-never-released bug found by @Hmbown in review of #660.
resident_lease_table()helper (process-scoped OnceLock)release_resident_lease(file_path)for the sub-agent manager to call on terminal state transitionsSee #660 review comment.