Answer architecture round 1: 2 🔴, 2 🟡 (0 misread); move transcript parsing into claude_code and keep repeat_read pure
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import dataclasses
|
||||
import posixpath
|
||||
import typing
|
||||
|
||||
from failure import Failure
|
||||
from claude_code.session import subagent_transcript
|
||||
|
||||
FILE_TOOLS = ("Edit", "MultiEdit", "Write")
|
||||
|
||||
@@ -27,8 +27,8 @@ def parsed_call(hook_input: object) -> Call | Failure:
|
||||
agent, agent_id, transcript = hook_input.get("agent_type"), hook_input.get("agent_id"), hook_input.get("transcript_path")
|
||||
transcript = transcript if isinstance(transcript, str) else ""
|
||||
if isinstance(agent_id, str) and transcript:
|
||||
# Inside a subagent, transcript_path still names the session's transcript; the subagent's own sits beside it.
|
||||
transcript = posixpath.join(posixpath.splitext(transcript)[0], "subagents", f"agent-{agent_id}.jsonl")
|
||||
# Inside a subagent, transcript_path still names the session's transcript.
|
||||
transcript = subagent_transcript(transcript, agent_id)
|
||||
return Call(tool, given, cwd, agent if isinstance(agent, str) else "", transcript)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user