Conversation
Reviewer's GuideMapping v9 adds targeted recovery for TRAE sessions containing merged subagent history: empty tool placeholders are ignored, proven-invalid assistant completion times are clamped only in partial sessions with full source evidence retained, and both OpenCode mapping paths expose the projection metadata while preserving v1–v8 ownership compatibility. Sequence diagram for mapping a TRAE subagent sessionsequenceDiagram
participant Bundle as TRAE bundle
participant Parser as parseTraeToolCalls
participant Mapper as mapOpenCodeSession
participant Target as OpenCode session
Bundle->>Parser: parseTraeToolCalls
Parser-->>Mapper: tool calls
Note over Parser: Empty name + null/empty params/result is ignored
Parser-->>Mapper: Non-empty invalid call fails closed
Bundle->>Mapper: assistant event and diagnostics
Mapper->>Mapper: projectedAssistantTime
alt partial session with T2O_IR_EVENT_TIME_INVALID evidence
Mapper->>Target: Clamp completed time to created time
Mapper->>Target: Store source and target times in metadata
else no explicit invalid-time evidence
Mapper-->>Bundle: Reject session
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This branch has not been deployed
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.
问题
TRAE 会把 subagent 执行记录合并进主 session。记录中既包含空工具占位符和矛盾时间,也包含可恢复的
agent_run_id/parent_agent_run_ids拓扑。此前整个会话会被拒绝;第一版修复只能扁平导入,无法在 OpenCode 中显示为真正的 subagent。修复
info.parentID,在父 assistant 消息写入原生subagenttool,并通过state.metadata.sessionID关联验证
ready=22、blocked=0sessionID与 children API 返回的 21 个子会话完全一致npm run check:489 项测试通过npm run verify:opencode -- --jsonnpm run verify:versionsnpm run verify:package产品版本和 CHANGELOG 继续由 release-please 管理。
Summary by Sourcery
将可验证的 TRAE 内联 subagent 历史迁移为 OpenCode 原生父子会话,同时增强部分会话恢复和派生会话图的安全处理。
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores: