Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
|
To use Codex here, create an environment for this repo. |
Owner
|
感谢贡献!我们已关注到这个 PR,会尽快安排审查。 |
Owner
|
感谢你的贡献!想确认一下,这个 PR 当前是否已经准备好转为正式 PR(Ready for review),进入评审? 如果已经准备好,欢迎取消草稿状态;如果仍在开发、存在阻塞或希望暂缓,也欢迎简单说明当前进展,方便我们安排后续评审。谢谢! |
Collaborator
|
感谢定位该问题!本草稿基于 9 月旧基线已滞留超过两个月无法直接合入,这边先致谢关闭;但我们核对确认“漏收官方 |
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 and change
A native Codex Thread can remain
THREAD_BUSYfor delegation sends after its Turn has ended.#sendOfficialDelegationThreadrejects immediately when#activeOfficialTurnscontains the Thread, without consultingthread/read. If this Host misses a terminal notification, retries never reach the authoritative native history. Delegation reads also OR the stale cache into their reported running status.Read native state before deciding admission. Clear a cached active Turn only when the returned history explicitly confirms that exact Turn ID completed, failed, or was interrupted/cancelled. Use the same reconciliation on delegation reads. Missing/unknown evidence stays busy; an active native Thread, running latest Turn, or newer cached Turn still blocks sending. No message queue, cancellation, polling, or live Host state reset is added.
Reproduction and validation
A hermetic Host test receives
turn/started, deliberately omitsturn/completed, and makes nativethread/readreport the same Turn completed and the Thread idle. On unmodified upstream main5d10dfd, sending fails withTHREAD_BUSYbefore any read. With this fix the report starts normally.npm run build --workspace=@codexhost/host-runtime: passed.git diff --check: passed.Limits and related work
This proves that a stale cache can permanently block report delivery and provides bounded reconciliation when positive evidence is available. It does not establish how a particular user's terminal notification was missed, fix
thread not found, or make genuinely busy Threads accept queued reports. Nativethread/readthat itself remains stale/active is still rejected.Related: #311 (separate request for async delivery to genuinely busy recipients), #312 (independent Claude history-read false-busy fix). This PR is independently based on main and requires neither change. It has not been installed into a running Desktop; live acceptance remains unverified.