# The tool proxy transcript: what a CLI sends through a tool proxy to a
# step's tool socket (>) and each reply (<), one tool socket per session.
# Recorded 2026-11-28 on docs-t1 (linux/amd64) from the Linux tool proxy
# (internal/toolproxy.Serve) by TestLinuxToolProxyTranscript, and the
# oracle for TestDarwinToolProxySpeaksTheProtocol. Record it again with
# EQUIPO_RECORD_TOOL_TRANSCRIPT=1 go test ./internal/runner/thin -run TestLinuxToolProxyTranscript
== implement
> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"claude-code","version":"2.1.312"}}}
< {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"protocolVersion":"2025-06-18","serverInfo":{"name":"equipo-runner","version":"2"}}}
> {"jsonrpc":"2.0","method":"notifications/initialized"}
> {"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}
< {"id":1,"jsonrpc":"2.0","result":{"tools":[{"inputSchema":{"additionalProperties":false,"properties":{"input":{"type":"object"},"tool_name":{"type":"string"},"tool_use_id":{"type":"string"}},"required":["tool_name","input"],"type":"object"},"name":"permission"},{"description":"Not needed: when you finish, Equipo commits your changes in /workspace and pushes them. End with a short summary instead.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"submit_candidate"},{"description":"Nobody can answer during this step. Make the most reasonable choice and say so in your summary.","inputSchema":{"additionalProperties":false,"properties":{"question":{"type":"string"}},"required":["question"],"type":"object"},"name":"ask_person"},{"description":"Not available in this step.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"submit_render"}]}}
> {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Read","tool_use_id":"toolu_2","input":{"file_path":"/workspace/main.go"}}}}
< {"id":2,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"allow\",\"updatedInput\":{\"file_path\":\"/workspace/main.go\"}}","type":"text"}]}}
> {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Edit","tool_use_id":"toolu_3","input":{"file_path":"/workspace/main.go","old_string":"hello","new_string":"hola"}}}}
< {"id":3,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"allow\",\"updatedInput\":{\"file_path\":\"/workspace/main.go\",\"new_string\":\"hola\",\"old_string\":\"hello\"}}","type":"text"}]}}
> {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Read","tool_use_id":"toolu_4","input":{"file_path":"/etc/passwd"}}}}
< {"id":4,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"deny\",\"message\":\"provider_policy_rejected: this step can use files only under /workspace (and read /research)\"}","type":"text"}]}}
> {"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Read","tool_use_id":"toolu_5","input":{"file_path":"/workspace/../etc/passwd"}}}}
< {"id":5,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"deny\",\"message\":\"provider_policy_rejected: this step can use files only under /workspace (and read /research)\"}","type":"text"}]}}
> {"jsonrpc":"2.0","id":5.5,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Read","tool_use_id":"toolu_5.5","input":{"file_path":"/workspace/.git/config"}}}}
< {"id":5.5,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"deny\",\"message\":\"provider_policy_rejected: that path is protected: credentials, runtime files and links are never available\"}","type":"text"}]}}
> {"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"WebFetch","tool_use_id":"toolu_6","input":{"url":"https://example.com/","prompt":"read it"}}}}
< {"id":6,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"deny\",\"message\":\"provider_policy_rejected: this tool is not available to this step\"}","type":"text"}]}}
> {"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Bash","tool_use_id":"toolu_7","input":{"command":"go test ./..."}}}}
< {"id":7,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"allow\",\"updatedInput\":{\"command\":\"go test ./...\"}}","type":"text"}]}}
> {"jsonrpc":"2.0","id":8,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Bash","tool_use_id":"toolu_8","input":{"command":"ls","dangerouslyDisableSandbox":true}}}}
< {"id":8,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"deny\",\"message\":\"provider_policy_rejected: commands run only inside the sandbox; dangerouslyDisableSandbox is not available\"}","type":"text"}]}}
> {"jsonrpc":"2.0","id":9,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"mcp__equipo__submit_candidate","tool_use_id":"toolu_9","input":{}}}}
< {"id":9,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"deny\",\"message\":\"provider_policy_rejected: this tool is not available to this step\"}","type":"text"}]}}
> {"jsonrpc":"2.0","id":10,"method":"tools/call","params":{"name":"submit_candidate","arguments":{},"_meta":{"claudecode/toolUseId":"toolu_10"}}}
< {"id":10,"jsonrpc":"2.0","result":{"content":[{"text":"Not needed in this step: Equipo commits and pushes your changes in /workspace when you finish. Carry on, and end with a short summary of what you changed and why.","type":"text"}],"isError":false}}
> {"jsonrpc":"2.0","id":11,"method":"tools/call","params":{"name":"ask_person","arguments":{"question":"Which colour?"},"_meta":{"claudecode/toolUseId":"toolu_11"}}}
< {"id":11,"jsonrpc":"2.0","result":{"content":[{"text":"Not needed in this step: Equipo commits and pushes your changes in /workspace when you finish. Carry on, and end with a short summary of what you changed and why.","type":"text"}],"isError":false}}
> {"jsonrpc":"2.0","id":12,"method":"tools/call","params":{"name":"submit_render","arguments":null,"_meta":{"claudecode/toolUseId":"toolu_12"}}}
< {"id":12,"jsonrpc":"2.0","result":{"content":[{"text":"Not needed in this step: Equipo commits and pushes your changes in /workspace when you finish. Carry on, and end with a short summary of what you changed and why.","type":"text"}],"isError":false}}
> {"jsonrpc":"2.0","id":13,"method":"tools/call","params":{"name":"submit_answer","arguments":{"answer":"yes"},"_meta":{"claudecode/toolUseId":"toolu_13"}}}
< {"error":{"code":-32602,"message":"unavailable"},"id":13,"jsonrpc":"2.0"}
> {"jsonrpc":"2.0","id":14,"method":"tools/call","params":{"name":"read_file","arguments":{"repo":"oficina/equipo","path":"/etc/passwd"},"_meta":{"claudecode/toolUseId":"toolu_14"}}}
< {"error":{"code":-32602,"message":"unavailable"},"id":14,"jsonrpc":"2.0"}
> {"jsonrpc":"2.0","id":15,"method":"ping"}
< {"id":15,"jsonrpc":"2.0","result":{}}
> {"jsonrpc":"2.0","id":16,"method":"resources/list","params":{}}
< {"error":{"code":-32601,"message":"unavailable"},"id":16,"jsonrpc":"2.0"}
> {"jsonrpc":"2.0","id":"seventeen","method":"tools/call","params":{"name":"submit_candidate"}}
< {"id":"seventeen","jsonrpc":"2.0","result":{"content":[{"text":"Not needed in this step: Equipo commits and pushes your changes in /workspace when you finish. Carry on, and end with a short summary of what you changed and why.","type":"text"}],"isError":false}}
== answer
> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"claude-code","version":"2.1.312"}}}
< {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"protocolVersion":"2025-03-26","serverInfo":{"name":"equipo-runner","version":"2"}}}
> {"jsonrpc":"2.0","method":"notifications/initialized"}
> {"jsonrpc":"2.0","id":1,"method":"tools/list"}
< {"id":1,"jsonrpc":"2.0","result":{"tools":[{"inputSchema":{"additionalProperties":false,"properties":{"input":{"type":"object"},"tool_name":{"type":"string"},"tool_use_id":{"type":"string"}},"required":["tool_name","input"],"type":"object"},"name":"permission"},{"description":"Read-only: the commits of this task's change, from the commit it started from to the one in /workspace, newest first, one line each.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"git_log"},{"description":"Read-only: the change itself, from the commit the task started from to the one in /workspace, as a patch. path limits it to one file or directory.","inputSchema":{"additionalProperties":false,"properties":{"path":{"type":"string"}},"required":[],"type":"object"},"name":"git_diff"},{"description":"Read-only: one commit from git_log, by its hash, with its message and patch.","inputSchema":{"additionalProperties":false,"properties":{"commit":{"type":"string"}},"required":["commit"],"type":"object"},"name":"git_show"}]}}
> {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Read","tool_use_id":"toolu_2","input":{"file_path":"/workspace/README.md"}}}}
< {"id":2,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"allow\",\"updatedInput\":{\"file_path\":\"/workspace/README.md\"}}","type":"text"}]}}
> {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Grep","tool_use_id":"toolu_3","input":{"pattern":"TODO","path":"/workspace"}}}}
< {"id":3,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"allow\",\"updatedInput\":{\"path\":\"/workspace\",\"pattern\":\"TODO\"}}","type":"text"}]}}
> {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Write","tool_use_id":"toolu_4","input":{"file_path":"/workspace/README.md","content":"x"}}}}
< {"id":4,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"deny\",\"message\":\"provider_policy_rejected: this step only reads: use Read, Glob and Grep under /workspace\"}","type":"text"}]}}
> {"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Bash","tool_use_id":"toolu_5","input":{"command":"git log"}}}}
< {"id":5,"jsonrpc":"2.0","result":{"content":[{"text":"{\"behavior\":\"deny\",\"message\":\"provider_policy_rejected: this step only reads: use Read, Glob and Grep under /workspace\"}","type":"text"}]}}
> {"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"git_log","arguments":{},"_meta":{"claudecode/toolUseId":"toolu_6"}}}
< {"id":6,"jsonrpc":"2.0","result":{"content":[{"text":"git_log toolu_6 {}","type":"text"}],"isError":false}}
> {"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"git_diff","arguments":{"path":"main.go"},"_meta":{"claudecode/toolUseId":"toolu_7"}}}
< {"id":7,"jsonrpc":"2.0","result":{"content":[{"text":"git_diff toolu_7 {\"path\":\"main.go\"}","type":"text"}],"isError":false}}
> {"jsonrpc":"2.0","id":8,"method":"tools/call","params":{"name":"git_show","arguments":{"commit":"abc1234"},"_meta":{"claudecode/toolUseId":"toolu_8"}}}
< {"id":8,"jsonrpc":"2.0","result":{"content":[{"text":"git_show toolu_8 {\"commit\":\"abc1234\"}","type":"text"}],"isError":false}}
> {"jsonrpc":"2.0","id":9,"method":"tools/call","params":{"name":"submit_candidate","arguments":{},"_meta":{"claudecode/toolUseId":"toolu_9"}}}
< {"error":{"code":-32602,"message":"unavailable"},"id":9,"jsonrpc":"2.0"}
== submit
> {"jsonrpc":"2.0","id":1,"method":"tools/list"}
< {"error":{"code":-32600,"message":"not initialized"},"id":1,"jsonrpc":"2.0"}
> {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"submit_answer","arguments":{"answer":"before"}}}
< {"error":{"code":-32602,"message":"unavailable"},"id":2,"jsonrpc":"2.0"}
> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-code","version":"2.1.312"}}}
< {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"protocolVersion":"2024-11-05","serverInfo":{"name":"equipo-runner","version":"2"}}}
> {"jsonrpc":"2.0","method":"notifications/initialized"}
> {"jsonrpc":"2.0","id":3,"method":"tools/list"}
< {"id":3,"jsonrpc":"2.0","result":{"tools":[{"description":"Submit the answer.","inputSchema":{"additionalProperties":false,"properties":{"answer":{"type":"string"}},"required":["answer"],"type":"object"},"name":"submit_answer"}]}}
> {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"submit_answer","arguments":{"answer":"The greeting is in main.go, line 12."},"_meta":{"claudecode/toolUseId":"toolu_4"}}}
< {"id":4,"jsonrpc":"2.0","result":{"content":[{"text":"submit_answer toolu_4 {\"answer\":\"The greeting is in main.go, line 12.\"}","type":"text"}],"isError":false}}
> {"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"permission","arguments":{"tool_name":"Read","tool_use_id":"toolu_5","input":{"file_path":"/workspace/main.go"}}}}
< {"error":{"code":-32602,"message":"unavailable"},"id":5,"jsonrpc":"2.0"}
