Repository navigation
Conversation
…es its outcome Persona lets a tool call go while its approval card waits (approval.WaitingText / ClarifyingText in the tool result) and later sends the card's outcome as a message that starts the next turn. When the owner answered between the two, no card waited any more when the turn's end was read, and the words about the card were posted as the answer (review of PR #67, P1-1). The tool result is now remembered as an owed outcome (card_owed) until the outcome's message comes (the hub's injected approval_* mark, or Persona's marker or older wording when unmarked); a turn that ends while it is owed is held like one with a waiting card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts for a question about the card (review 1) Co-Authored-By: Claude Opus 5.5 <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.
做了什么
修 PR #67 评审里的 P1-1:主人在「工具调用等不到审批、被 Persona 放行」之后、OpenMate 读到本轮结束之前点了批准或拒绝,这时 hub 里已经没有待批卡,
_card_waits返回 False,「还卡在审批卡上」被当成答复发出,占掉微信唯一一次回复;审批结果开启的下一轮的真正答复(和截图)被「只回复一次」拒掉。判断信号:不用评审建议的审批历史,改用会话里 Persona 自己写的工具结果。
approval.WaitingText(主人提问时是ClarifyingText),原文里写明「A later message will report its outcome」。Persona hub 自己也按这段原文判断「非最终结果」(server/internal/assistant/fleet_ix_terminal.go的nonFinalApprovalResult)。OpenMate 照同样的规则认:原文本身,或者 PreToolUse 钩子错误包着的原文。card_owed(欠一个审批结果)。审批结果消息到了才清掉,认法有两种:injected.kind=system、state=approval_*,对应prompts.IsApprovalResult。<persona-approval-result>或旧版措辞。_turn_ended:hub 说没有待批卡、但结果还欠着时,照样挂起,不发、不占回复,等结果开启的下一轮来回答。为什么不用审批历史:卡在 75 秒内就批了(最常见的情况),历史记录同样是「本请求之后创建、已有结果」,会被误判成要挂起。可这种情况工具拿到的是真结果,Persona 不会再发结果消息,挂起后只能等 25 小时超时。工具结果能逐个调用地区分这两种情况,不需要任何新接口或新权限,只读本来就在读的会话条目。
怎么验证的
bash scripts/test.sh:973 / 419 / 191 全部通过。tests/test_agent_approval.py)。AnsweredAsTheTurnEndsTest6 条,覆盖竞态:UnchangedTest加 2 条守护,新旧代码都通过:75 秒内批准的照常答复、不挂起;更早请求的卡的结果不吞掉这次的答复。repro_card.py的 R1:state=done fallback=sent,发出「还卡在审批卡上…」,真正的答复被拒。没做什么
🤖 Generated with Claude Code