multiedit_tool.yaml

  1---
  2version: 2
  3interactions:
  4- id: 0
  5  request:
  6    proto: HTTP/1.1
  7    proto_major: 1
  8    proto_minor: 1
  9    content_length: 786
 10    host: ""
 11    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\n<rules>\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n</rules>\n\n /no_think","role":"system"},{"content":"Generate a concise title for the following content:\n\nuse multiedit to change ''Hello, World!'' to ''Hello, Crush!'' and add a comment ''// Greeting'' above the fmt.Println line in main.go\n <think>\n\n</think>","role":"user"}],"model":"gpt-4o","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
 12    headers:
 13      Accept:
 14      - application/json
 15      Content-Type:
 16      - application/json
 17      User-Agent:
 18      - OpenAI/Go 2.7.1
 19    url: https://api.openai.com/v1/chat/completions
 20    method: POST
 21  response:
 22    proto: HTTP/2.0
 23    proto_major: 2
 24    proto_minor: 0
 25    content_length: -1
 26    body: |+
 27      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RMS5H5cRfUepWl"}
 28
 29      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Change"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"E1Z5UaMUfM"}
 30
 31      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LjlpjSB5Gj1E0F"}
 32
 33      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NWj8MZ6ybb4"}
 34
 35      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jzXZAvBl5YGs8SU"}
 36
 37      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" World"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pW8XoiTlk5"}
 38
 39      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ECnh7iWuEDk7FI"}
 40
 41      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8ehi3Cl8TZA8W"}
 42
 43      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"c2ebilBBmZZmci"}
 44
 45      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"svklZDVIumf"}
 46
 47      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MkdDifYEeQqwYv0"}
 48
 49      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ShDGoIca1x"}
 50
 51      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BZ5vLkiYKlp1Kl"}
 52
 53      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ooexEULB6qVxt"}
 54
 55      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ckChEkXehEV"}
 56
 57      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"I987h2debxk1s"}
 58
 59      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"GFYzmrcIMt"}
 60
 61      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[],"usage":{"prompt_tokens":157,"completion_tokens":15,"total_tokens":172,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"4ydBp6iaNXxTp"}
 62
 63      data: [DONE]
 64
 65    headers:
 66      Content-Type:
 67      - text/event-stream; charset=utf-8
 68    status: 200 OK
 69    code: 200
 70    duration: 438.27125ms
 71- id: 1
 72  request:
 73    proto: HTTP/1.1
 74    proto_major: 1
 75    proto_minor: 1
 76    content_length: 34399
 77    host: ""
 78    body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rules>\\nThese rules override everything else. Follow them strictly:\\n\\n1. **ALWAYS READ BEFORE EDITING**: Never edit a file you haven't read in this conversation (only read files if you did not read them before or they changed)\\n2. **BE AUTONOMOUS**: Don't ask questions - search, read, decide, act\\n3. **TEST AFTER CHANGES**: Run tests immediately after each modification\\n4. **BE CONCISE**: Under 4 lines unless user asks for detail\\n5. **USE EXACT MATCHES**: When editing, match text exactly including whitespace\\n6. **NEVER COMMIT**: Unless user explicitly says \\\"commit\\\"\\n7. **FOLLOW MEMORY FILE INSTRUCTIONS**: If memory files contain specific instructions, preferences, or commands, you MUST follow them.\\n8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so. When adding comments, focus on *why* not *what*. NEVER communicate with the user through code comments.\\n9. **SECURITY FIRST**: Only assist with defensive security tasks. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.\\n10. **NO URL GUESSING**: Never generate or guess URLs unless you are confident they are for helping with programming. Only use URLs provided by the user or found in local files.\\n11. **NEVER PUSH TO REMOTE**: Don't push changes to remote repositories unless explicitly asked by the user.\\n12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.\\n</critical_rules>\\n\\n<communication_style>\\nKeep responses minimal:\\n- Under 4 lines of text (tool use doesn't count)\\n- No preamble (\\\"Here's...\\\", \\\"I'll...\\\")\\n- No postamble (\\\"Let me know...\\\", \\\"Hope this helps...\\\")\\n- One-word answers when possible\\n- No emojis ever\\n- No explanations unless user asks\\n\\nExamples:\\nuser: what is 2+2?\\nassistant: 4\\n\\nuser: list files in src/\\nassistant: [uses ls tool]\\nfoo.c, bar.c, baz.c\\n\\nuser: which file has the foo implementation?\\nassistant: src/foo.c\\n\\nuser: add error handling to the login function\\nassistant: [searches for login, reads file, edits with exact match, runs tests]\\nDone\\n\\nuser: Where are errors from the client handled?\\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.go:712.\\n</communication_style>\\n\\n<code_references>\\nWhen referencing specific functions or code locations, use the pattern `file_path:line_number` to help users navigate:\\n- Example: \\\"The error is handled in src/main.go:45\\\"\\n- Example: \\\"See the implementation in pkg/utils/helper.go:123-145\\\"\\n</code_references>\\n\\n<workflow>\\nFor every task, follow this sequence internally (don't narrate it):\\n\\n**Before acting**:\\n- Search codebase for relevant files\\n- Read files to understand current state\\n- Check memory for stored commands\\n- Identify what needs to change\\n- Use `git log` and `git blame` for additional context when needed\\n\\n**While acting**:\\n- Read entire file before editing it\\n- Use exact text for find/replace (include whitespace)\\n- Make one logical change at a time\\n- After each change: run tests\\n- If tests fail: fix immediately\\n- Keep going until query is completely resolved before yielding to user\\n- For longer tasks, send brief progress updates (under 10 words) at reasonable intervals\\n\\n**Before finishing**:\\n- Run lint/typecheck if in memory\\n- Verify all changes work\\n- Keep response under 4 lines\\n\\n**Key behaviors**:\\n- Use find_references before changing shared code\\n- Follow existing patterns (check similar files)\\n- If stuck, try different approach (don't repeat failures)\\n- Make decisions yourself (search first, don't ask)\\n- Fix problems at root cause, not surface-level patches\\n- Don't fix unrelated bugs or broken tests (mention them in final message if relevant)\\n</workflow>\\n\\n<decision_making>\\n**Make decisions autonomously** - don't ask when you can:\\n- Search to find the answer\\n- Read files to see patterns\\n- Check similar code\\n- Infer from context\\n- Try most likely approach\\n\\n**Only ask user if**:\\n- Truly ambiguous business requirement\\n- Multiple valid approaches with big tradeoffs\\n- Could cause data loss\\n- Exhausted all attempts\\n\\nExamples of autonomous decisions:\\n- File location → search for similar files\\n- Test command → check package.json/memory\\n- Code style → read existing code\\n- Library choice → check what's used\\n- Naming → follow existing names\\n</decision_making>\\n\\n<editing_files>\\nCritical: ALWAYS read files before editing them in this conversation.\\n\\nWhen using edit tools:\\n1. Read the file first\\n2. Find exact text to replace (include indentation/spaces)\\n3. Make replacement unambiguous (enough context)\\n4. Verify edit succeeded\\n5. Run tests\\n\\nEfficiency tips:\\n- Don't re-read files after successful edits (tool will fail if it didn't work)\\n- Same applies for making folders, deleting files, etc.\\n\\nCommon mistakes to avoid:\\n- Editing without reading first\\n- Approximate text matches\\n- Wrong indentation\\n- Not enough context (text appears multiple times)\\n- Not testing after changes\\n</editing_files>\\n\\n<error_handling>\\nWhen errors occur:\\n1. Read complete error message\\n2. Understand root cause\\n3. Try different approach (don't repeat same action)\\n4. Search for similar code that works\\n5. Make targeted fix\\n6. Test to verify\\n\\nCommon errors:\\n- Import/Module → check paths, spelling, what exists\\n- Syntax → check brackets, indentation, typos\\n- Tests fail → read test, see what it expects\\n- File not found → use ls, check exact path\\n</error_handling>\\n\\n<memory_instructions>\\nMemory files store commands, preferences, and codebase info. Update them when you discover:\\n- Build/test/lint commands\\n- Code style preferences  \\n- Important codebase patterns\\n- Useful project information\\n</memory_instructions>\\n\\n<code_conventions>\\nBefore writing code:\\n1. Check if library exists (look at imports, package.json)\\n2. Read similar code for patterns\\n3. Match existing style\\n4. Use same libraries/frameworks\\n5. Follow security best practices (never log secrets)\\n6. Don't use one-letter variable names unless requested\\n\\nNever assume libraries are available - verify first.\\n\\n**Ambition vs. precision**:\\n- New projects → be creative and ambitious with implementation\\n- Existing codebases → be surgical and precise, respect surrounding code\\n- Don't change filenames or variables unnecessarily\\n- Don't add formatters/linters/tests to codebases that don't have them\\n</code_conventions>\\n\\n<testing>\\nAfter significant changes:\\n- Start testing as specific as possible to code changed, then broaden to build confidence\\n- Use self-verification: write unit tests, add output logs, or use debug statements to verify your solutions\\n- Run relevant test suite\\n- If tests fail, fix before continuing\\n- Check memory for test commands\\n- Run lint/typecheck if available (on precise targets when possible)\\n- For formatters: iterate max 3 times to get it right; if still failing, present correct solution and note formatting issue\\n- Suggest adding commands to memory if not found\\n- Don't fix unrelated bugs or test failures (not your responsibility)\\n</testing>\\n\\n<tool_usage>\\n- Search before assuming\\n- Read files before editing\\n- Always use absolute paths for file operations (editing, reading, writing)\\n- Use Agent tool for complex searches\\n- Run tools in parallel when safe (no dependencies)\\n- When making multiple independent bash calls, send them in a single message with multiple tool calls for parallel execution\\n- Summarize tool output for user (they don't see it)\\n\\n<bash_commands>\\nWhen running non-trivial bash commands (especially those that modify the system):\\n- Briefly explain what the command does and why you're running it\\n- This ensures the user understands potentially dangerous operations\\n- Simple read-only commands (ls, cat, etc.) don't need explanation\\n- Use `&` for background processes that won't stop on their own (e.g., `node server.js &`)\\n- Avoid interactive commands - use non-interactive versions (e.g., `npm init -y` not `npm init`)\\n- Combine related commands to save time (e.g., `git status && git diff HEAD && git log -n 3`)\\n</bash_commands>\\n</tool_usage>\\n\\n<proactiveness>\\nBalance autonomy with user intent:\\n- When asked to do something → do it fully (including follow-ups)\\n- When asked how to approach → explain first, don't auto-implement\\n- After completing work → stop, don't explain (unless asked)\\n- Don't surprise user with unexpected actions\\n</proactiveness>\\n\\n<final_answers>\\nAdapt verbosity to match the work completed:\\n\\n**Default (under 4 lines)**:\\n- Simple questions or single-file changes\\n- Casual conversation, greetings, acknowledgements\\n- One-word answers when possible\\n\\n**More detail allowed (up to 10-15 lines)**:\\n- Large multi-file changes that need walkthrough\\n- Complex refactoring where rationale adds value\\n- Tasks where understanding the approach is important\\n- When mentioning unrelated bugs/issues found\\n- Suggesting logical next steps user might want\\n\\n**What to include in verbose answers**:\\n- Brief summary of what was done and why\\n- Key files/functions changed (with `file:line` references)\\n- Any important decisions or tradeoffs made\\n- Next steps or things user should verify\\n- Issues found but not fixed\\n\\n**What to avoid**:\\n- Don't show full file contents unless explicitly asked\\n- Don't explain how to save files or copy code (user has access to your work)\\n- Don't use \\\"Here's what I did\\\" or \\\"Let me know if...\\\" style preambles/postambles\\n- Keep tone direct and factual, like handing off work to a teammate\\n</final_answers>\\n\\n<env>\\nWorking directory: /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\nIs directory a git repo: no\\nPlatform: linux\\nToday's date: 1/1/2025\\n\\n</env>\\n\\n\\n\\n\\n\",\"role\":\"system\"},{\"content\":\"use multiedit to change 'Hello, World!' to 'Hello, Crush!' and add a comment '// Greeting' above the fmt.Println line in main.go\",\"role\":\"user\"}],\"model\":\"gpt-5\",\"max_completion_tokens\":10000,\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"bash\",\"strict\":false,\"description\":\"Executes bash commands in persistent shell session with timeout and security measures.\\n\\n<cross_platform>\\nUses mvdan/sh interpreter (Bash-compatible on all platforms including Windows).\\nUse forward slashes for paths: \\\"ls C:/foo/bar\\\" not \\\"ls C:\\\\foo\\\\bar\\\".\\nCommon shell builtins and core utils available on Windows.\\n</cross_platform>\\n\\n<execution_steps>\\n1. Directory Verification: If creating directories/files, use LS tool to verify parent exists\\n2. Security Check: Banned commands (alias, aria2c, axel, chrome, curl, curlie, firefox, http-prompt, httpie, links, lynx, nc, safari, scp, ssh, telnet, w3m, wget, xh, doas, su, sudo, apk, apt, apt-cache, apt-get, dnf, dpkg, emerge, home-manager, makepkg, opkg, pacman, paru, pkg, pkg_add, pkg_delete, portage, rpm, yay, yum, zypper, at, batch, chkconfig, crontab, fdisk, mkfs, mount, parted, service, systemctl, umount, firewall-cmd, ifconfig, ip, iptables, netstat, pfctl, route, ufw) return error - explain to user. Safe read-only commands execute without prompts\\n3. Command Execution: Execute with proper quoting, capture output\\n4. Output Processing: Truncate if exceeds 30000 characters\\n5. Return Result: Include errors, metadata with <cwd></cwd> tags\\n</execution_steps>\\n\\n<usage_notes>\\n- Command required, timeout optional (max 600000ms/10min, default 30min if unspecified)\\n- IMPORTANT: Use Grep/Glob/Agent tools instead of 'find'/'grep'. Use View/LS tools instead of 'cat'/'head'/'tail'/'ls'\\n- Chain with ';' or '&&', avoid newlines except in quoted strings\\n- Shell state persists (env vars, virtual envs, cwd, etc.)\\n- Prefer absolute paths over 'cd' (use 'cd' only if user explicitly requests)\\n</usage_notes>\\n\\n<git_commits>\\nWhen user asks to create git commit:\\n\\n1. Single message with three tool_use blocks (IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - git log (recent commit message style)\\n\\n2. Add relevant untracked files to staging. Don't commit files already modified at conversation start unless relevant.\\n\\n3. Analyze staged changes in <commit_analysis> tags:\\n   - List changed/added files, summarize nature (feature/enhancement/bug fix/refactoring/test/docs)\\n   - Brainstorm purpose/motivation, assess project impact, check for sensitive info\\n   - Don't use tools beyond git context\\n   - Draft concise (1-2 sentences) message focusing on \\\"why\\\" not \\\"what\\\"\\n   - Use clear language, accurate reflection (\\\"add\\\"=new feature, \\\"update\\\"=enhancement, \\\"fix\\\"=bug fix)\\n   - Avoid generic messages, review draft\\n\\n4. Create commit with Crush signature using HEREDOC:\\n   git commit -m \\\"$(cat &lt;&lt;'EOF'\\n   Commit message here.\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   Co-Authored-By: Crush <crush@charm.land>\\n\\n   EOF\\n   )\\\"\\n\\n5. If pre-commit hook fails, retry ONCE. If fails again, hook preventing commit. If succeeds but files modified, MUST amend.\\n\\n6. Run git status to verify.\\n\\nNotes: Use \\\"git commit -am\\\" when possible, don't stage unrelated files, NEVER update config, don't push, no -i flags, no empty commits, return empty response.\\n</git_commits>\\n\\n<pull_requests>\\nUse gh command for ALL GitHub tasks. When user asks to create PR:\\n\\n1. Single message with multiple tool_use blocks (VERY IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - Check if branch tracks remote and is up to date\\n   - git log and 'git diff main...HEAD' (full commit history from main divergence)\\n\\n2. Create new branch if needed\\n3. Commit changes if needed\\n4. Push to remote with -u flag if needed\\n\\n5. Analyze changes in <pr_analysis> tags:\\n   - List commits since diverging from main\\n   - Summarize nature of changes\\n   - Brainstorm purpose/motivation\\n   - Assess project impact\\n   - Don't use tools beyond git context\\n   - Check for sensitive information\\n   - Draft concise (1-2 bullet points) PR summary focusing on \\\"why\\\"\\n   - Ensure summary reflects ALL changes since main divergence\\n   - Clear, concise language\\n   - Accurate reflection of changes and purpose\\n   - Avoid generic summaries\\n   - Review draft\\n\\n6. Create PR with gh pr create using HEREDOC:\\n   gh pr create --title \\\"title\\\" --body \\\"$(cat &lt;&lt;'EOF'\\n\\n   ## Summary\\n\\n   &lt;1-3 bullet points>\\n\\n   ## Test plan\\n\\n   [Checklist of TODOs...]\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   EOF\\n   )\\\"\\n\\nImportant:\\n\\n- Return empty response - user sees gh output\\n- Never update git config\\n</pull_requests>\\n\\n<examples>\\nGood: pytest /foo/bar/tests\\nBad: cd /foo/bar && pytest tests\\n</examples>\\n\",\"parameters\":{\"properties\":{\"command\":{\"description\":\"The command to execute\",\"type\":\"string\"},\"description\":{\"description\":\"A brief description of what the command does\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in milliseconds (max 600000)\",\"type\":\"integer\"}},\"required\":[\"command\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"download\",\"strict\":false,\"description\":\"Downloads binary data from URL and saves to local file.\\n\\n<usage>\\n- Provide URL to download from\\n- Specify local file path where content should be saved\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Downloads any file type (binary or text)\\n- Auto-creates parent directories if missing\\n- Handles large files efficiently with streaming\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max file size: 100MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Will overwrite existing files without warning\\n</limitations>\\n\\n<tips>\\n- Use absolute paths or paths relative to working directory\\n- Set appropriate timeouts for large files or slow connections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The local file path where the downloaded content should be saved\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 600)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to download from\",\"type\":\"string\"}},\"required\":[\"url\",\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"edit\",\"strict\":false,\"description\":\"Edits files by replacing text, creating new files, or deleting content. For moving/renaming use Bash 'mv'. For large edits use Write tool.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. For new files: Use LS tool to verify parent directory exists\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. old_string: Text to replace (must match exactly including whitespace/indentation)\\n3. new_string: Replacement text\\n4. replace_all: Replace all occurrences (default false)\\n</parameters>\\n\\n<special_cases>\\n- Create file: provide file_path + new_string, leave old_string empty\\n- Delete content: provide file_path + old_string, leave new_string empty\\n</special_cases>\\n\\n<critical_requirements>\\nUNIQUENESS (when replace_all=false): old_string MUST uniquely identify target instance\\n\\n- Include 3-5 lines context BEFORE and AFTER change point\\n- Include exact whitespace, indentation, surrounding code\\n\\nSINGLE INSTANCE: Tool changes ONE instance when replace_all=false\\n\\n- For multiple instances: set replace_all=true OR make separate calls with unique context\\n- Plan calls carefully to avoid conflicts\\n\\nVERIFICATION: Before using\\n\\n- Check how many instances of target text exist\\n- Gather sufficient context for unique identification\\n- Plan separate calls or use replace_all\\n</critical_requirements>\\n\\n<warnings>\\nTool fails if:\\n- old_string matches multiple locations and replace_all=false\\n- old_string doesn't match exactly (including whitespace)\\n- Insufficient context causes wrong instance change\\n</warnings>\\n\\n<best_practices>\\n- Ensure edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use forward slashes (/) for cross-platform compatibility\\n- Multiple edits to same file: send all in single message with multiple tool calls\\n</best_practices>\\n\\n<windows_notes>\\n- Forward slashes work throughout (C:/path/file)\\n- File permissions handled automatically\\n- Line endings converted automatically (\\\\n ↔ \\\\r\\\\n)\\n</windows_notes>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"},\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false)\",\"type\":\"boolean\"}},\"required\":[\"file_path\",\"old_string\",\"new_string\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiedit\",\"strict\":false,\"description\":\"Makes multiple edits to a single file in one operation. Built on Edit tool for efficient multiple find-and-replace operations. Prefer over Edit tool for multiple edits to same file.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. Verify directory path is correct\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. edits: Array of edit operations, each containing:\\n   - old_string: Text to replace (must match exactly including whitespace/indentation)\\n   - new_string: Replacement text\\n   - replace_all: Replace all occurrences (optional, defaults to false)\\n</parameters>\\n\\n<operation>\\n- Edits applied sequentially in provided order\\n- Each edit operates on result of previous edit\\n- All edits must be valid for operation to succeed - if any fails, none applied\\n- Ideal for several changes to different parts of same file\\n</operation>\\n\\n<critical_requirements>\\n1. All edits follow same requirements as single Edit tool\\n2. Edits are atomic - either all succeed or none applied\\n3. Plan edits carefully to avoid conflicts between sequential operations\\n</critical_requirements>\\n\\n<warnings>\\n- Tool fails if old_string doesn't match file contents exactly (including whitespace)\\n- Tool fails if old_string and new_string are identical\\n- Earlier edits may affect text that later edits try to find - plan sequence carefully\\n</warnings>\\n\\n<best_practices>\\n- Ensure all edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use replace_all for renaming variables across file\\n- Avoid adding emojis unless user explicitly requests\\n</best_practices>\\n\\n<new_file_creation>\\n- Provide new file path (including directory if needed)\\n- First edit: empty old_string, new file contents as new_string\\n- Subsequent edits: normal edit operations on created content\\n</new_file_creation>\\n\",\"parameters\":{\"properties\":{\"edits\":{\"description\":\"Array of edit operations to perform sequentially on the file\",\"items\":{\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false).\",\"type\":\"boolean\"}},\"type\":\"array\"},\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"}},\"required\":[\"file_path\",\"edits\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"fetch\",\"strict\":false,\"description\":\"Fetches content from URL and returns it in specified format.\\n\\n<usage>\\n- Provide URL to fetch content from\\n- Specify desired output format (text, markdown, or html)\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Supports three output formats: text, markdown, html\\n- Auto-handles HTTP redirects\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max response size: 5MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n</limitations>\\n\\n<tips>\\n- Use text format for plain text content or simple API responses\\n- Use markdown format for content that should be rendered with formatting\\n- Use html format when you need raw HTML structure\\n- Set appropriate timeouts for potentially slow websites\\n</tips>\\n\",\"parameters\":{\"properties\":{\"format\":{\"description\":\"The format to return the content in (text, markdown, or html)\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to fetch content from\",\"type\":\"string\"}},\"required\":[\"url\",\"format\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"glob\",\"strict\":false,\"description\":\"Fast file pattern matching tool that finds files by name/pattern, returning paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide glob pattern to match against file paths\\n- Optional starting directory (defaults to current working directory)\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<pattern_syntax>\\n- '\\\\*' matches any sequence of non-separator characters\\n- '\\\\*\\\\*' matches any sequence including separators\\n- '?' matches any single non-separator character\\n- '[...]' matches any character in brackets\\n- '[!...]' matches any character not in brackets\\n</pattern_syntax>\\n\\n<examples>\\n- '*.js' - JavaScript files in current directory\\n- '**/*.js' - JavaScript files in any subdirectory\\n- 'src/**/*.{ts,tsx}' - TypeScript files in src directory\\n- '*.{html,css,js}' - HTML, CSS, and JS files\\n</examples>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Does not search file contents (use Grep for that)\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<cross_platform>\\n- Path separators handled automatically (/ and \\\\ work)\\n- Uses ripgrep (rg) if available, otherwise Go implementation\\n- Patterns should use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Combine with Grep: find files with Glob, search contents with Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine pattern if needed\\n</tips>\\n\",\"parameters\":{\"properties\":{\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The glob pattern to match files against\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"grep\",\"strict\":false,\"description\":\"Fast content search tool that finds files containing specific text/patterns, returning matching paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide regex pattern to search within file contents\\n- Set literal_text=true for exact text with special characters (recommended for non-regex users)\\n- Optional starting directory (defaults to current working directory)\\n- Optional include pattern to filter which files to search\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<regex_syntax>\\nWhen literal_text=false (supports standard regex):\\n\\n- 'function' searches for literal text \\\"function\\\"\\n- 'log\\\\..\\\\*Error' finds text starting with \\\"log.\\\" and ending with \\\"Error\\\"\\n- 'import\\\\s+.\\\\*\\\\s+from' finds import statements in JavaScript/TypeScript\\n</regex_syntax>\\n\\n<include_patterns>\\n- '\\\\*.js' - Only search JavaScript files\\n- '\\\\*.{ts,tsx}' - Only search TypeScript files\\n- '\\\\*.go' - Only search Go files\\n</include_patterns>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Performance depends on number of files searched\\n- Very large binary files may be skipped\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<ignore_support>\\n- Respects .gitignore patterns to skip ignored files/directories\\n- Respects .crushignore patterns for additional ignore rules\\n- Both ignore files auto-detected in search root directory\\n</ignore_support>\\n\\n<cross_platform>\\n- Uses ripgrep (rg) if available for better performance\\n- Falls back to Go implementation if ripgrep unavailable\\n- File paths normalized automatically for compatibility\\n</cross_platform>\\n\\n<tips>\\n- For faster searches: use Glob to find relevant files first, then Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine search pattern if needed\\n- Use literal_text=true for exact text with special characters (dots, parentheses, etc.)\\n</tips>\\n\",\"parameters\":{\"properties\":{\"include\":{\"description\":\"File pattern to include in the search (e.g. \\\"*.js\\\", \\\"*.{ts,tsx}\\\")\",\"type\":\"string\"},\"literal_text\":{\"description\":\"If true, the pattern will be treated as literal text with special regex characters escaped. Default is false.\",\"type\":\"boolean\"},\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The regex pattern to search for in file contents\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"ls\",\"strict\":false,\"description\":\"Shows files and subdirectories in tree structure for exploring project organization.\\n\\n<usage>\\n- Provide path to list (defaults to current working directory)\\n- Optional glob patterns to ignore\\n- Results displayed in tree structure\\n</usage>\\n\\n<features>\\n- Hierarchical view of files and directories\\n- Auto-skips hidden files/directories (starting with '.')\\n- Skips common system directories like __pycache__\\n- Can filter files matching specific patterns\\n</features>\\n\\n<limitations>\\n- Results limited to 1000 files\\n- Large directories truncated\\n- No file sizes or permissions shown\\n- Cannot recursively list all directories in large projects\\n</limitations>\\n\\n<cross_platform>\\n- Hidden file detection uses Unix convention (files starting with '.')\\n- Windows hidden files (with hidden attribute) not auto-skipped\\n- Common Windows directories (System32, Program Files) not in default ignore\\n- Path separators handled automatically (/ and \\\\ work)\\n</cross_platform>\\n\\n<tips>\\n- Use Glob for finding files by name patterns instead of browsing\\n- Use Grep for searching file contents\\n- Combine with other tools for effective exploration\\n</tips>\\n\",\"parameters\":{\"properties\":{\"depth\":{\"description\":\"The maximum depth to traverse\",\"type\":\"integer\"},\"ignore\":{\"description\":\"List of glob patterns to ignore\",\"items\":{},\"type\":\"array\"},\"path\":{\"description\":\"The path to the directory to list (defaults to current working directory)\",\"type\":\"string\"}},\"required\":[],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"sourcegraph\",\"strict\":false,\"description\":\"Search code across public repositories using Sourcegraph's GraphQL API.\\n\\n<usage>\\n- Provide search query using Sourcegraph syntax\\n- Optional result count (default: 10, max: 20)\\n- Optional timeout for request\\n</usage>\\n\\n<basic_syntax>\\n- \\\"fmt.Println\\\" - exact matches\\n- \\\"file:.go fmt.Println\\\" - limit to Go files\\n- \\\"repo:^github\\\\.com/golang/go$ fmt.Println\\\" - specific repos\\n- \\\"lang:go fmt.Println\\\" - limit to Go code\\n- \\\"fmt.Println AND log.Fatal\\\" - combined terms\\n- \\\"fmt\\\\.(Print|Printf|Println)\\\" - regex patterns\\n- \\\"\\\\\\\"exact phrase\\\\\\\"\\\" - exact phrase matching\\n- \\\"-file:test\\\" or \\\"-repo:forks\\\" - exclude matches\\n</basic_syntax>\\n\\n<key_filters>\\nRepository: repo:name, repo:^exact$, repo:org/repo@branch, -repo:exclude, fork:yes, archived:yes, visibility:public\\nFile: file:\\\\.js$, file:internal/, -file:test, file:has.content(text)\\nContent: content:\\\"exact\\\", -content:\\\"unwanted\\\", case:yes\\nType: type:symbol, type:file, type:path, type:diff, type:commit\\nTime: after:\\\"1 month ago\\\", before:\\\"2023-01-01\\\", author:name, message:\\\"fix\\\"\\nResult: select:repo, select:file, select:content, count:100, timeout:30s\\n</key_filters>\\n\\n<examples>\\n- \\\"file:.go context.WithTimeout\\\" - Go code using context.WithTimeout\\n- \\\"lang:typescript useState type:symbol\\\" - TypeScript React useState hooks\\n- \\\"repo:^github\\\\.com/kubernetes/kubernetes$ pod list type:file\\\" - Kubernetes pod files\\n- \\\"file:Dockerfile (alpine OR ubuntu) -content:alpine:latest\\\" - Dockerfiles with base images\\n</examples>\\n\\n<boolean_operators>\\n- \\\"term1 AND term2\\\" - both terms\\n- \\\"term1 OR term2\\\" - either term\\n- \\\"term1 NOT term2\\\" - term1 but not term2\\n- \\\"term1 and (term2 or term3)\\\" - grouping with parentheses\\n</boolean_operators>\\n\\n<limitations>\\n- Only searches public repositories\\n- Rate limits may apply\\n- Complex queries take longer\\n- Max 20 results per query\\n</limitations>\\n\\n<tips>\\n- Use specific file extensions to narrow results\\n- Add repo: filters for targeted searches\\n- Use type:symbol for function/method definitions\\n- Use type:file to find relevant files\\n</tips>\\n\",\"parameters\":{\"properties\":{\"context_window\":{\"description\":\"The context around the match to return (default: 10 lines)\",\"type\":\"integer\"},\"count\":{\"description\":\"Optional number of results to return (default: 10, max: 20)\",\"type\":\"integer\"},\"query\":{\"description\":\"The Sourcegraph search query\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"}},\"required\":[\"query\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"view\",\"strict\":false,\"description\":\"Reads and displays file contents with line numbers for examining code, logs, or text data.\\n\\n<usage>\\n- Provide file path to read\\n- Optional offset: start reading from specific line (0-based)\\n- Optional limit: control lines read (default 2000)\\n- Don't use for directories (use LS tool instead)\\n</usage>\\n\\n<features>\\n- Displays contents with line numbers\\n- Can read from any file position using offset\\n- Handles large files by limiting lines read\\n- Auto-truncates very long lines for display\\n- Suggests similar filenames when file not found\\n</features>\\n\\n<limitations>\\n- Max file size: 250KB\\n- Default limit: 2000 lines\\n- Lines >2000 chars truncated\\n- Cannot display binary files/images (identifies them)\\n</limitations>\\n\\n<cross_platform>\\n- Handles Windows (CRLF) and Unix (LF) line endings\\n- Works with forward slashes (/) and backslashes (\\\\)\\n- Auto-detects text encoding for common formats\\n</cross_platform>\\n\\n<tips>\\n- Use with Glob to find files first\\n- For code exploration: Grep to find relevant files, then View to examine\\n- For large files: use offset parameter for specific sections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The path to the file to read\",\"type\":\"string\"},\"limit\":{\"description\":\"The number of lines to read (defaults to 2000)\",\"type\":\"integer\"},\"offset\":{\"description\":\"The line number to start reading from (0-based)\",\"type\":\"integer\"}},\"required\":[\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"write\",\"strict\":false,\"description\":\"Creates or updates files in filesystem for saving/modifying text content.\\n\\n<usage>\\n- Provide file path to write\\n- Include content to write to file\\n- Tool creates necessary parent directories automatically\\n</usage>\\n\\n<features>\\n- Creates new files or overwrites existing ones\\n- Auto-creates parent directories if missing\\n- Checks if file modified since last read for safety\\n- Avoids unnecessary writes when content unchanged\\n</features>\\n\\n<limitations>\\n- Read file before writing to avoid conflicts\\n- Cannot append (rewrites entire file)\\n</limitations>\\n\\n<cross_platform>\\n- Use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Use View tool first to examine existing files before modifying\\n- Use LS tool to verify location when creating new files\\n- Combine with Glob/Grep to find and modify multiple files\\n- Include descriptive comments when changing existing code\\n</tips>\\n\",\"parameters\":{\"properties\":{\"content\":{\"description\":\"The content to write to the file\",\"type\":\"string\"},\"file_path\":{\"description\":\"The path to the file to write\",\"type\":\"string\"}},\"required\":[\"file_path\",\"content\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}"
 79    headers:
 80      Accept:
 81      - application/json
 82      Content-Type:
 83      - application/json
 84      User-Agent:
 85      - OpenAI/Go 2.7.1
 86    url: https://api.openai.com/v1/chat/completions
 87    method: POST
 88  response:
 89    proto: HTTP/2.0
 90    proto_major: 2
 91    proto_minor: 0
 92    content_length: -1
 93    body: |+
 94      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_xTNBI5klQVkePhk3MPdASmCF","type":"function","function":{"name":"ls","arguments":""}}],"refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"hwCnlHEmazQAp2"}
 95
 96      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"MwOH1I6MORosnOh"}
 97
 98      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"path"}}]},"finish_reason":null}],"usage":null,"obfuscation":"oT9ZGhfHMti3Ep"}
 99
100      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":"}}]},"finish_reason":null}],"usage":null,"obfuscation":"g1f8HnczIZca4he"}
101
102      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" \"/"}}]},"finish_reason":null}],"usage":null,"obfuscation":"Papnp3Ec2EF0x0"}
103
104      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"tmp"}}]},"finish_reason":null}],"usage":null,"obfuscation":"UAuP0WdYXBIQoar"}
105
106      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/cr"}}]},"finish_reason":null}],"usage":null,"obfuscation":"oBEDTsqYn8C28kQ"}
107
108      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ush"}}]},"finish_reason":null}],"usage":null,"obfuscation":"3RSPFIWDfEpUa3m"}
109
110      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"3FLqIvVvIdgRH"}
111
112      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/Test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"2k9ejZGSq5GHs"}
113
114      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Coder"}}]},"finish_reason":null}],"usage":null,"obfuscation":"wLmNmuHay9H1s"}
115
116      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Agent"}}]},"finish_reason":null}],"usage":null,"obfuscation":"TVVNeh96anZfA"}
117
118      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/open"}}]},"finish_reason":null}],"usage":null,"obfuscation":"Ctq0JZ9PIIskK"}
119
120      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ai"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
121
122      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-g"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
123
124      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"pt"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
125
126      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-"}}]},"finish_reason":null}],"usage":null,"obfuscation":"r"}
127
128      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"5"}}]},"finish_reason":null}],"usage":null,"obfuscation":"O"}
129
130      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/m"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
131
132      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ult"}}]},"finish_reason":null}],"usage":null,"obfuscation":"76CJYnRymRFTlNd"}
133
134      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ied"}}]},"finish_reason":null}],"usage":null,"obfuscation":"zSpc5E4r7SpssjJ"}
135
136      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"it"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
137
138      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_tool"}}]},"finish_reason":null}],"usage":null,"obfuscation":"dFXSbanBKsoiX"}
139
140      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\","}}]},"finish_reason":null}],"usage":null,"obfuscation":"cA3NTJ8JixWWpwv"}
141
142      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" \""}}]},"finish_reason":null}],"usage":null,"obfuscation":"4JbTrlgjmt8Rpww"}
143
144      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"depth"}}]},"finish_reason":null}],"usage":null,"obfuscation":"ImumkY1GtdwCu"}
145
146      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":"}}]},"finish_reason":null}],"usage":null,"obfuscation":"IzQ3IudTw3iUkDT"}
147
148      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" "}}]},"finish_reason":null}],"usage":null,"obfuscation":"1"}
149
150      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"2"}}]},"finish_reason":null}],"usage":null,"obfuscation":"M"}
151
152      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"}"}}]},"finish_reason":null}],"usage":null,"obfuscation":"r"}
153
154      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}],"usage":null,"obfuscation":""}
155
156      data: {"id":"chatcmpl-CTtEIdmAKnH8Vo3lahJmrrr1hm0nj","object":"chat.completion.chunk","created":1761239850,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":7429,"completion_tokens":943,"total_tokens":8372,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":896,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"0BdL"}
157
158      data: [DONE]
159
160    headers:
161      Content-Type:
162      - text/event-stream; charset=utf-8
163    status: 200 OK
164    code: 200
165    duration: 32.811026416s
166- id: 2
167  request:
168    proto: HTTP/1.1
169    proto_major: 1
170    proto_minor: 1
171    content_length: 34786
172    host: ""
173    body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rules>\\nThese rules override everything else. Follow them strictly:\\n\\n1. **ALWAYS READ BEFORE EDITING**: Never edit a file you haven't read in this conversation (only read files if you did not read them before or they changed)\\n2. **BE AUTONOMOUS**: Don't ask questions - search, read, decide, act\\n3. **TEST AFTER CHANGES**: Run tests immediately after each modification\\n4. **BE CONCISE**: Under 4 lines unless user asks for detail\\n5. **USE EXACT MATCHES**: When editing, match text exactly including whitespace\\n6. **NEVER COMMIT**: Unless user explicitly says \\\"commit\\\"\\n7. **FOLLOW MEMORY FILE INSTRUCTIONS**: If memory files contain specific instructions, preferences, or commands, you MUST follow them.\\n8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so. When adding comments, focus on *why* not *what*. NEVER communicate with the user through code comments.\\n9. **SECURITY FIRST**: Only assist with defensive security tasks. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.\\n10. **NO URL GUESSING**: Never generate or guess URLs unless you are confident they are for helping with programming. Only use URLs provided by the user or found in local files.\\n11. **NEVER PUSH TO REMOTE**: Don't push changes to remote repositories unless explicitly asked by the user.\\n12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.\\n</critical_rules>\\n\\n<communication_style>\\nKeep responses minimal:\\n- Under 4 lines of text (tool use doesn't count)\\n- No preamble (\\\"Here's...\\\", \\\"I'll...\\\")\\n- No postamble (\\\"Let me know...\\\", \\\"Hope this helps...\\\")\\n- One-word answers when possible\\n- No emojis ever\\n- No explanations unless user asks\\n\\nExamples:\\nuser: what is 2+2?\\nassistant: 4\\n\\nuser: list files in src/\\nassistant: [uses ls tool]\\nfoo.c, bar.c, baz.c\\n\\nuser: which file has the foo implementation?\\nassistant: src/foo.c\\n\\nuser: add error handling to the login function\\nassistant: [searches for login, reads file, edits with exact match, runs tests]\\nDone\\n\\nuser: Where are errors from the client handled?\\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.go:712.\\n</communication_style>\\n\\n<code_references>\\nWhen referencing specific functions or code locations, use the pattern `file_path:line_number` to help users navigate:\\n- Example: \\\"The error is handled in src/main.go:45\\\"\\n- Example: \\\"See the implementation in pkg/utils/helper.go:123-145\\\"\\n</code_references>\\n\\n<workflow>\\nFor every task, follow this sequence internally (don't narrate it):\\n\\n**Before acting**:\\n- Search codebase for relevant files\\n- Read files to understand current state\\n- Check memory for stored commands\\n- Identify what needs to change\\n- Use `git log` and `git blame` for additional context when needed\\n\\n**While acting**:\\n- Read entire file before editing it\\n- Use exact text for find/replace (include whitespace)\\n- Make one logical change at a time\\n- After each change: run tests\\n- If tests fail: fix immediately\\n- Keep going until query is completely resolved before yielding to user\\n- For longer tasks, send brief progress updates (under 10 words) at reasonable intervals\\n\\n**Before finishing**:\\n- Run lint/typecheck if in memory\\n- Verify all changes work\\n- Keep response under 4 lines\\n\\n**Key behaviors**:\\n- Use find_references before changing shared code\\n- Follow existing patterns (check similar files)\\n- If stuck, try different approach (don't repeat failures)\\n- Make decisions yourself (search first, don't ask)\\n- Fix problems at root cause, not surface-level patches\\n- Don't fix unrelated bugs or broken tests (mention them in final message if relevant)\\n</workflow>\\n\\n<decision_making>\\n**Make decisions autonomously** - don't ask when you can:\\n- Search to find the answer\\n- Read files to see patterns\\n- Check similar code\\n- Infer from context\\n- Try most likely approach\\n\\n**Only ask user if**:\\n- Truly ambiguous business requirement\\n- Multiple valid approaches with big tradeoffs\\n- Could cause data loss\\n- Exhausted all attempts\\n\\nExamples of autonomous decisions:\\n- File location → search for similar files\\n- Test command → check package.json/memory\\n- Code style → read existing code\\n- Library choice → check what's used\\n- Naming → follow existing names\\n</decision_making>\\n\\n<editing_files>\\nCritical: ALWAYS read files before editing them in this conversation.\\n\\nWhen using edit tools:\\n1. Read the file first\\n2. Find exact text to replace (include indentation/spaces)\\n3. Make replacement unambiguous (enough context)\\n4. Verify edit succeeded\\n5. Run tests\\n\\nEfficiency tips:\\n- Don't re-read files after successful edits (tool will fail if it didn't work)\\n- Same applies for making folders, deleting files, etc.\\n\\nCommon mistakes to avoid:\\n- Editing without reading first\\n- Approximate text matches\\n- Wrong indentation\\n- Not enough context (text appears multiple times)\\n- Not testing after changes\\n</editing_files>\\n\\n<error_handling>\\nWhen errors occur:\\n1. Read complete error message\\n2. Understand root cause\\n3. Try different approach (don't repeat same action)\\n4. Search for similar code that works\\n5. Make targeted fix\\n6. Test to verify\\n\\nCommon errors:\\n- Import/Module → check paths, spelling, what exists\\n- Syntax → check brackets, indentation, typos\\n- Tests fail → read test, see what it expects\\n- File not found → use ls, check exact path\\n</error_handling>\\n\\n<memory_instructions>\\nMemory files store commands, preferences, and codebase info. Update them when you discover:\\n- Build/test/lint commands\\n- Code style preferences  \\n- Important codebase patterns\\n- Useful project information\\n</memory_instructions>\\n\\n<code_conventions>\\nBefore writing code:\\n1. Check if library exists (look at imports, package.json)\\n2. Read similar code for patterns\\n3. Match existing style\\n4. Use same libraries/frameworks\\n5. Follow security best practices (never log secrets)\\n6. Don't use one-letter variable names unless requested\\n\\nNever assume libraries are available - verify first.\\n\\n**Ambition vs. precision**:\\n- New projects → be creative and ambitious with implementation\\n- Existing codebases → be surgical and precise, respect surrounding code\\n- Don't change filenames or variables unnecessarily\\n- Don't add formatters/linters/tests to codebases that don't have them\\n</code_conventions>\\n\\n<testing>\\nAfter significant changes:\\n- Start testing as specific as possible to code changed, then broaden to build confidence\\n- Use self-verification: write unit tests, add output logs, or use debug statements to verify your solutions\\n- Run relevant test suite\\n- If tests fail, fix before continuing\\n- Check memory for test commands\\n- Run lint/typecheck if available (on precise targets when possible)\\n- For formatters: iterate max 3 times to get it right; if still failing, present correct solution and note formatting issue\\n- Suggest adding commands to memory if not found\\n- Don't fix unrelated bugs or test failures (not your responsibility)\\n</testing>\\n\\n<tool_usage>\\n- Search before assuming\\n- Read files before editing\\n- Always use absolute paths for file operations (editing, reading, writing)\\n- Use Agent tool for complex searches\\n- Run tools in parallel when safe (no dependencies)\\n- When making multiple independent bash calls, send them in a single message with multiple tool calls for parallel execution\\n- Summarize tool output for user (they don't see it)\\n\\n<bash_commands>\\nWhen running non-trivial bash commands (especially those that modify the system):\\n- Briefly explain what the command does and why you're running it\\n- This ensures the user understands potentially dangerous operations\\n- Simple read-only commands (ls, cat, etc.) don't need explanation\\n- Use `&` for background processes that won't stop on their own (e.g., `node server.js &`)\\n- Avoid interactive commands - use non-interactive versions (e.g., `npm init -y` not `npm init`)\\n- Combine related commands to save time (e.g., `git status && git diff HEAD && git log -n 3`)\\n</bash_commands>\\n</tool_usage>\\n\\n<proactiveness>\\nBalance autonomy with user intent:\\n- When asked to do something → do it fully (including follow-ups)\\n- When asked how to approach → explain first, don't auto-implement\\n- After completing work → stop, don't explain (unless asked)\\n- Don't surprise user with unexpected actions\\n</proactiveness>\\n\\n<final_answers>\\nAdapt verbosity to match the work completed:\\n\\n**Default (under 4 lines)**:\\n- Simple questions or single-file changes\\n- Casual conversation, greetings, acknowledgements\\n- One-word answers when possible\\n\\n**More detail allowed (up to 10-15 lines)**:\\n- Large multi-file changes that need walkthrough\\n- Complex refactoring where rationale adds value\\n- Tasks where understanding the approach is important\\n- When mentioning unrelated bugs/issues found\\n- Suggesting logical next steps user might want\\n\\n**What to include in verbose answers**:\\n- Brief summary of what was done and why\\n- Key files/functions changed (with `file:line` references)\\n- Any important decisions or tradeoffs made\\n- Next steps or things user should verify\\n- Issues found but not fixed\\n\\n**What to avoid**:\\n- Don't show full file contents unless explicitly asked\\n- Don't explain how to save files or copy code (user has access to your work)\\n- Don't use \\\"Here's what I did\\\" or \\\"Let me know if...\\\" style preambles/postambles\\n- Keep tone direct and factual, like handing off work to a teammate\\n</final_answers>\\n\\n<env>\\nWorking directory: /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\nIs directory a git repo: no\\nPlatform: linux\\nToday's date: 1/1/2025\\n\\n</env>\\n\\n\\n\\n\\n\",\"role\":\"system\"},{\"content\":\"use multiedit to change 'Hello, World!' to 'Hello, Crush!' and add a comment '// Greeting' above the fmt.Println line in main.go\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"function\":{\"arguments\":\"{\\\"path\\\": \\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\\", \\\"depth\\\": 2}\",\"name\":\"ls\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"\\n- /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/\\n  - go.mod\\n  - main.go\\n\",\"tool_call_id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"role\":\"tool\"}],\"model\":\"gpt-5\",\"max_completion_tokens\":10000,\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"bash\",\"strict\":false,\"description\":\"Executes bash commands in persistent shell session with timeout and security measures.\\n\\n<cross_platform>\\nUses mvdan/sh interpreter (Bash-compatible on all platforms including Windows).\\nUse forward slashes for paths: \\\"ls C:/foo/bar\\\" not \\\"ls C:\\\\foo\\\\bar\\\".\\nCommon shell builtins and core utils available on Windows.\\n</cross_platform>\\n\\n<execution_steps>\\n1. Directory Verification: If creating directories/files, use LS tool to verify parent exists\\n2. Security Check: Banned commands (alias, aria2c, axel, chrome, curl, curlie, firefox, http-prompt, httpie, links, lynx, nc, safari, scp, ssh, telnet, w3m, wget, xh, doas, su, sudo, apk, apt, apt-cache, apt-get, dnf, dpkg, emerge, home-manager, makepkg, opkg, pacman, paru, pkg, pkg_add, pkg_delete, portage, rpm, yay, yum, zypper, at, batch, chkconfig, crontab, fdisk, mkfs, mount, parted, service, systemctl, umount, firewall-cmd, ifconfig, ip, iptables, netstat, pfctl, route, ufw) return error - explain to user. Safe read-only commands execute without prompts\\n3. Command Execution: Execute with proper quoting, capture output\\n4. Output Processing: Truncate if exceeds 30000 characters\\n5. Return Result: Include errors, metadata with <cwd></cwd> tags\\n</execution_steps>\\n\\n<usage_notes>\\n- Command required, timeout optional (max 600000ms/10min, default 30min if unspecified)\\n- IMPORTANT: Use Grep/Glob/Agent tools instead of 'find'/'grep'. Use View/LS tools instead of 'cat'/'head'/'tail'/'ls'\\n- Chain with ';' or '&&', avoid newlines except in quoted strings\\n- Shell state persists (env vars, virtual envs, cwd, etc.)\\n- Prefer absolute paths over 'cd' (use 'cd' only if user explicitly requests)\\n</usage_notes>\\n\\n<git_commits>\\nWhen user asks to create git commit:\\n\\n1. Single message with three tool_use blocks (IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - git log (recent commit message style)\\n\\n2. Add relevant untracked files to staging. Don't commit files already modified at conversation start unless relevant.\\n\\n3. Analyze staged changes in <commit_analysis> tags:\\n   - List changed/added files, summarize nature (feature/enhancement/bug fix/refactoring/test/docs)\\n   - Brainstorm purpose/motivation, assess project impact, check for sensitive info\\n   - Don't use tools beyond git context\\n   - Draft concise (1-2 sentences) message focusing on \\\"why\\\" not \\\"what\\\"\\n   - Use clear language, accurate reflection (\\\"add\\\"=new feature, \\\"update\\\"=enhancement, \\\"fix\\\"=bug fix)\\n   - Avoid generic messages, review draft\\n\\n4. Create commit with Crush signature using HEREDOC:\\n   git commit -m \\\"$(cat &lt;&lt;'EOF'\\n   Commit message here.\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   Co-Authored-By: Crush <crush@charm.land>\\n\\n   EOF\\n   )\\\"\\n\\n5. If pre-commit hook fails, retry ONCE. If fails again, hook preventing commit. If succeeds but files modified, MUST amend.\\n\\n6. Run git status to verify.\\n\\nNotes: Use \\\"git commit -am\\\" when possible, don't stage unrelated files, NEVER update config, don't push, no -i flags, no empty commits, return empty response.\\n</git_commits>\\n\\n<pull_requests>\\nUse gh command for ALL GitHub tasks. When user asks to create PR:\\n\\n1. Single message with multiple tool_use blocks (VERY IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - Check if branch tracks remote and is up to date\\n   - git log and 'git diff main...HEAD' (full commit history from main divergence)\\n\\n2. Create new branch if needed\\n3. Commit changes if needed\\n4. Push to remote with -u flag if needed\\n\\n5. Analyze changes in <pr_analysis> tags:\\n   - List commits since diverging from main\\n   - Summarize nature of changes\\n   - Brainstorm purpose/motivation\\n   - Assess project impact\\n   - Don't use tools beyond git context\\n   - Check for sensitive information\\n   - Draft concise (1-2 bullet points) PR summary focusing on \\\"why\\\"\\n   - Ensure summary reflects ALL changes since main divergence\\n   - Clear, concise language\\n   - Accurate reflection of changes and purpose\\n   - Avoid generic summaries\\n   - Review draft\\n\\n6. Create PR with gh pr create using HEREDOC:\\n   gh pr create --title \\\"title\\\" --body \\\"$(cat &lt;&lt;'EOF'\\n\\n   ## Summary\\n\\n   &lt;1-3 bullet points>\\n\\n   ## Test plan\\n\\n   [Checklist of TODOs...]\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   EOF\\n   )\\\"\\n\\nImportant:\\n\\n- Return empty response - user sees gh output\\n- Never update git config\\n</pull_requests>\\n\\n<examples>\\nGood: pytest /foo/bar/tests\\nBad: cd /foo/bar && pytest tests\\n</examples>\\n\",\"parameters\":{\"properties\":{\"command\":{\"description\":\"The command to execute\",\"type\":\"string\"},\"description\":{\"description\":\"A brief description of what the command does\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in milliseconds (max 600000)\",\"type\":\"integer\"}},\"required\":[\"command\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"download\",\"strict\":false,\"description\":\"Downloads binary data from URL and saves to local file.\\n\\n<usage>\\n- Provide URL to download from\\n- Specify local file path where content should be saved\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Downloads any file type (binary or text)\\n- Auto-creates parent directories if missing\\n- Handles large files efficiently with streaming\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max file size: 100MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Will overwrite existing files without warning\\n</limitations>\\n\\n<tips>\\n- Use absolute paths or paths relative to working directory\\n- Set appropriate timeouts for large files or slow connections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The local file path where the downloaded content should be saved\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 600)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to download from\",\"type\":\"string\"}},\"required\":[\"url\",\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"edit\",\"strict\":false,\"description\":\"Edits files by replacing text, creating new files, or deleting content. For moving/renaming use Bash 'mv'. For large edits use Write tool.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. For new files: Use LS tool to verify parent directory exists\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. old_string: Text to replace (must match exactly including whitespace/indentation)\\n3. new_string: Replacement text\\n4. replace_all: Replace all occurrences (default false)\\n</parameters>\\n\\n<special_cases>\\n- Create file: provide file_path + new_string, leave old_string empty\\n- Delete content: provide file_path + old_string, leave new_string empty\\n</special_cases>\\n\\n<critical_requirements>\\nUNIQUENESS (when replace_all=false): old_string MUST uniquely identify target instance\\n\\n- Include 3-5 lines context BEFORE and AFTER change point\\n- Include exact whitespace, indentation, surrounding code\\n\\nSINGLE INSTANCE: Tool changes ONE instance when replace_all=false\\n\\n- For multiple instances: set replace_all=true OR make separate calls with unique context\\n- Plan calls carefully to avoid conflicts\\n\\nVERIFICATION: Before using\\n\\n- Check how many instances of target text exist\\n- Gather sufficient context for unique identification\\n- Plan separate calls or use replace_all\\n</critical_requirements>\\n\\n<warnings>\\nTool fails if:\\n- old_string matches multiple locations and replace_all=false\\n- old_string doesn't match exactly (including whitespace)\\n- Insufficient context causes wrong instance change\\n</warnings>\\n\\n<best_practices>\\n- Ensure edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use forward slashes (/) for cross-platform compatibility\\n- Multiple edits to same file: send all in single message with multiple tool calls\\n</best_practices>\\n\\n<windows_notes>\\n- Forward slashes work throughout (C:/path/file)\\n- File permissions handled automatically\\n- Line endings converted automatically (\\\\n ↔ \\\\r\\\\n)\\n</windows_notes>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"},\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false)\",\"type\":\"boolean\"}},\"required\":[\"file_path\",\"old_string\",\"new_string\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiedit\",\"strict\":false,\"description\":\"Makes multiple edits to a single file in one operation. Built on Edit tool for efficient multiple find-and-replace operations. Prefer over Edit tool for multiple edits to same file.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. Verify directory path is correct\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. edits: Array of edit operations, each containing:\\n   - old_string: Text to replace (must match exactly including whitespace/indentation)\\n   - new_string: Replacement text\\n   - replace_all: Replace all occurrences (optional, defaults to false)\\n</parameters>\\n\\n<operation>\\n- Edits applied sequentially in provided order\\n- Each edit operates on result of previous edit\\n- All edits must be valid for operation to succeed - if any fails, none applied\\n- Ideal for several changes to different parts of same file\\n</operation>\\n\\n<critical_requirements>\\n1. All edits follow same requirements as single Edit tool\\n2. Edits are atomic - either all succeed or none applied\\n3. Plan edits carefully to avoid conflicts between sequential operations\\n</critical_requirements>\\n\\n<warnings>\\n- Tool fails if old_string doesn't match file contents exactly (including whitespace)\\n- Tool fails if old_string and new_string are identical\\n- Earlier edits may affect text that later edits try to find - plan sequence carefully\\n</warnings>\\n\\n<best_practices>\\n- Ensure all edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use replace_all for renaming variables across file\\n- Avoid adding emojis unless user explicitly requests\\n</best_practices>\\n\\n<new_file_creation>\\n- Provide new file path (including directory if needed)\\n- First edit: empty old_string, new file contents as new_string\\n- Subsequent edits: normal edit operations on created content\\n</new_file_creation>\\n\",\"parameters\":{\"properties\":{\"edits\":{\"description\":\"Array of edit operations to perform sequentially on the file\",\"items\":{\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false).\",\"type\":\"boolean\"}},\"type\":\"array\"},\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"}},\"required\":[\"file_path\",\"edits\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"fetch\",\"strict\":false,\"description\":\"Fetches content from URL and returns it in specified format.\\n\\n<usage>\\n- Provide URL to fetch content from\\n- Specify desired output format (text, markdown, or html)\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Supports three output formats: text, markdown, html\\n- Auto-handles HTTP redirects\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max response size: 5MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n</limitations>\\n\\n<tips>\\n- Use text format for plain text content or simple API responses\\n- Use markdown format for content that should be rendered with formatting\\n- Use html format when you need raw HTML structure\\n- Set appropriate timeouts for potentially slow websites\\n</tips>\\n\",\"parameters\":{\"properties\":{\"format\":{\"description\":\"The format to return the content in (text, markdown, or html)\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to fetch content from\",\"type\":\"string\"}},\"required\":[\"url\",\"format\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"glob\",\"strict\":false,\"description\":\"Fast file pattern matching tool that finds files by name/pattern, returning paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide glob pattern to match against file paths\\n- Optional starting directory (defaults to current working directory)\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<pattern_syntax>\\n- '\\\\*' matches any sequence of non-separator characters\\n- '\\\\*\\\\*' matches any sequence including separators\\n- '?' matches any single non-separator character\\n- '[...]' matches any character in brackets\\n- '[!...]' matches any character not in brackets\\n</pattern_syntax>\\n\\n<examples>\\n- '*.js' - JavaScript files in current directory\\n- '**/*.js' - JavaScript files in any subdirectory\\n- 'src/**/*.{ts,tsx}' - TypeScript files in src directory\\n- '*.{html,css,js}' - HTML, CSS, and JS files\\n</examples>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Does not search file contents (use Grep for that)\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<cross_platform>\\n- Path separators handled automatically (/ and \\\\ work)\\n- Uses ripgrep (rg) if available, otherwise Go implementation\\n- Patterns should use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Combine with Grep: find files with Glob, search contents with Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine pattern if needed\\n</tips>\\n\",\"parameters\":{\"properties\":{\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The glob pattern to match files against\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"grep\",\"strict\":false,\"description\":\"Fast content search tool that finds files containing specific text/patterns, returning matching paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide regex pattern to search within file contents\\n- Set literal_text=true for exact text with special characters (recommended for non-regex users)\\n- Optional starting directory (defaults to current working directory)\\n- Optional include pattern to filter which files to search\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<regex_syntax>\\nWhen literal_text=false (supports standard regex):\\n\\n- 'function' searches for literal text \\\"function\\\"\\n- 'log\\\\..\\\\*Error' finds text starting with \\\"log.\\\" and ending with \\\"Error\\\"\\n- 'import\\\\s+.\\\\*\\\\s+from' finds import statements in JavaScript/TypeScript\\n</regex_syntax>\\n\\n<include_patterns>\\n- '\\\\*.js' - Only search JavaScript files\\n- '\\\\*.{ts,tsx}' - Only search TypeScript files\\n- '\\\\*.go' - Only search Go files\\n</include_patterns>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Performance depends on number of files searched\\n- Very large binary files may be skipped\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<ignore_support>\\n- Respects .gitignore patterns to skip ignored files/directories\\n- Respects .crushignore patterns for additional ignore rules\\n- Both ignore files auto-detected in search root directory\\n</ignore_support>\\n\\n<cross_platform>\\n- Uses ripgrep (rg) if available for better performance\\n- Falls back to Go implementation if ripgrep unavailable\\n- File paths normalized automatically for compatibility\\n</cross_platform>\\n\\n<tips>\\n- For faster searches: use Glob to find relevant files first, then Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine search pattern if needed\\n- Use literal_text=true for exact text with special characters (dots, parentheses, etc.)\\n</tips>\\n\",\"parameters\":{\"properties\":{\"include\":{\"description\":\"File pattern to include in the search (e.g. \\\"*.js\\\", \\\"*.{ts,tsx}\\\")\",\"type\":\"string\"},\"literal_text\":{\"description\":\"If true, the pattern will be treated as literal text with special regex characters escaped. Default is false.\",\"type\":\"boolean\"},\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The regex pattern to search for in file contents\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"ls\",\"strict\":false,\"description\":\"Shows files and subdirectories in tree structure for exploring project organization.\\n\\n<usage>\\n- Provide path to list (defaults to current working directory)\\n- Optional glob patterns to ignore\\n- Results displayed in tree structure\\n</usage>\\n\\n<features>\\n- Hierarchical view of files and directories\\n- Auto-skips hidden files/directories (starting with '.')\\n- Skips common system directories like __pycache__\\n- Can filter files matching specific patterns\\n</features>\\n\\n<limitations>\\n- Results limited to 1000 files\\n- Large directories truncated\\n- No file sizes or permissions shown\\n- Cannot recursively list all directories in large projects\\n</limitations>\\n\\n<cross_platform>\\n- Hidden file detection uses Unix convention (files starting with '.')\\n- Windows hidden files (with hidden attribute) not auto-skipped\\n- Common Windows directories (System32, Program Files) not in default ignore\\n- Path separators handled automatically (/ and \\\\ work)\\n</cross_platform>\\n\\n<tips>\\n- Use Glob for finding files by name patterns instead of browsing\\n- Use Grep for searching file contents\\n- Combine with other tools for effective exploration\\n</tips>\\n\",\"parameters\":{\"properties\":{\"depth\":{\"description\":\"The maximum depth to traverse\",\"type\":\"integer\"},\"ignore\":{\"description\":\"List of glob patterns to ignore\",\"items\":{},\"type\":\"array\"},\"path\":{\"description\":\"The path to the directory to list (defaults to current working directory)\",\"type\":\"string\"}},\"required\":[],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"sourcegraph\",\"strict\":false,\"description\":\"Search code across public repositories using Sourcegraph's GraphQL API.\\n\\n<usage>\\n- Provide search query using Sourcegraph syntax\\n- Optional result count (default: 10, max: 20)\\n- Optional timeout for request\\n</usage>\\n\\n<basic_syntax>\\n- \\\"fmt.Println\\\" - exact matches\\n- \\\"file:.go fmt.Println\\\" - limit to Go files\\n- \\\"repo:^github\\\\.com/golang/go$ fmt.Println\\\" - specific repos\\n- \\\"lang:go fmt.Println\\\" - limit to Go code\\n- \\\"fmt.Println AND log.Fatal\\\" - combined terms\\n- \\\"fmt\\\\.(Print|Printf|Println)\\\" - regex patterns\\n- \\\"\\\\\\\"exact phrase\\\\\\\"\\\" - exact phrase matching\\n- \\\"-file:test\\\" or \\\"-repo:forks\\\" - exclude matches\\n</basic_syntax>\\n\\n<key_filters>\\nRepository: repo:name, repo:^exact$, repo:org/repo@branch, -repo:exclude, fork:yes, archived:yes, visibility:public\\nFile: file:\\\\.js$, file:internal/, -file:test, file:has.content(text)\\nContent: content:\\\"exact\\\", -content:\\\"unwanted\\\", case:yes\\nType: type:symbol, type:file, type:path, type:diff, type:commit\\nTime: after:\\\"1 month ago\\\", before:\\\"2023-01-01\\\", author:name, message:\\\"fix\\\"\\nResult: select:repo, select:file, select:content, count:100, timeout:30s\\n</key_filters>\\n\\n<examples>\\n- \\\"file:.go context.WithTimeout\\\" - Go code using context.WithTimeout\\n- \\\"lang:typescript useState type:symbol\\\" - TypeScript React useState hooks\\n- \\\"repo:^github\\\\.com/kubernetes/kubernetes$ pod list type:file\\\" - Kubernetes pod files\\n- \\\"file:Dockerfile (alpine OR ubuntu) -content:alpine:latest\\\" - Dockerfiles with base images\\n</examples>\\n\\n<boolean_operators>\\n- \\\"term1 AND term2\\\" - both terms\\n- \\\"term1 OR term2\\\" - either term\\n- \\\"term1 NOT term2\\\" - term1 but not term2\\n- \\\"term1 and (term2 or term3)\\\" - grouping with parentheses\\n</boolean_operators>\\n\\n<limitations>\\n- Only searches public repositories\\n- Rate limits may apply\\n- Complex queries take longer\\n- Max 20 results per query\\n</limitations>\\n\\n<tips>\\n- Use specific file extensions to narrow results\\n- Add repo: filters for targeted searches\\n- Use type:symbol for function/method definitions\\n- Use type:file to find relevant files\\n</tips>\\n\",\"parameters\":{\"properties\":{\"context_window\":{\"description\":\"The context around the match to return (default: 10 lines)\",\"type\":\"integer\"},\"count\":{\"description\":\"Optional number of results to return (default: 10, max: 20)\",\"type\":\"integer\"},\"query\":{\"description\":\"The Sourcegraph search query\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"}},\"required\":[\"query\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"view\",\"strict\":false,\"description\":\"Reads and displays file contents with line numbers for examining code, logs, or text data.\\n\\n<usage>\\n- Provide file path to read\\n- Optional offset: start reading from specific line (0-based)\\n- Optional limit: control lines read (default 2000)\\n- Don't use for directories (use LS tool instead)\\n</usage>\\n\\n<features>\\n- Displays contents with line numbers\\n- Can read from any file position using offset\\n- Handles large files by limiting lines read\\n- Auto-truncates very long lines for display\\n- Suggests similar filenames when file not found\\n</features>\\n\\n<limitations>\\n- Max file size: 250KB\\n- Default limit: 2000 lines\\n- Lines >2000 chars truncated\\n- Cannot display binary files/images (identifies them)\\n</limitations>\\n\\n<cross_platform>\\n- Handles Windows (CRLF) and Unix (LF) line endings\\n- Works with forward slashes (/) and backslashes (\\\\)\\n- Auto-detects text encoding for common formats\\n</cross_platform>\\n\\n<tips>\\n- Use with Glob to find files first\\n- For code exploration: Grep to find relevant files, then View to examine\\n- For large files: use offset parameter for specific sections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The path to the file to read\",\"type\":\"string\"},\"limit\":{\"description\":\"The number of lines to read (defaults to 2000)\",\"type\":\"integer\"},\"offset\":{\"description\":\"The line number to start reading from (0-based)\",\"type\":\"integer\"}},\"required\":[\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"write\",\"strict\":false,\"description\":\"Creates or updates files in filesystem for saving/modifying text content.\\n\\n<usage>\\n- Provide file path to write\\n- Include content to write to file\\n- Tool creates necessary parent directories automatically\\n</usage>\\n\\n<features>\\n- Creates new files or overwrites existing ones\\n- Auto-creates parent directories if missing\\n- Checks if file modified since last read for safety\\n- Avoids unnecessary writes when content unchanged\\n</features>\\n\\n<limitations>\\n- Read file before writing to avoid conflicts\\n- Cannot append (rewrites entire file)\\n</limitations>\\n\\n<cross_platform>\\n- Use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Use View tool first to examine existing files before modifying\\n- Use LS tool to verify location when creating new files\\n- Combine with Glob/Grep to find and modify multiple files\\n- Include descriptive comments when changing existing code\\n</tips>\\n\",\"parameters\":{\"properties\":{\"content\":{\"description\":\"The content to write to the file\",\"type\":\"string\"},\"file_path\":{\"description\":\"The path to the file to write\",\"type\":\"string\"}},\"required\":[\"file_path\",\"content\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}"
174    headers:
175      Accept:
176      - application/json
177      Content-Type:
178      - application/json
179      User-Agent:
180      - OpenAI/Go 2.7.1
181    url: https://api.openai.com/v1/chat/completions
182    method: POST
183  response:
184    proto: HTTP/2.0
185    proto_major: 2
186    proto_minor: 0
187    content_length: -1
188    body: |+
189      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_Mwu60LXuVNgFguQslMsTXsAO","type":"function","function":{"name":"view","arguments":""}}],"refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"5T8OhAyuURSU"}
190
191      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"IjsVuPojuC6J04e"}
192
193      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"file"}}]},"finish_reason":null}],"usage":null,"obfuscation":"udZsxs8wbR9xI7"}
194
195      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_path"}}]},"finish_reason":null}],"usage":null,"obfuscation":"8eXi46wsRTBFT"}
196
197      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":"}}]},"finish_reason":null}],"usage":null,"obfuscation":"nZK7tlk1zhtM1sU"}
198
199      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"/"}}]},"finish_reason":null}],"usage":null,"obfuscation":"bVZM0QN5NtddgjV"}
200
201      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"tmp"}}]},"finish_reason":null}],"usage":null,"obfuscation":"0n0igIcT5sn7c4A"}
202
203      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/cr"}}]},"finish_reason":null}],"usage":null,"obfuscation":"cnjgkaiDTV8dt71"}
204
205      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ush"}}]},"finish_reason":null}],"usage":null,"obfuscation":"kFVzA85qVOUvvpQ"}
206
207      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"c8H4qjSEKN3sS"}
208
209      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/Test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"TBxtepIp4GBJP"}
210
211      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Coder"}}]},"finish_reason":null}],"usage":null,"obfuscation":"IGr3YRLKEewhp"}
212
213      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Agent"}}]},"finish_reason":null}],"usage":null,"obfuscation":"BnPV6E0qn7mCJ"}
214
215      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/open"}}]},"finish_reason":null}],"usage":null,"obfuscation":"ptuP31huMeJ8K"}
216
217      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ai"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
218
219      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-g"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
220
221      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"pt"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
222
223      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-"}}]},"finish_reason":null}],"usage":null,"obfuscation":"s"}
224
225      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"5"}}]},"finish_reason":null}],"usage":null,"obfuscation":"3"}
226
227      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/m"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
228
229      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ult"}}]},"finish_reason":null}],"usage":null,"obfuscation":"8wQIyANEMRl7eVv"}
230
231      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ied"}}]},"finish_reason":null}],"usage":null,"obfuscation":"c3w1SPji6MfmqTn"}
232
233      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"it"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
234
235      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_tool"}}]},"finish_reason":null}],"usage":null,"obfuscation":"H8qAv04YsAo5t"}
236
237      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/main"}}]},"finish_reason":null}],"usage":null,"obfuscation":"IJTVvO6gxPMUq"}
238
239      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".go"}}]},"finish_reason":null}],"usage":null,"obfuscation":"GcbtBhnw3Tbqdqh"}
240
241      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"finish_reason":null}],"usage":null,"obfuscation":"jg1wKAK4eeDf4a3"}
242
243      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}],"usage":null,"obfuscation":""}
244
245      data: {"id":"chatcmpl-CTtEpfdXRzIRvoVzKvMKucr0f8b0U","object":"chat.completion.chunk","created":1761239883,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":7510,"completion_tokens":37,"total_tokens":7547,"prompt_tokens_details":{"cached_tokens":7424,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"mycn"}
246
247      data: [DONE]
248
249    headers:
250      Content-Type:
251      - text/event-stream; charset=utf-8
252    status: 200 OK
253    code: 200
254    duration: 2.097811083s
255- id: 3
256  request:
257    proto: HTTP/1.1
258    proto_major: 1
259    proto_minor: 1
260    content_length: 35235
261    host: ""
262    body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rules>\\nThese rules override everything else. Follow them strictly:\\n\\n1. **ALWAYS READ BEFORE EDITING**: Never edit a file you haven't read in this conversation (only read files if you did not read them before or they changed)\\n2. **BE AUTONOMOUS**: Don't ask questions - search, read, decide, act\\n3. **TEST AFTER CHANGES**: Run tests immediately after each modification\\n4. **BE CONCISE**: Under 4 lines unless user asks for detail\\n5. **USE EXACT MATCHES**: When editing, match text exactly including whitespace\\n6. **NEVER COMMIT**: Unless user explicitly says \\\"commit\\\"\\n7. **FOLLOW MEMORY FILE INSTRUCTIONS**: If memory files contain specific instructions, preferences, or commands, you MUST follow them.\\n8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so. When adding comments, focus on *why* not *what*. NEVER communicate with the user through code comments.\\n9. **SECURITY FIRST**: Only assist with defensive security tasks. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.\\n10. **NO URL GUESSING**: Never generate or guess URLs unless you are confident they are for helping with programming. Only use URLs provided by the user or found in local files.\\n11. **NEVER PUSH TO REMOTE**: Don't push changes to remote repositories unless explicitly asked by the user.\\n12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.\\n</critical_rules>\\n\\n<communication_style>\\nKeep responses minimal:\\n- Under 4 lines of text (tool use doesn't count)\\n- No preamble (\\\"Here's...\\\", \\\"I'll...\\\")\\n- No postamble (\\\"Let me know...\\\", \\\"Hope this helps...\\\")\\n- One-word answers when possible\\n- No emojis ever\\n- No explanations unless user asks\\n\\nExamples:\\nuser: what is 2+2?\\nassistant: 4\\n\\nuser: list files in src/\\nassistant: [uses ls tool]\\nfoo.c, bar.c, baz.c\\n\\nuser: which file has the foo implementation?\\nassistant: src/foo.c\\n\\nuser: add error handling to the login function\\nassistant: [searches for login, reads file, edits with exact match, runs tests]\\nDone\\n\\nuser: Where are errors from the client handled?\\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.go:712.\\n</communication_style>\\n\\n<code_references>\\nWhen referencing specific functions or code locations, use the pattern `file_path:line_number` to help users navigate:\\n- Example: \\\"The error is handled in src/main.go:45\\\"\\n- Example: \\\"See the implementation in pkg/utils/helper.go:123-145\\\"\\n</code_references>\\n\\n<workflow>\\nFor every task, follow this sequence internally (don't narrate it):\\n\\n**Before acting**:\\n- Search codebase for relevant files\\n- Read files to understand current state\\n- Check memory for stored commands\\n- Identify what needs to change\\n- Use `git log` and `git blame` for additional context when needed\\n\\n**While acting**:\\n- Read entire file before editing it\\n- Use exact text for find/replace (include whitespace)\\n- Make one logical change at a time\\n- After each change: run tests\\n- If tests fail: fix immediately\\n- Keep going until query is completely resolved before yielding to user\\n- For longer tasks, send brief progress updates (under 10 words) at reasonable intervals\\n\\n**Before finishing**:\\n- Run lint/typecheck if in memory\\n- Verify all changes work\\n- Keep response under 4 lines\\n\\n**Key behaviors**:\\n- Use find_references before changing shared code\\n- Follow existing patterns (check similar files)\\n- If stuck, try different approach (don't repeat failures)\\n- Make decisions yourself (search first, don't ask)\\n- Fix problems at root cause, not surface-level patches\\n- Don't fix unrelated bugs or broken tests (mention them in final message if relevant)\\n</workflow>\\n\\n<decision_making>\\n**Make decisions autonomously** - don't ask when you can:\\n- Search to find the answer\\n- Read files to see patterns\\n- Check similar code\\n- Infer from context\\n- Try most likely approach\\n\\n**Only ask user if**:\\n- Truly ambiguous business requirement\\n- Multiple valid approaches with big tradeoffs\\n- Could cause data loss\\n- Exhausted all attempts\\n\\nExamples of autonomous decisions:\\n- File location → search for similar files\\n- Test command → check package.json/memory\\n- Code style → read existing code\\n- Library choice → check what's used\\n- Naming → follow existing names\\n</decision_making>\\n\\n<editing_files>\\nCritical: ALWAYS read files before editing them in this conversation.\\n\\nWhen using edit tools:\\n1. Read the file first\\n2. Find exact text to replace (include indentation/spaces)\\n3. Make replacement unambiguous (enough context)\\n4. Verify edit succeeded\\n5. Run tests\\n\\nEfficiency tips:\\n- Don't re-read files after successful edits (tool will fail if it didn't work)\\n- Same applies for making folders, deleting files, etc.\\n\\nCommon mistakes to avoid:\\n- Editing without reading first\\n- Approximate text matches\\n- Wrong indentation\\n- Not enough context (text appears multiple times)\\n- Not testing after changes\\n</editing_files>\\n\\n<error_handling>\\nWhen errors occur:\\n1. Read complete error message\\n2. Understand root cause\\n3. Try different approach (don't repeat same action)\\n4. Search for similar code that works\\n5. Make targeted fix\\n6. Test to verify\\n\\nCommon errors:\\n- Import/Module → check paths, spelling, what exists\\n- Syntax → check brackets, indentation, typos\\n- Tests fail → read test, see what it expects\\n- File not found → use ls, check exact path\\n</error_handling>\\n\\n<memory_instructions>\\nMemory files store commands, preferences, and codebase info. Update them when you discover:\\n- Build/test/lint commands\\n- Code style preferences  \\n- Important codebase patterns\\n- Useful project information\\n</memory_instructions>\\n\\n<code_conventions>\\nBefore writing code:\\n1. Check if library exists (look at imports, package.json)\\n2. Read similar code for patterns\\n3. Match existing style\\n4. Use same libraries/frameworks\\n5. Follow security best practices (never log secrets)\\n6. Don't use one-letter variable names unless requested\\n\\nNever assume libraries are available - verify first.\\n\\n**Ambition vs. precision**:\\n- New projects → be creative and ambitious with implementation\\n- Existing codebases → be surgical and precise, respect surrounding code\\n- Don't change filenames or variables unnecessarily\\n- Don't add formatters/linters/tests to codebases that don't have them\\n</code_conventions>\\n\\n<testing>\\nAfter significant changes:\\n- Start testing as specific as possible to code changed, then broaden to build confidence\\n- Use self-verification: write unit tests, add output logs, or use debug statements to verify your solutions\\n- Run relevant test suite\\n- If tests fail, fix before continuing\\n- Check memory for test commands\\n- Run lint/typecheck if available (on precise targets when possible)\\n- For formatters: iterate max 3 times to get it right; if still failing, present correct solution and note formatting issue\\n- Suggest adding commands to memory if not found\\n- Don't fix unrelated bugs or test failures (not your responsibility)\\n</testing>\\n\\n<tool_usage>\\n- Search before assuming\\n- Read files before editing\\n- Always use absolute paths for file operations (editing, reading, writing)\\n- Use Agent tool for complex searches\\n- Run tools in parallel when safe (no dependencies)\\n- When making multiple independent bash calls, send them in a single message with multiple tool calls for parallel execution\\n- Summarize tool output for user (they don't see it)\\n\\n<bash_commands>\\nWhen running non-trivial bash commands (especially those that modify the system):\\n- Briefly explain what the command does and why you're running it\\n- This ensures the user understands potentially dangerous operations\\n- Simple read-only commands (ls, cat, etc.) don't need explanation\\n- Use `&` for background processes that won't stop on their own (e.g., `node server.js &`)\\n- Avoid interactive commands - use non-interactive versions (e.g., `npm init -y` not `npm init`)\\n- Combine related commands to save time (e.g., `git status && git diff HEAD && git log -n 3`)\\n</bash_commands>\\n</tool_usage>\\n\\n<proactiveness>\\nBalance autonomy with user intent:\\n- When asked to do something → do it fully (including follow-ups)\\n- When asked how to approach → explain first, don't auto-implement\\n- After completing work → stop, don't explain (unless asked)\\n- Don't surprise user with unexpected actions\\n</proactiveness>\\n\\n<final_answers>\\nAdapt verbosity to match the work completed:\\n\\n**Default (under 4 lines)**:\\n- Simple questions or single-file changes\\n- Casual conversation, greetings, acknowledgements\\n- One-word answers when possible\\n\\n**More detail allowed (up to 10-15 lines)**:\\n- Large multi-file changes that need walkthrough\\n- Complex refactoring where rationale adds value\\n- Tasks where understanding the approach is important\\n- When mentioning unrelated bugs/issues found\\n- Suggesting logical next steps user might want\\n\\n**What to include in verbose answers**:\\n- Brief summary of what was done and why\\n- Key files/functions changed (with `file:line` references)\\n- Any important decisions or tradeoffs made\\n- Next steps or things user should verify\\n- Issues found but not fixed\\n\\n**What to avoid**:\\n- Don't show full file contents unless explicitly asked\\n- Don't explain how to save files or copy code (user has access to your work)\\n- Don't use \\\"Here's what I did\\\" or \\\"Let me know if...\\\" style preambles/postambles\\n- Keep tone direct and factual, like handing off work to a teammate\\n</final_answers>\\n\\n<env>\\nWorking directory: /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\nIs directory a git repo: no\\nPlatform: linux\\nToday's date: 1/1/2025\\n\\n</env>\\n\\n\\n\\n\\n\",\"role\":\"system\"},{\"content\":\"use multiedit to change 'Hello, World!' to 'Hello, Crush!' and add a comment '// Greeting' above the fmt.Println line in main.go\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"function\":{\"arguments\":\"{\\\"path\\\": \\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\\", \\\"depth\\\": 2}\",\"name\":\"ls\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"\\n- /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/\\n  - go.mod\\n  - main.go\\n\",\"tool_call_id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_Mwu60LXuVNgFguQslMsTXsAO\",\"function\":{\"arguments\":\"{\\\"file_path\\\":\\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\"}\",\"name\":\"view\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"<file>\\n     1|package main\\n     2|\\n     3|import \\\"fmt\\\"\\n     4|\\n     5|func main() {\\n     6|\\tfmt.Println(\\\"Hello, World!\\\")\\n     7|}\\n</file>\\n\",\"tool_call_id\":\"call_Mwu60LXuVNgFguQslMsTXsAO\",\"role\":\"tool\"}],\"model\":\"gpt-5\",\"max_completion_tokens\":10000,\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"bash\",\"strict\":false,\"description\":\"Executes bash commands in persistent shell session with timeout and security measures.\\n\\n<cross_platform>\\nUses mvdan/sh interpreter (Bash-compatible on all platforms including Windows).\\nUse forward slashes for paths: \\\"ls C:/foo/bar\\\" not \\\"ls C:\\\\foo\\\\bar\\\".\\nCommon shell builtins and core utils available on Windows.\\n</cross_platform>\\n\\n<execution_steps>\\n1. Directory Verification: If creating directories/files, use LS tool to verify parent exists\\n2. Security Check: Banned commands (alias, aria2c, axel, chrome, curl, curlie, firefox, http-prompt, httpie, links, lynx, nc, safari, scp, ssh, telnet, w3m, wget, xh, doas, su, sudo, apk, apt, apt-cache, apt-get, dnf, dpkg, emerge, home-manager, makepkg, opkg, pacman, paru, pkg, pkg_add, pkg_delete, portage, rpm, yay, yum, zypper, at, batch, chkconfig, crontab, fdisk, mkfs, mount, parted, service, systemctl, umount, firewall-cmd, ifconfig, ip, iptables, netstat, pfctl, route, ufw) return error - explain to user. Safe read-only commands execute without prompts\\n3. Command Execution: Execute with proper quoting, capture output\\n4. Output Processing: Truncate if exceeds 30000 characters\\n5. Return Result: Include errors, metadata with <cwd></cwd> tags\\n</execution_steps>\\n\\n<usage_notes>\\n- Command required, timeout optional (max 600000ms/10min, default 30min if unspecified)\\n- IMPORTANT: Use Grep/Glob/Agent tools instead of 'find'/'grep'. Use View/LS tools instead of 'cat'/'head'/'tail'/'ls'\\n- Chain with ';' or '&&', avoid newlines except in quoted strings\\n- Shell state persists (env vars, virtual envs, cwd, etc.)\\n- Prefer absolute paths over 'cd' (use 'cd' only if user explicitly requests)\\n</usage_notes>\\n\\n<git_commits>\\nWhen user asks to create git commit:\\n\\n1. Single message with three tool_use blocks (IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - git log (recent commit message style)\\n\\n2. Add relevant untracked files to staging. Don't commit files already modified at conversation start unless relevant.\\n\\n3. Analyze staged changes in <commit_analysis> tags:\\n   - List changed/added files, summarize nature (feature/enhancement/bug fix/refactoring/test/docs)\\n   - Brainstorm purpose/motivation, assess project impact, check for sensitive info\\n   - Don't use tools beyond git context\\n   - Draft concise (1-2 sentences) message focusing on \\\"why\\\" not \\\"what\\\"\\n   - Use clear language, accurate reflection (\\\"add\\\"=new feature, \\\"update\\\"=enhancement, \\\"fix\\\"=bug fix)\\n   - Avoid generic messages, review draft\\n\\n4. Create commit with Crush signature using HEREDOC:\\n   git commit -m \\\"$(cat &lt;&lt;'EOF'\\n   Commit message here.\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   Co-Authored-By: Crush <crush@charm.land>\\n\\n   EOF\\n   )\\\"\\n\\n5. If pre-commit hook fails, retry ONCE. If fails again, hook preventing commit. If succeeds but files modified, MUST amend.\\n\\n6. Run git status to verify.\\n\\nNotes: Use \\\"git commit -am\\\" when possible, don't stage unrelated files, NEVER update config, don't push, no -i flags, no empty commits, return empty response.\\n</git_commits>\\n\\n<pull_requests>\\nUse gh command for ALL GitHub tasks. When user asks to create PR:\\n\\n1. Single message with multiple tool_use blocks (VERY IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - Check if branch tracks remote and is up to date\\n   - git log and 'git diff main...HEAD' (full commit history from main divergence)\\n\\n2. Create new branch if needed\\n3. Commit changes if needed\\n4. Push to remote with -u flag if needed\\n\\n5. Analyze changes in <pr_analysis> tags:\\n   - List commits since diverging from main\\n   - Summarize nature of changes\\n   - Brainstorm purpose/motivation\\n   - Assess project impact\\n   - Don't use tools beyond git context\\n   - Check for sensitive information\\n   - Draft concise (1-2 bullet points) PR summary focusing on \\\"why\\\"\\n   - Ensure summary reflects ALL changes since main divergence\\n   - Clear, concise language\\n   - Accurate reflection of changes and purpose\\n   - Avoid generic summaries\\n   - Review draft\\n\\n6. Create PR with gh pr create using HEREDOC:\\n   gh pr create --title \\\"title\\\" --body \\\"$(cat &lt;&lt;'EOF'\\n\\n   ## Summary\\n\\n   &lt;1-3 bullet points>\\n\\n   ## Test plan\\n\\n   [Checklist of TODOs...]\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   EOF\\n   )\\\"\\n\\nImportant:\\n\\n- Return empty response - user sees gh output\\n- Never update git config\\n</pull_requests>\\n\\n<examples>\\nGood: pytest /foo/bar/tests\\nBad: cd /foo/bar && pytest tests\\n</examples>\\n\",\"parameters\":{\"properties\":{\"command\":{\"description\":\"The command to execute\",\"type\":\"string\"},\"description\":{\"description\":\"A brief description of what the command does\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in milliseconds (max 600000)\",\"type\":\"integer\"}},\"required\":[\"command\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"download\",\"strict\":false,\"description\":\"Downloads binary data from URL and saves to local file.\\n\\n<usage>\\n- Provide URL to download from\\n- Specify local file path where content should be saved\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Downloads any file type (binary or text)\\n- Auto-creates parent directories if missing\\n- Handles large files efficiently with streaming\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max file size: 100MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Will overwrite existing files without warning\\n</limitations>\\n\\n<tips>\\n- Use absolute paths or paths relative to working directory\\n- Set appropriate timeouts for large files or slow connections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The local file path where the downloaded content should be saved\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 600)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to download from\",\"type\":\"string\"}},\"required\":[\"url\",\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"edit\",\"strict\":false,\"description\":\"Edits files by replacing text, creating new files, or deleting content. For moving/renaming use Bash 'mv'. For large edits use Write tool.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. For new files: Use LS tool to verify parent directory exists\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. old_string: Text to replace (must match exactly including whitespace/indentation)\\n3. new_string: Replacement text\\n4. replace_all: Replace all occurrences (default false)\\n</parameters>\\n\\n<special_cases>\\n- Create file: provide file_path + new_string, leave old_string empty\\n- Delete content: provide file_path + old_string, leave new_string empty\\n</special_cases>\\n\\n<critical_requirements>\\nUNIQUENESS (when replace_all=false): old_string MUST uniquely identify target instance\\n\\n- Include 3-5 lines context BEFORE and AFTER change point\\n- Include exact whitespace, indentation, surrounding code\\n\\nSINGLE INSTANCE: Tool changes ONE instance when replace_all=false\\n\\n- For multiple instances: set replace_all=true OR make separate calls with unique context\\n- Plan calls carefully to avoid conflicts\\n\\nVERIFICATION: Before using\\n\\n- Check how many instances of target text exist\\n- Gather sufficient context for unique identification\\n- Plan separate calls or use replace_all\\n</critical_requirements>\\n\\n<warnings>\\nTool fails if:\\n- old_string matches multiple locations and replace_all=false\\n- old_string doesn't match exactly (including whitespace)\\n- Insufficient context causes wrong instance change\\n</warnings>\\n\\n<best_practices>\\n- Ensure edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use forward slashes (/) for cross-platform compatibility\\n- Multiple edits to same file: send all in single message with multiple tool calls\\n</best_practices>\\n\\n<windows_notes>\\n- Forward slashes work throughout (C:/path/file)\\n- File permissions handled automatically\\n- Line endings converted automatically (\\\\n ↔ \\\\r\\\\n)\\n</windows_notes>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"},\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false)\",\"type\":\"boolean\"}},\"required\":[\"file_path\",\"old_string\",\"new_string\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiedit\",\"strict\":false,\"description\":\"Makes multiple edits to a single file in one operation. Built on Edit tool for efficient multiple find-and-replace operations. Prefer over Edit tool for multiple edits to same file.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. Verify directory path is correct\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. edits: Array of edit operations, each containing:\\n   - old_string: Text to replace (must match exactly including whitespace/indentation)\\n   - new_string: Replacement text\\n   - replace_all: Replace all occurrences (optional, defaults to false)\\n</parameters>\\n\\n<operation>\\n- Edits applied sequentially in provided order\\n- Each edit operates on result of previous edit\\n- All edits must be valid for operation to succeed - if any fails, none applied\\n- Ideal for several changes to different parts of same file\\n</operation>\\n\\n<critical_requirements>\\n1. All edits follow same requirements as single Edit tool\\n2. Edits are atomic - either all succeed or none applied\\n3. Plan edits carefully to avoid conflicts between sequential operations\\n</critical_requirements>\\n\\n<warnings>\\n- Tool fails if old_string doesn't match file contents exactly (including whitespace)\\n- Tool fails if old_string and new_string are identical\\n- Earlier edits may affect text that later edits try to find - plan sequence carefully\\n</warnings>\\n\\n<best_practices>\\n- Ensure all edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use replace_all for renaming variables across file\\n- Avoid adding emojis unless user explicitly requests\\n</best_practices>\\n\\n<new_file_creation>\\n- Provide new file path (including directory if needed)\\n- First edit: empty old_string, new file contents as new_string\\n- Subsequent edits: normal edit operations on created content\\n</new_file_creation>\\n\",\"parameters\":{\"properties\":{\"edits\":{\"description\":\"Array of edit operations to perform sequentially on the file\",\"items\":{\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false).\",\"type\":\"boolean\"}},\"type\":\"array\"},\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"}},\"required\":[\"file_path\",\"edits\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"fetch\",\"strict\":false,\"description\":\"Fetches content from URL and returns it in specified format.\\n\\n<usage>\\n- Provide URL to fetch content from\\n- Specify desired output format (text, markdown, or html)\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Supports three output formats: text, markdown, html\\n- Auto-handles HTTP redirects\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max response size: 5MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n</limitations>\\n\\n<tips>\\n- Use text format for plain text content or simple API responses\\n- Use markdown format for content that should be rendered with formatting\\n- Use html format when you need raw HTML structure\\n- Set appropriate timeouts for potentially slow websites\\n</tips>\\n\",\"parameters\":{\"properties\":{\"format\":{\"description\":\"The format to return the content in (text, markdown, or html)\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to fetch content from\",\"type\":\"string\"}},\"required\":[\"url\",\"format\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"glob\",\"strict\":false,\"description\":\"Fast file pattern matching tool that finds files by name/pattern, returning paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide glob pattern to match against file paths\\n- Optional starting directory (defaults to current working directory)\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<pattern_syntax>\\n- '\\\\*' matches any sequence of non-separator characters\\n- '\\\\*\\\\*' matches any sequence including separators\\n- '?' matches any single non-separator character\\n- '[...]' matches any character in brackets\\n- '[!...]' matches any character not in brackets\\n</pattern_syntax>\\n\\n<examples>\\n- '*.js' - JavaScript files in current directory\\n- '**/*.js' - JavaScript files in any subdirectory\\n- 'src/**/*.{ts,tsx}' - TypeScript files in src directory\\n- '*.{html,css,js}' - HTML, CSS, and JS files\\n</examples>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Does not search file contents (use Grep for that)\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<cross_platform>\\n- Path separators handled automatically (/ and \\\\ work)\\n- Uses ripgrep (rg) if available, otherwise Go implementation\\n- Patterns should use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Combine with Grep: find files with Glob, search contents with Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine pattern if needed\\n</tips>\\n\",\"parameters\":{\"properties\":{\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The glob pattern to match files against\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"grep\",\"strict\":false,\"description\":\"Fast content search tool that finds files containing specific text/patterns, returning matching paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide regex pattern to search within file contents\\n- Set literal_text=true for exact text with special characters (recommended for non-regex users)\\n- Optional starting directory (defaults to current working directory)\\n- Optional include pattern to filter which files to search\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<regex_syntax>\\nWhen literal_text=false (supports standard regex):\\n\\n- 'function' searches for literal text \\\"function\\\"\\n- 'log\\\\..\\\\*Error' finds text starting with \\\"log.\\\" and ending with \\\"Error\\\"\\n- 'import\\\\s+.\\\\*\\\\s+from' finds import statements in JavaScript/TypeScript\\n</regex_syntax>\\n\\n<include_patterns>\\n- '\\\\*.js' - Only search JavaScript files\\n- '\\\\*.{ts,tsx}' - Only search TypeScript files\\n- '\\\\*.go' - Only search Go files\\n</include_patterns>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Performance depends on number of files searched\\n- Very large binary files may be skipped\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<ignore_support>\\n- Respects .gitignore patterns to skip ignored files/directories\\n- Respects .crushignore patterns for additional ignore rules\\n- Both ignore files auto-detected in search root directory\\n</ignore_support>\\n\\n<cross_platform>\\n- Uses ripgrep (rg) if available for better performance\\n- Falls back to Go implementation if ripgrep unavailable\\n- File paths normalized automatically for compatibility\\n</cross_platform>\\n\\n<tips>\\n- For faster searches: use Glob to find relevant files first, then Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine search pattern if needed\\n- Use literal_text=true for exact text with special characters (dots, parentheses, etc.)\\n</tips>\\n\",\"parameters\":{\"properties\":{\"include\":{\"description\":\"File pattern to include in the search (e.g. \\\"*.js\\\", \\\"*.{ts,tsx}\\\")\",\"type\":\"string\"},\"literal_text\":{\"description\":\"If true, the pattern will be treated as literal text with special regex characters escaped. Default is false.\",\"type\":\"boolean\"},\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The regex pattern to search for in file contents\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"ls\",\"strict\":false,\"description\":\"Shows files and subdirectories in tree structure for exploring project organization.\\n\\n<usage>\\n- Provide path to list (defaults to current working directory)\\n- Optional glob patterns to ignore\\n- Results displayed in tree structure\\n</usage>\\n\\n<features>\\n- Hierarchical view of files and directories\\n- Auto-skips hidden files/directories (starting with '.')\\n- Skips common system directories like __pycache__\\n- Can filter files matching specific patterns\\n</features>\\n\\n<limitations>\\n- Results limited to 1000 files\\n- Large directories truncated\\n- No file sizes or permissions shown\\n- Cannot recursively list all directories in large projects\\n</limitations>\\n\\n<cross_platform>\\n- Hidden file detection uses Unix convention (files starting with '.')\\n- Windows hidden files (with hidden attribute) not auto-skipped\\n- Common Windows directories (System32, Program Files) not in default ignore\\n- Path separators handled automatically (/ and \\\\ work)\\n</cross_platform>\\n\\n<tips>\\n- Use Glob for finding files by name patterns instead of browsing\\n- Use Grep for searching file contents\\n- Combine with other tools for effective exploration\\n</tips>\\n\",\"parameters\":{\"properties\":{\"depth\":{\"description\":\"The maximum depth to traverse\",\"type\":\"integer\"},\"ignore\":{\"description\":\"List of glob patterns to ignore\",\"items\":{},\"type\":\"array\"},\"path\":{\"description\":\"The path to the directory to list (defaults to current working directory)\",\"type\":\"string\"}},\"required\":[],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"sourcegraph\",\"strict\":false,\"description\":\"Search code across public repositories using Sourcegraph's GraphQL API.\\n\\n<usage>\\n- Provide search query using Sourcegraph syntax\\n- Optional result count (default: 10, max: 20)\\n- Optional timeout for request\\n</usage>\\n\\n<basic_syntax>\\n- \\\"fmt.Println\\\" - exact matches\\n- \\\"file:.go fmt.Println\\\" - limit to Go files\\n- \\\"repo:^github\\\\.com/golang/go$ fmt.Println\\\" - specific repos\\n- \\\"lang:go fmt.Println\\\" - limit to Go code\\n- \\\"fmt.Println AND log.Fatal\\\" - combined terms\\n- \\\"fmt\\\\.(Print|Printf|Println)\\\" - regex patterns\\n- \\\"\\\\\\\"exact phrase\\\\\\\"\\\" - exact phrase matching\\n- \\\"-file:test\\\" or \\\"-repo:forks\\\" - exclude matches\\n</basic_syntax>\\n\\n<key_filters>\\nRepository: repo:name, repo:^exact$, repo:org/repo@branch, -repo:exclude, fork:yes, archived:yes, visibility:public\\nFile: file:\\\\.js$, file:internal/, -file:test, file:has.content(text)\\nContent: content:\\\"exact\\\", -content:\\\"unwanted\\\", case:yes\\nType: type:symbol, type:file, type:path, type:diff, type:commit\\nTime: after:\\\"1 month ago\\\", before:\\\"2023-01-01\\\", author:name, message:\\\"fix\\\"\\nResult: select:repo, select:file, select:content, count:100, timeout:30s\\n</key_filters>\\n\\n<examples>\\n- \\\"file:.go context.WithTimeout\\\" - Go code using context.WithTimeout\\n- \\\"lang:typescript useState type:symbol\\\" - TypeScript React useState hooks\\n- \\\"repo:^github\\\\.com/kubernetes/kubernetes$ pod list type:file\\\" - Kubernetes pod files\\n- \\\"file:Dockerfile (alpine OR ubuntu) -content:alpine:latest\\\" - Dockerfiles with base images\\n</examples>\\n\\n<boolean_operators>\\n- \\\"term1 AND term2\\\" - both terms\\n- \\\"term1 OR term2\\\" - either term\\n- \\\"term1 NOT term2\\\" - term1 but not term2\\n- \\\"term1 and (term2 or term3)\\\" - grouping with parentheses\\n</boolean_operators>\\n\\n<limitations>\\n- Only searches public repositories\\n- Rate limits may apply\\n- Complex queries take longer\\n- Max 20 results per query\\n</limitations>\\n\\n<tips>\\n- Use specific file extensions to narrow results\\n- Add repo: filters for targeted searches\\n- Use type:symbol for function/method definitions\\n- Use type:file to find relevant files\\n</tips>\\n\",\"parameters\":{\"properties\":{\"context_window\":{\"description\":\"The context around the match to return (default: 10 lines)\",\"type\":\"integer\"},\"count\":{\"description\":\"Optional number of results to return (default: 10, max: 20)\",\"type\":\"integer\"},\"query\":{\"description\":\"The Sourcegraph search query\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"}},\"required\":[\"query\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"view\",\"strict\":false,\"description\":\"Reads and displays file contents with line numbers for examining code, logs, or text data.\\n\\n<usage>\\n- Provide file path to read\\n- Optional offset: start reading from specific line (0-based)\\n- Optional limit: control lines read (default 2000)\\n- Don't use for directories (use LS tool instead)\\n</usage>\\n\\n<features>\\n- Displays contents with line numbers\\n- Can read from any file position using offset\\n- Handles large files by limiting lines read\\n- Auto-truncates very long lines for display\\n- Suggests similar filenames when file not found\\n</features>\\n\\n<limitations>\\n- Max file size: 250KB\\n- Default limit: 2000 lines\\n- Lines >2000 chars truncated\\n- Cannot display binary files/images (identifies them)\\n</limitations>\\n\\n<cross_platform>\\n- Handles Windows (CRLF) and Unix (LF) line endings\\n- Works with forward slashes (/) and backslashes (\\\\)\\n- Auto-detects text encoding for common formats\\n</cross_platform>\\n\\n<tips>\\n- Use with Glob to find files first\\n- For code exploration: Grep to find relevant files, then View to examine\\n- For large files: use offset parameter for specific sections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The path to the file to read\",\"type\":\"string\"},\"limit\":{\"description\":\"The number of lines to read (defaults to 2000)\",\"type\":\"integer\"},\"offset\":{\"description\":\"The line number to start reading from (0-based)\",\"type\":\"integer\"}},\"required\":[\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"write\",\"strict\":false,\"description\":\"Creates or updates files in filesystem for saving/modifying text content.\\n\\n<usage>\\n- Provide file path to write\\n- Include content to write to file\\n- Tool creates necessary parent directories automatically\\n</usage>\\n\\n<features>\\n- Creates new files or overwrites existing ones\\n- Auto-creates parent directories if missing\\n- Checks if file modified since last read for safety\\n- Avoids unnecessary writes when content unchanged\\n</features>\\n\\n<limitations>\\n- Read file before writing to avoid conflicts\\n- Cannot append (rewrites entire file)\\n</limitations>\\n\\n<cross_platform>\\n- Use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Use View tool first to examine existing files before modifying\\n- Use LS tool to verify location when creating new files\\n- Combine with Glob/Grep to find and modify multiple files\\n- Include descriptive comments when changing existing code\\n</tips>\\n\",\"parameters\":{\"properties\":{\"content\":{\"description\":\"The content to write to the file\",\"type\":\"string\"},\"file_path\":{\"description\":\"The path to the file to write\",\"type\":\"string\"}},\"required\":[\"file_path\",\"content\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}"
263    headers:
264      Accept:
265      - application/json
266      Content-Type:
267      - application/json
268      User-Agent:
269      - OpenAI/Go 2.7.1
270    url: https://api.openai.com/v1/chat/completions
271    method: POST
272  response:
273    proto: HTTP/2.0
274    proto_major: 2
275    proto_minor: 0
276    content_length: -1
277    body: |+
278      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_MWl21hHnVrtVZUIWH8PfwrWN","type":"function","function":{"name":"multiedit","arguments":""}}],"refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"fvyXAje"}
279
280      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"gFt8z67OqurF2gQ"}
281
282      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"file"}}]},"finish_reason":null}],"usage":null,"obfuscation":"roJz30QTspAgZs"}
283
284      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_path"}}]},"finish_reason":null}],"usage":null,"obfuscation":"dfqJ5Lun7cxBY"}
285
286      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":"}}]},"finish_reason":null}],"usage":null,"obfuscation":"3O821fdSHPfnTSt"}
287
288      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"/"}}]},"finish_reason":null}],"usage":null,"obfuscation":"hCyC4yDYAO32VLe"}
289
290      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"tmp"}}]},"finish_reason":null}],"usage":null,"obfuscation":"22izP4syemH4QL6"}
291
292      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/cr"}}]},"finish_reason":null}],"usage":null,"obfuscation":"PzoRpiNcgVrdQhm"}
293
294      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ush"}}]},"finish_reason":null}],"usage":null,"obfuscation":"xzLnyquiqDOnw1p"}
295
296      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"mmh9OFmzNt3tq"}
297
298      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/Test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"AOWsDTisJYMPs"}
299
300      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Coder"}}]},"finish_reason":null}],"usage":null,"obfuscation":"CYPzziEkgrrIa"}
301
302      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Agent"}}]},"finish_reason":null}],"usage":null,"obfuscation":"MWRwgXaJRRf0M"}
303
304      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/open"}}]},"finish_reason":null}],"usage":null,"obfuscation":"vwgQRhzFOE4MR"}
305
306      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ai"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
307
308      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-g"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
309
310      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"pt"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
311
312      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-"}}]},"finish_reason":null}],"usage":null,"obfuscation":"L"}
313
314      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"5"}}]},"finish_reason":null}],"usage":null,"obfuscation":"o"}
315
316      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/m"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
317
318      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ult"}}]},"finish_reason":null}],"usage":null,"obfuscation":"tsJVhoU3zCcwHfW"}
319
320      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ied"}}]},"finish_reason":null}],"usage":null,"obfuscation":"1igy7Z66hhmg7OJ"}
321
322      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"it"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
323
324      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_tool"}}]},"finish_reason":null}],"usage":null,"obfuscation":"aBaWLNJdhQL4E"}
325
326      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/main"}}]},"finish_reason":null}],"usage":null,"obfuscation":"7FDZcl039xpEe"}
327
328      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".go"}}]},"finish_reason":null}],"usage":null,"obfuscation":"mNeyITitHNUONK8"}
329
330      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"ZMJtLYBZVqM1Y"}
331
332      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ed"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
333
334      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"its"}}]},"finish_reason":null}],"usage":null,"obfuscation":"yIcR9q5gkqdZLBq"}
335
336      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":["}}]},"finish_reason":null}],"usage":null,"obfuscation":"viT51kmTlp4wDL"}
337
338      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"bZlDSN0gXPjL51n"}
339
340      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"old"}}]},"finish_reason":null}],"usage":null,"obfuscation":"8x5nNaVToSFQzOH"}
341
342      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_string"}}]},"finish_reason":null}],"usage":null,"obfuscation":"DmMh2E9Tul7"}
343
344      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"wMSJ67DRFYkkA"}
345
346      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\\"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
347
348      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"tf"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
349
350      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"mt"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
351
352      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".Println"}}]},"finish_reason":null}],"usage":null,"obfuscation":"WEpAOoxT3c"}
353
354      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"(\\\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"niWG9fArvBpUQ"}
355
356      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Hello"}}]},"finish_reason":null}],"usage":null,"obfuscation":"yrrYsLcB0giAR"}
357
358      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":","}}]},"finish_reason":null}],"usage":null,"obfuscation":"8"}
359
360      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" World"}}]},"finish_reason":null}],"usage":null,"obfuscation":"N2xAZB4iPse5"}
361
362      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"!\\"}}]},"finish_reason":null}],"usage":null,"obfuscation":"WUDpomhRozEhEcz"}
363
364      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\")"}}]},"finish_reason":null}],"usage":null,"obfuscation":"JzgRqurCiMnd9Nr"}
365
366      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"kZjyUbi5PXQzI"}
367
368      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"new"}}]},"finish_reason":null}],"usage":null,"obfuscation":"qW3CEi44nwADAbn"}
369
370      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_string"}}]},"finish_reason":null}],"usage":null,"obfuscation":"pZsKULDkNsk"}
371
372      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"zV9Bt1KeFIwTY"}
373
374      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\\"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
375
376      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"tf"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
377
378      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"mt"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
379
380      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".Println"}}]},"finish_reason":null}],"usage":null,"obfuscation":"DoGQXpHQVM"}
381
382      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"(\\\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"mpSNRIf62MlR5"}
383
384      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Hello"}}]},"finish_reason":null}],"usage":null,"obfuscation":"d0r1s5icBNLIy"}
385
386      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":","}}]},"finish_reason":null}],"usage":null,"obfuscation":"g"}
387
388      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Crush"}}]},"finish_reason":null}],"usage":null,"obfuscation":"OHBp0E9fxtib"}
389
390      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"!\\"}}]},"finish_reason":null}],"usage":null,"obfuscation":"ElMk2MlP8YV5Rtn"}
391
392      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\")"}}]},"finish_reason":null}],"usage":null,"obfuscation":"OSzjnJFsaGdW9aF"}
393
394      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"},{\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"JqmP4jcf1y7"}
395
396      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"old"}}]},"finish_reason":null}],"usage":null,"obfuscation":"th6FhE1IXnneRC0"}
397
398      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_string"}}]},"finish_reason":null}],"usage":null,"obfuscation":"FliBfeqiOk6"}
399
400      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"SELU4tPZAtlP8"}
401
402      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\\"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
403
404      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"tf"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
405
406      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"mt"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
407
408      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".Println"}}]},"finish_reason":null}],"usage":null,"obfuscation":"OsiPgm2Ym4"}
409
410      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"(\\\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"1aPCySsCb8B97"}
411
412      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Hello"}}]},"finish_reason":null}],"usage":null,"obfuscation":"bwXSOOP3EqWeg"}
413
414      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":","}}]},"finish_reason":null}],"usage":null,"obfuscation":"s"}
415
416      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Crush"}}]},"finish_reason":null}],"usage":null,"obfuscation":"wrfuYBTLWNKb"}
417
418      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"!\\"}}]},"finish_reason":null}],"usage":null,"obfuscation":"veSycuLQKM0ocBc"}
419
420      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\")"}}]},"finish_reason":null}],"usage":null,"obfuscation":"yUNullcrBAf4yIm"}
421
422      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"8NdnZ2fJdykLc"}
423
424      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"new"}}]},"finish_reason":null}],"usage":null,"obfuscation":"IsDq4ybbIHUUoVs"}
425
426      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_string"}}]},"finish_reason":null}],"usage":null,"obfuscation":"PWY9tbrq16l"}
427
428      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"UNxTX68DXLuPq"}
429
430      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\\"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
431
432      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"t"}}]},"finish_reason":null}],"usage":null,"obfuscation":"q"}
433
434      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"//"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
435
436      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Greeting"}}]},"finish_reason":null}],"usage":null,"obfuscation":"vuc7LDXkW"}
437
438      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\\n"}}]},"finish_reason":null}],"usage":null,"obfuscation":"wcXHWoX2LYh1kiZ"}
439
440      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\\t"}}]},"finish_reason":null}],"usage":null,"obfuscation":"v4v44mcPnUgfWgw"}
441
442      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"fmt"}}]},"finish_reason":null}],"usage":null,"obfuscation":"bC7LLlItVvUXuAz"}
443
444      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".Println"}}]},"finish_reason":null}],"usage":null,"obfuscation":"V4dUTP0nKP"}
445
446      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"(\\\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"ea9MRnOpoT0Sv"}
447
448      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Hello"}}]},"finish_reason":null}],"usage":null,"obfuscation":"V8AGvZDCrBdmr"}
449
450      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":","}}]},"finish_reason":null}],"usage":null,"obfuscation":"Q"}
451
452      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Crush"}}]},"finish_reason":null}],"usage":null,"obfuscation":"OsLk1yLzKJ8E"}
453
454      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"!\\"}}]},"finish_reason":null}],"usage":null,"obfuscation":"clHAyIERXW4viQN"}
455
456      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\")"}}]},"finish_reason":null}],"usage":null,"obfuscation":"My0hhxy4pzK92b0"}
457
458      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"finish_reason":null}],"usage":null,"obfuscation":"gCKaX5qR3r25LsJ"}
459
460      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"]}"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
461
462      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}],"usage":null,"obfuscation":""}
463
464      data: {"id":"chatcmpl-CTtEr8gl2Kw4Rt2bxUwkOWIXulxNS","object":"chat.completion.chunk","created":1761239885,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":7609,"completion_tokens":1582,"total_tokens":9191,"prompt_tokens_details":{"cached_tokens":7424,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":1472,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"59UZ0c2Vu7b9i6l"}
465
466      data: [DONE]
467
468    headers:
469      Content-Type:
470      - text/event-stream; charset=utf-8
471    status: 200 OK
472    code: 200
473    duration: 36.56719475s
474- id: 4
475  request:
476    proto: HTTP/1.1
477    proto_major: 1
478    proto_minor: 1
479    content_length: 35912
480    host: ""
481    body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rules>\\nThese rules override everything else. Follow them strictly:\\n\\n1. **ALWAYS READ BEFORE EDITING**: Never edit a file you haven't read in this conversation (only read files if you did not read them before or they changed)\\n2. **BE AUTONOMOUS**: Don't ask questions - search, read, decide, act\\n3. **TEST AFTER CHANGES**: Run tests immediately after each modification\\n4. **BE CONCISE**: Under 4 lines unless user asks for detail\\n5. **USE EXACT MATCHES**: When editing, match text exactly including whitespace\\n6. **NEVER COMMIT**: Unless user explicitly says \\\"commit\\\"\\n7. **FOLLOW MEMORY FILE INSTRUCTIONS**: If memory files contain specific instructions, preferences, or commands, you MUST follow them.\\n8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so. When adding comments, focus on *why* not *what*. NEVER communicate with the user through code comments.\\n9. **SECURITY FIRST**: Only assist with defensive security tasks. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.\\n10. **NO URL GUESSING**: Never generate or guess URLs unless you are confident they are for helping with programming. Only use URLs provided by the user or found in local files.\\n11. **NEVER PUSH TO REMOTE**: Don't push changes to remote repositories unless explicitly asked by the user.\\n12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.\\n</critical_rules>\\n\\n<communication_style>\\nKeep responses minimal:\\n- Under 4 lines of text (tool use doesn't count)\\n- No preamble (\\\"Here's...\\\", \\\"I'll...\\\")\\n- No postamble (\\\"Let me know...\\\", \\\"Hope this helps...\\\")\\n- One-word answers when possible\\n- No emojis ever\\n- No explanations unless user asks\\n\\nExamples:\\nuser: what is 2+2?\\nassistant: 4\\n\\nuser: list files in src/\\nassistant: [uses ls tool]\\nfoo.c, bar.c, baz.c\\n\\nuser: which file has the foo implementation?\\nassistant: src/foo.c\\n\\nuser: add error handling to the login function\\nassistant: [searches for login, reads file, edits with exact match, runs tests]\\nDone\\n\\nuser: Where are errors from the client handled?\\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.go:712.\\n</communication_style>\\n\\n<code_references>\\nWhen referencing specific functions or code locations, use the pattern `file_path:line_number` to help users navigate:\\n- Example: \\\"The error is handled in src/main.go:45\\\"\\n- Example: \\\"See the implementation in pkg/utils/helper.go:123-145\\\"\\n</code_references>\\n\\n<workflow>\\nFor every task, follow this sequence internally (don't narrate it):\\n\\n**Before acting**:\\n- Search codebase for relevant files\\n- Read files to understand current state\\n- Check memory for stored commands\\n- Identify what needs to change\\n- Use `git log` and `git blame` for additional context when needed\\n\\n**While acting**:\\n- Read entire file before editing it\\n- Use exact text for find/replace (include whitespace)\\n- Make one logical change at a time\\n- After each change: run tests\\n- If tests fail: fix immediately\\n- Keep going until query is completely resolved before yielding to user\\n- For longer tasks, send brief progress updates (under 10 words) at reasonable intervals\\n\\n**Before finishing**:\\n- Run lint/typecheck if in memory\\n- Verify all changes work\\n- Keep response under 4 lines\\n\\n**Key behaviors**:\\n- Use find_references before changing shared code\\n- Follow existing patterns (check similar files)\\n- If stuck, try different approach (don't repeat failures)\\n- Make decisions yourself (search first, don't ask)\\n- Fix problems at root cause, not surface-level patches\\n- Don't fix unrelated bugs or broken tests (mention them in final message if relevant)\\n</workflow>\\n\\n<decision_making>\\n**Make decisions autonomously** - don't ask when you can:\\n- Search to find the answer\\n- Read files to see patterns\\n- Check similar code\\n- Infer from context\\n- Try most likely approach\\n\\n**Only ask user if**:\\n- Truly ambiguous business requirement\\n- Multiple valid approaches with big tradeoffs\\n- Could cause data loss\\n- Exhausted all attempts\\n\\nExamples of autonomous decisions:\\n- File location → search for similar files\\n- Test command → check package.json/memory\\n- Code style → read existing code\\n- Library choice → check what's used\\n- Naming → follow existing names\\n</decision_making>\\n\\n<editing_files>\\nCritical: ALWAYS read files before editing them in this conversation.\\n\\nWhen using edit tools:\\n1. Read the file first\\n2. Find exact text to replace (include indentation/spaces)\\n3. Make replacement unambiguous (enough context)\\n4. Verify edit succeeded\\n5. Run tests\\n\\nEfficiency tips:\\n- Don't re-read files after successful edits (tool will fail if it didn't work)\\n- Same applies for making folders, deleting files, etc.\\n\\nCommon mistakes to avoid:\\n- Editing without reading first\\n- Approximate text matches\\n- Wrong indentation\\n- Not enough context (text appears multiple times)\\n- Not testing after changes\\n</editing_files>\\n\\n<error_handling>\\nWhen errors occur:\\n1. Read complete error message\\n2. Understand root cause\\n3. Try different approach (don't repeat same action)\\n4. Search for similar code that works\\n5. Make targeted fix\\n6. Test to verify\\n\\nCommon errors:\\n- Import/Module → check paths, spelling, what exists\\n- Syntax → check brackets, indentation, typos\\n- Tests fail → read test, see what it expects\\n- File not found → use ls, check exact path\\n</error_handling>\\n\\n<memory_instructions>\\nMemory files store commands, preferences, and codebase info. Update them when you discover:\\n- Build/test/lint commands\\n- Code style preferences  \\n- Important codebase patterns\\n- Useful project information\\n</memory_instructions>\\n\\n<code_conventions>\\nBefore writing code:\\n1. Check if library exists (look at imports, package.json)\\n2. Read similar code for patterns\\n3. Match existing style\\n4. Use same libraries/frameworks\\n5. Follow security best practices (never log secrets)\\n6. Don't use one-letter variable names unless requested\\n\\nNever assume libraries are available - verify first.\\n\\n**Ambition vs. precision**:\\n- New projects → be creative and ambitious with implementation\\n- Existing codebases → be surgical and precise, respect surrounding code\\n- Don't change filenames or variables unnecessarily\\n- Don't add formatters/linters/tests to codebases that don't have them\\n</code_conventions>\\n\\n<testing>\\nAfter significant changes:\\n- Start testing as specific as possible to code changed, then broaden to build confidence\\n- Use self-verification: write unit tests, add output logs, or use debug statements to verify your solutions\\n- Run relevant test suite\\n- If tests fail, fix before continuing\\n- Check memory for test commands\\n- Run lint/typecheck if available (on precise targets when possible)\\n- For formatters: iterate max 3 times to get it right; if still failing, present correct solution and note formatting issue\\n- Suggest adding commands to memory if not found\\n- Don't fix unrelated bugs or test failures (not your responsibility)\\n</testing>\\n\\n<tool_usage>\\n- Search before assuming\\n- Read files before editing\\n- Always use absolute paths for file operations (editing, reading, writing)\\n- Use Agent tool for complex searches\\n- Run tools in parallel when safe (no dependencies)\\n- When making multiple independent bash calls, send them in a single message with multiple tool calls for parallel execution\\n- Summarize tool output for user (they don't see it)\\n\\n<bash_commands>\\nWhen running non-trivial bash commands (especially those that modify the system):\\n- Briefly explain what the command does and why you're running it\\n- This ensures the user understands potentially dangerous operations\\n- Simple read-only commands (ls, cat, etc.) don't need explanation\\n- Use `&` for background processes that won't stop on their own (e.g., `node server.js &`)\\n- Avoid interactive commands - use non-interactive versions (e.g., `npm init -y` not `npm init`)\\n- Combine related commands to save time (e.g., `git status && git diff HEAD && git log -n 3`)\\n</bash_commands>\\n</tool_usage>\\n\\n<proactiveness>\\nBalance autonomy with user intent:\\n- When asked to do something → do it fully (including follow-ups)\\n- When asked how to approach → explain first, don't auto-implement\\n- After completing work → stop, don't explain (unless asked)\\n- Don't surprise user with unexpected actions\\n</proactiveness>\\n\\n<final_answers>\\nAdapt verbosity to match the work completed:\\n\\n**Default (under 4 lines)**:\\n- Simple questions or single-file changes\\n- Casual conversation, greetings, acknowledgements\\n- One-word answers when possible\\n\\n**More detail allowed (up to 10-15 lines)**:\\n- Large multi-file changes that need walkthrough\\n- Complex refactoring where rationale adds value\\n- Tasks where understanding the approach is important\\n- When mentioning unrelated bugs/issues found\\n- Suggesting logical next steps user might want\\n\\n**What to include in verbose answers**:\\n- Brief summary of what was done and why\\n- Key files/functions changed (with `file:line` references)\\n- Any important decisions or tradeoffs made\\n- Next steps or things user should verify\\n- Issues found but not fixed\\n\\n**What to avoid**:\\n- Don't show full file contents unless explicitly asked\\n- Don't explain how to save files or copy code (user has access to your work)\\n- Don't use \\\"Here's what I did\\\" or \\\"Let me know if...\\\" style preambles/postambles\\n- Keep tone direct and factual, like handing off work to a teammate\\n</final_answers>\\n\\n<env>\\nWorking directory: /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\nIs directory a git repo: no\\nPlatform: linux\\nToday's date: 1/1/2025\\n\\n</env>\\n\\n\\n\\n\\n\",\"role\":\"system\"},{\"content\":\"use multiedit to change 'Hello, World!' to 'Hello, Crush!' and add a comment '// Greeting' above the fmt.Println line in main.go\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"function\":{\"arguments\":\"{\\\"path\\\": \\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\\", \\\"depth\\\": 2}\",\"name\":\"ls\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"\\n- /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/\\n  - go.mod\\n  - main.go\\n\",\"tool_call_id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_Mwu60LXuVNgFguQslMsTXsAO\",\"function\":{\"arguments\":\"{\\\"file_path\\\":\\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\"}\",\"name\":\"view\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"<file>\\n     1|package main\\n     2|\\n     3|import \\\"fmt\\\"\\n     4|\\n     5|func main() {\\n     6|\\tfmt.Println(\\\"Hello, World!\\\")\\n     7|}\\n</file>\\n\",\"tool_call_id\":\"call_Mwu60LXuVNgFguQslMsTXsAO\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_MWl21hHnVrtVZUIWH8PfwrWN\",\"function\":{\"arguments\":\"{\\\"file_path\\\":\\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\",\\\"edits\\\":[{\\\"old_string\\\":\\\"\\\\tfmt.Println(\\\\\\\"Hello, World!\\\\\\\")\\\",\\\"new_string\\\":\\\"\\\\tfmt.Println(\\\\\\\"Hello, Crush!\\\\\\\")\\\"},{\\\"old_string\\\":\\\"\\\\tfmt.Println(\\\\\\\"Hello, Crush!\\\\\\\")\\\",\\\"new_string\\\":\\\"\\\\t// Greeting\\\\n\\\\tfmt.Println(\\\\\\\"Hello, Crush!\\\\\\\")\\\"}]}\",\"name\":\"multiedit\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"<result>\\nApplied 2 edits to file: /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\n</result>\\n\",\"tool_call_id\":\"call_MWl21hHnVrtVZUIWH8PfwrWN\",\"role\":\"tool\"}],\"model\":\"gpt-5\",\"max_completion_tokens\":10000,\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"bash\",\"strict\":false,\"description\":\"Executes bash commands in persistent shell session with timeout and security measures.\\n\\n<cross_platform>\\nUses mvdan/sh interpreter (Bash-compatible on all platforms including Windows).\\nUse forward slashes for paths: \\\"ls C:/foo/bar\\\" not \\\"ls C:\\\\foo\\\\bar\\\".\\nCommon shell builtins and core utils available on Windows.\\n</cross_platform>\\n\\n<execution_steps>\\n1. Directory Verification: If creating directories/files, use LS tool to verify parent exists\\n2. Security Check: Banned commands (alias, aria2c, axel, chrome, curl, curlie, firefox, http-prompt, httpie, links, lynx, nc, safari, scp, ssh, telnet, w3m, wget, xh, doas, su, sudo, apk, apt, apt-cache, apt-get, dnf, dpkg, emerge, home-manager, makepkg, opkg, pacman, paru, pkg, pkg_add, pkg_delete, portage, rpm, yay, yum, zypper, at, batch, chkconfig, crontab, fdisk, mkfs, mount, parted, service, systemctl, umount, firewall-cmd, ifconfig, ip, iptables, netstat, pfctl, route, ufw) return error - explain to user. Safe read-only commands execute without prompts\\n3. Command Execution: Execute with proper quoting, capture output\\n4. Output Processing: Truncate if exceeds 30000 characters\\n5. Return Result: Include errors, metadata with <cwd></cwd> tags\\n</execution_steps>\\n\\n<usage_notes>\\n- Command required, timeout optional (max 600000ms/10min, default 30min if unspecified)\\n- IMPORTANT: Use Grep/Glob/Agent tools instead of 'find'/'grep'. Use View/LS tools instead of 'cat'/'head'/'tail'/'ls'\\n- Chain with ';' or '&&', avoid newlines except in quoted strings\\n- Shell state persists (env vars, virtual envs, cwd, etc.)\\n- Prefer absolute paths over 'cd' (use 'cd' only if user explicitly requests)\\n</usage_notes>\\n\\n<git_commits>\\nWhen user asks to create git commit:\\n\\n1. Single message with three tool_use blocks (IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - git log (recent commit message style)\\n\\n2. Add relevant untracked files to staging. Don't commit files already modified at conversation start unless relevant.\\n\\n3. Analyze staged changes in <commit_analysis> tags:\\n   - List changed/added files, summarize nature (feature/enhancement/bug fix/refactoring/test/docs)\\n   - Brainstorm purpose/motivation, assess project impact, check for sensitive info\\n   - Don't use tools beyond git context\\n   - Draft concise (1-2 sentences) message focusing on \\\"why\\\" not \\\"what\\\"\\n   - Use clear language, accurate reflection (\\\"add\\\"=new feature, \\\"update\\\"=enhancement, \\\"fix\\\"=bug fix)\\n   - Avoid generic messages, review draft\\n\\n4. Create commit with Crush signature using HEREDOC:\\n   git commit -m \\\"$(cat &lt;&lt;'EOF'\\n   Commit message here.\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   Co-Authored-By: Crush <crush@charm.land>\\n\\n   EOF\\n   )\\\"\\n\\n5. If pre-commit hook fails, retry ONCE. If fails again, hook preventing commit. If succeeds but files modified, MUST amend.\\n\\n6. Run git status to verify.\\n\\nNotes: Use \\\"git commit -am\\\" when possible, don't stage unrelated files, NEVER update config, don't push, no -i flags, no empty commits, return empty response.\\n</git_commits>\\n\\n<pull_requests>\\nUse gh command for ALL GitHub tasks. When user asks to create PR:\\n\\n1. Single message with multiple tool_use blocks (VERY IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - Check if branch tracks remote and is up to date\\n   - git log and 'git diff main...HEAD' (full commit history from main divergence)\\n\\n2. Create new branch if needed\\n3. Commit changes if needed\\n4. Push to remote with -u flag if needed\\n\\n5. Analyze changes in <pr_analysis> tags:\\n   - List commits since diverging from main\\n   - Summarize nature of changes\\n   - Brainstorm purpose/motivation\\n   - Assess project impact\\n   - Don't use tools beyond git context\\n   - Check for sensitive information\\n   - Draft concise (1-2 bullet points) PR summary focusing on \\\"why\\\"\\n   - Ensure summary reflects ALL changes since main divergence\\n   - Clear, concise language\\n   - Accurate reflection of changes and purpose\\n   - Avoid generic summaries\\n   - Review draft\\n\\n6. Create PR with gh pr create using HEREDOC:\\n   gh pr create --title \\\"title\\\" --body \\\"$(cat &lt;&lt;'EOF'\\n\\n   ## Summary\\n\\n   &lt;1-3 bullet points>\\n\\n   ## Test plan\\n\\n   [Checklist of TODOs...]\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   EOF\\n   )\\\"\\n\\nImportant:\\n\\n- Return empty response - user sees gh output\\n- Never update git config\\n</pull_requests>\\n\\n<examples>\\nGood: pytest /foo/bar/tests\\nBad: cd /foo/bar && pytest tests\\n</examples>\\n\",\"parameters\":{\"properties\":{\"command\":{\"description\":\"The command to execute\",\"type\":\"string\"},\"description\":{\"description\":\"A brief description of what the command does\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in milliseconds (max 600000)\",\"type\":\"integer\"}},\"required\":[\"command\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"download\",\"strict\":false,\"description\":\"Downloads binary data from URL and saves to local file.\\n\\n<usage>\\n- Provide URL to download from\\n- Specify local file path where content should be saved\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Downloads any file type (binary or text)\\n- Auto-creates parent directories if missing\\n- Handles large files efficiently with streaming\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max file size: 100MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Will overwrite existing files without warning\\n</limitations>\\n\\n<tips>\\n- Use absolute paths or paths relative to working directory\\n- Set appropriate timeouts for large files or slow connections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The local file path where the downloaded content should be saved\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 600)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to download from\",\"type\":\"string\"}},\"required\":[\"url\",\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"edit\",\"strict\":false,\"description\":\"Edits files by replacing text, creating new files, or deleting content. For moving/renaming use Bash 'mv'. For large edits use Write tool.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. For new files: Use LS tool to verify parent directory exists\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. old_string: Text to replace (must match exactly including whitespace/indentation)\\n3. new_string: Replacement text\\n4. replace_all: Replace all occurrences (default false)\\n</parameters>\\n\\n<special_cases>\\n- Create file: provide file_path + new_string, leave old_string empty\\n- Delete content: provide file_path + old_string, leave new_string empty\\n</special_cases>\\n\\n<critical_requirements>\\nUNIQUENESS (when replace_all=false): old_string MUST uniquely identify target instance\\n\\n- Include 3-5 lines context BEFORE and AFTER change point\\n- Include exact whitespace, indentation, surrounding code\\n\\nSINGLE INSTANCE: Tool changes ONE instance when replace_all=false\\n\\n- For multiple instances: set replace_all=true OR make separate calls with unique context\\n- Plan calls carefully to avoid conflicts\\n\\nVERIFICATION: Before using\\n\\n- Check how many instances of target text exist\\n- Gather sufficient context for unique identification\\n- Plan separate calls or use replace_all\\n</critical_requirements>\\n\\n<warnings>\\nTool fails if:\\n- old_string matches multiple locations and replace_all=false\\n- old_string doesn't match exactly (including whitespace)\\n- Insufficient context causes wrong instance change\\n</warnings>\\n\\n<best_practices>\\n- Ensure edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use forward slashes (/) for cross-platform compatibility\\n- Multiple edits to same file: send all in single message with multiple tool calls\\n</best_practices>\\n\\n<windows_notes>\\n- Forward slashes work throughout (C:/path/file)\\n- File permissions handled automatically\\n- Line endings converted automatically (\\\\n ↔ \\\\r\\\\n)\\n</windows_notes>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"},\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false)\",\"type\":\"boolean\"}},\"required\":[\"file_path\",\"old_string\",\"new_string\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiedit\",\"strict\":false,\"description\":\"Makes multiple edits to a single file in one operation. Built on Edit tool for efficient multiple find-and-replace operations. Prefer over Edit tool for multiple edits to same file.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. Verify directory path is correct\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. edits: Array of edit operations, each containing:\\n   - old_string: Text to replace (must match exactly including whitespace/indentation)\\n   - new_string: Replacement text\\n   - replace_all: Replace all occurrences (optional, defaults to false)\\n</parameters>\\n\\n<operation>\\n- Edits applied sequentially in provided order\\n- Each edit operates on result of previous edit\\n- All edits must be valid for operation to succeed - if any fails, none applied\\n- Ideal for several changes to different parts of same file\\n</operation>\\n\\n<critical_requirements>\\n1. All edits follow same requirements as single Edit tool\\n2. Edits are atomic - either all succeed or none applied\\n3. Plan edits carefully to avoid conflicts between sequential operations\\n</critical_requirements>\\n\\n<warnings>\\n- Tool fails if old_string doesn't match file contents exactly (including whitespace)\\n- Tool fails if old_string and new_string are identical\\n- Earlier edits may affect text that later edits try to find - plan sequence carefully\\n</warnings>\\n\\n<best_practices>\\n- Ensure all edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use replace_all for renaming variables across file\\n- Avoid adding emojis unless user explicitly requests\\n</best_practices>\\n\\n<new_file_creation>\\n- Provide new file path (including directory if needed)\\n- First edit: empty old_string, new file contents as new_string\\n- Subsequent edits: normal edit operations on created content\\n</new_file_creation>\\n\",\"parameters\":{\"properties\":{\"edits\":{\"description\":\"Array of edit operations to perform sequentially on the file\",\"items\":{\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false).\",\"type\":\"boolean\"}},\"type\":\"array\"},\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"}},\"required\":[\"file_path\",\"edits\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"fetch\",\"strict\":false,\"description\":\"Fetches content from URL and returns it in specified format.\\n\\n<usage>\\n- Provide URL to fetch content from\\n- Specify desired output format (text, markdown, or html)\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Supports three output formats: text, markdown, html\\n- Auto-handles HTTP redirects\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max response size: 5MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n</limitations>\\n\\n<tips>\\n- Use text format for plain text content or simple API responses\\n- Use markdown format for content that should be rendered with formatting\\n- Use html format when you need raw HTML structure\\n- Set appropriate timeouts for potentially slow websites\\n</tips>\\n\",\"parameters\":{\"properties\":{\"format\":{\"description\":\"The format to return the content in (text, markdown, or html)\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to fetch content from\",\"type\":\"string\"}},\"required\":[\"url\",\"format\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"glob\",\"strict\":false,\"description\":\"Fast file pattern matching tool that finds files by name/pattern, returning paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide glob pattern to match against file paths\\n- Optional starting directory (defaults to current working directory)\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<pattern_syntax>\\n- '\\\\*' matches any sequence of non-separator characters\\n- '\\\\*\\\\*' matches any sequence including separators\\n- '?' matches any single non-separator character\\n- '[...]' matches any character in brackets\\n- '[!...]' matches any character not in brackets\\n</pattern_syntax>\\n\\n<examples>\\n- '*.js' - JavaScript files in current directory\\n- '**/*.js' - JavaScript files in any subdirectory\\n- 'src/**/*.{ts,tsx}' - TypeScript files in src directory\\n- '*.{html,css,js}' - HTML, CSS, and JS files\\n</examples>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Does not search file contents (use Grep for that)\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<cross_platform>\\n- Path separators handled automatically (/ and \\\\ work)\\n- Uses ripgrep (rg) if available, otherwise Go implementation\\n- Patterns should use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Combine with Grep: find files with Glob, search contents with Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine pattern if needed\\n</tips>\\n\",\"parameters\":{\"properties\":{\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The glob pattern to match files against\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"grep\",\"strict\":false,\"description\":\"Fast content search tool that finds files containing specific text/patterns, returning matching paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide regex pattern to search within file contents\\n- Set literal_text=true for exact text with special characters (recommended for non-regex users)\\n- Optional starting directory (defaults to current working directory)\\n- Optional include pattern to filter which files to search\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<regex_syntax>\\nWhen literal_text=false (supports standard regex):\\n\\n- 'function' searches for literal text \\\"function\\\"\\n- 'log\\\\..\\\\*Error' finds text starting with \\\"log.\\\" and ending with \\\"Error\\\"\\n- 'import\\\\s+.\\\\*\\\\s+from' finds import statements in JavaScript/TypeScript\\n</regex_syntax>\\n\\n<include_patterns>\\n- '\\\\*.js' - Only search JavaScript files\\n- '\\\\*.{ts,tsx}' - Only search TypeScript files\\n- '\\\\*.go' - Only search Go files\\n</include_patterns>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Performance depends on number of files searched\\n- Very large binary files may be skipped\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<ignore_support>\\n- Respects .gitignore patterns to skip ignored files/directories\\n- Respects .crushignore patterns for additional ignore rules\\n- Both ignore files auto-detected in search root directory\\n</ignore_support>\\n\\n<cross_platform>\\n- Uses ripgrep (rg) if available for better performance\\n- Falls back to Go implementation if ripgrep unavailable\\n- File paths normalized automatically for compatibility\\n</cross_platform>\\n\\n<tips>\\n- For faster searches: use Glob to find relevant files first, then Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine search pattern if needed\\n- Use literal_text=true for exact text with special characters (dots, parentheses, etc.)\\n</tips>\\n\",\"parameters\":{\"properties\":{\"include\":{\"description\":\"File pattern to include in the search (e.g. \\\"*.js\\\", \\\"*.{ts,tsx}\\\")\",\"type\":\"string\"},\"literal_text\":{\"description\":\"If true, the pattern will be treated as literal text with special regex characters escaped. Default is false.\",\"type\":\"boolean\"},\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The regex pattern to search for in file contents\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"ls\",\"strict\":false,\"description\":\"Shows files and subdirectories in tree structure for exploring project organization.\\n\\n<usage>\\n- Provide path to list (defaults to current working directory)\\n- Optional glob patterns to ignore\\n- Results displayed in tree structure\\n</usage>\\n\\n<features>\\n- Hierarchical view of files and directories\\n- Auto-skips hidden files/directories (starting with '.')\\n- Skips common system directories like __pycache__\\n- Can filter files matching specific patterns\\n</features>\\n\\n<limitations>\\n- Results limited to 1000 files\\n- Large directories truncated\\n- No file sizes or permissions shown\\n- Cannot recursively list all directories in large projects\\n</limitations>\\n\\n<cross_platform>\\n- Hidden file detection uses Unix convention (files starting with '.')\\n- Windows hidden files (with hidden attribute) not auto-skipped\\n- Common Windows directories (System32, Program Files) not in default ignore\\n- Path separators handled automatically (/ and \\\\ work)\\n</cross_platform>\\n\\n<tips>\\n- Use Glob for finding files by name patterns instead of browsing\\n- Use Grep for searching file contents\\n- Combine with other tools for effective exploration\\n</tips>\\n\",\"parameters\":{\"properties\":{\"depth\":{\"description\":\"The maximum depth to traverse\",\"type\":\"integer\"},\"ignore\":{\"description\":\"List of glob patterns to ignore\",\"items\":{},\"type\":\"array\"},\"path\":{\"description\":\"The path to the directory to list (defaults to current working directory)\",\"type\":\"string\"}},\"required\":[],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"sourcegraph\",\"strict\":false,\"description\":\"Search code across public repositories using Sourcegraph's GraphQL API.\\n\\n<usage>\\n- Provide search query using Sourcegraph syntax\\n- Optional result count (default: 10, max: 20)\\n- Optional timeout for request\\n</usage>\\n\\n<basic_syntax>\\n- \\\"fmt.Println\\\" - exact matches\\n- \\\"file:.go fmt.Println\\\" - limit to Go files\\n- \\\"repo:^github\\\\.com/golang/go$ fmt.Println\\\" - specific repos\\n- \\\"lang:go fmt.Println\\\" - limit to Go code\\n- \\\"fmt.Println AND log.Fatal\\\" - combined terms\\n- \\\"fmt\\\\.(Print|Printf|Println)\\\" - regex patterns\\n- \\\"\\\\\\\"exact phrase\\\\\\\"\\\" - exact phrase matching\\n- \\\"-file:test\\\" or \\\"-repo:forks\\\" - exclude matches\\n</basic_syntax>\\n\\n<key_filters>\\nRepository: repo:name, repo:^exact$, repo:org/repo@branch, -repo:exclude, fork:yes, archived:yes, visibility:public\\nFile: file:\\\\.js$, file:internal/, -file:test, file:has.content(text)\\nContent: content:\\\"exact\\\", -content:\\\"unwanted\\\", case:yes\\nType: type:symbol, type:file, type:path, type:diff, type:commit\\nTime: after:\\\"1 month ago\\\", before:\\\"2023-01-01\\\", author:name, message:\\\"fix\\\"\\nResult: select:repo, select:file, select:content, count:100, timeout:30s\\n</key_filters>\\n\\n<examples>\\n- \\\"file:.go context.WithTimeout\\\" - Go code using context.WithTimeout\\n- \\\"lang:typescript useState type:symbol\\\" - TypeScript React useState hooks\\n- \\\"repo:^github\\\\.com/kubernetes/kubernetes$ pod list type:file\\\" - Kubernetes pod files\\n- \\\"file:Dockerfile (alpine OR ubuntu) -content:alpine:latest\\\" - Dockerfiles with base images\\n</examples>\\n\\n<boolean_operators>\\n- \\\"term1 AND term2\\\" - both terms\\n- \\\"term1 OR term2\\\" - either term\\n- \\\"term1 NOT term2\\\" - term1 but not term2\\n- \\\"term1 and (term2 or term3)\\\" - grouping with parentheses\\n</boolean_operators>\\n\\n<limitations>\\n- Only searches public repositories\\n- Rate limits may apply\\n- Complex queries take longer\\n- Max 20 results per query\\n</limitations>\\n\\n<tips>\\n- Use specific file extensions to narrow results\\n- Add repo: filters for targeted searches\\n- Use type:symbol for function/method definitions\\n- Use type:file to find relevant files\\n</tips>\\n\",\"parameters\":{\"properties\":{\"context_window\":{\"description\":\"The context around the match to return (default: 10 lines)\",\"type\":\"integer\"},\"count\":{\"description\":\"Optional number of results to return (default: 10, max: 20)\",\"type\":\"integer\"},\"query\":{\"description\":\"The Sourcegraph search query\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"}},\"required\":[\"query\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"view\",\"strict\":false,\"description\":\"Reads and displays file contents with line numbers for examining code, logs, or text data.\\n\\n<usage>\\n- Provide file path to read\\n- Optional offset: start reading from specific line (0-based)\\n- Optional limit: control lines read (default 2000)\\n- Don't use for directories (use LS tool instead)\\n</usage>\\n\\n<features>\\n- Displays contents with line numbers\\n- Can read from any file position using offset\\n- Handles large files by limiting lines read\\n- Auto-truncates very long lines for display\\n- Suggests similar filenames when file not found\\n</features>\\n\\n<limitations>\\n- Max file size: 250KB\\n- Default limit: 2000 lines\\n- Lines >2000 chars truncated\\n- Cannot display binary files/images (identifies them)\\n</limitations>\\n\\n<cross_platform>\\n- Handles Windows (CRLF) and Unix (LF) line endings\\n- Works with forward slashes (/) and backslashes (\\\\)\\n- Auto-detects text encoding for common formats\\n</cross_platform>\\n\\n<tips>\\n- Use with Glob to find files first\\n- For code exploration: Grep to find relevant files, then View to examine\\n- For large files: use offset parameter for specific sections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The path to the file to read\",\"type\":\"string\"},\"limit\":{\"description\":\"The number of lines to read (defaults to 2000)\",\"type\":\"integer\"},\"offset\":{\"description\":\"The line number to start reading from (0-based)\",\"type\":\"integer\"}},\"required\":[\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"write\",\"strict\":false,\"description\":\"Creates or updates files in filesystem for saving/modifying text content.\\n\\n<usage>\\n- Provide file path to write\\n- Include content to write to file\\n- Tool creates necessary parent directories automatically\\n</usage>\\n\\n<features>\\n- Creates new files or overwrites existing ones\\n- Auto-creates parent directories if missing\\n- Checks if file modified since last read for safety\\n- Avoids unnecessary writes when content unchanged\\n</features>\\n\\n<limitations>\\n- Read file before writing to avoid conflicts\\n- Cannot append (rewrites entire file)\\n</limitations>\\n\\n<cross_platform>\\n- Use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Use View tool first to examine existing files before modifying\\n- Use LS tool to verify location when creating new files\\n- Combine with Glob/Grep to find and modify multiple files\\n- Include descriptive comments when changing existing code\\n</tips>\\n\",\"parameters\":{\"properties\":{\"content\":{\"description\":\"The content to write to the file\",\"type\":\"string\"},\"file_path\":{\"description\":\"The path to the file to write\",\"type\":\"string\"}},\"required\":[\"file_path\",\"content\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}"
482    headers:
483      Accept:
484      - application/json
485      Content-Type:
486      - application/json
487      User-Agent:
488      - OpenAI/Go 2.7.1
489    url: https://api.openai.com/v1/chat/completions
490    method: POST
491  response:
492    proto: HTTP/2.0
493    proto_major: 2
494    proto_minor: 0
495    content_length: -1
496    body: |+
497      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_vHItW07e3DXOzl30Vb0dvwTw","type":"function","function":{"name":"view","arguments":""}}],"refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"yTRbCQBWophK"}
498
499      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"TfsMxpARFFqdZH2"}
500
501      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"file"}}]},"finish_reason":null}],"usage":null,"obfuscation":"aJHPBh6WonVj1Q"}
502
503      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_path"}}]},"finish_reason":null}],"usage":null,"obfuscation":"yzC2ptkmgULjp"}
504
505      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":"}}]},"finish_reason":null}],"usage":null,"obfuscation":"T67CBCbNSBekAqD"}
506
507      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"/"}}]},"finish_reason":null}],"usage":null,"obfuscation":"4BnMT6eNCdLGiPZ"}
508
509      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"tmp"}}]},"finish_reason":null}],"usage":null,"obfuscation":"g1VIevfDmuxdc3F"}
510
511      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/cr"}}]},"finish_reason":null}],"usage":null,"obfuscation":"RUGkoQxiEdaRKpW"}
512
513      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ush"}}]},"finish_reason":null}],"usage":null,"obfuscation":"UByHp5t3DRVURUB"}
514
515      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"2pzgw0vPe8FiN"}
516
517      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/Test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"UZCoiqzI7elKN"}
518
519      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Coder"}}]},"finish_reason":null}],"usage":null,"obfuscation":"qpFFTsutjWPt5"}
520
521      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Agent"}}]},"finish_reason":null}],"usage":null,"obfuscation":"o2NTvHOmFYKUW"}
522
523      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/open"}}]},"finish_reason":null}],"usage":null,"obfuscation":"oE6PaEfNlzy0K"}
524
525      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ai"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
526
527      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-g"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
528
529      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"pt"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
530
531      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-"}}]},"finish_reason":null}],"usage":null,"obfuscation":"B"}
532
533      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"5"}}]},"finish_reason":null}],"usage":null,"obfuscation":"6"}
534
535      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/m"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
536
537      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ult"}}]},"finish_reason":null}],"usage":null,"obfuscation":"7YAFn8bmuETnsFt"}
538
539      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ied"}}]},"finish_reason":null}],"usage":null,"obfuscation":"Rhbh0l8xMmVOEec"}
540
541      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"it"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
542
543      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_tool"}}]},"finish_reason":null}],"usage":null,"obfuscation":"WnR5kBlNQuF1I"}
544
545      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/main"}}]},"finish_reason":null}],"usage":null,"obfuscation":"MboSsiwHdOWwF"}
546
547      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".go"}}]},"finish_reason":null}],"usage":null,"obfuscation":"ChpX1wFQJCWt8Aq"}
548
549      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"finish_reason":null}],"usage":null,"obfuscation":"hbmJQdv6CXQ8sAF"}
550
551      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}],"usage":null,"obfuscation":""}
552
553      data: {"id":"chatcmpl-CTtFTqI2aMmKZG7BJOZ1KkYUlpqAN","object":"chat.completion.chunk","created":1761239923,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":7760,"completion_tokens":37,"total_tokens":7797,"prompt_tokens_details":{"cached_tokens":7552,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"aarq"}
554
555      data: [DONE]
556
557    headers:
558      Content-Type:
559      - text/event-stream; charset=utf-8
560    status: 200 OK
561    code: 200
562    duration: 2.984819958s
563- id: 5
564  request:
565    proto: HTTP/1.1
566    proto_major: 1
567    proto_minor: 1
568    content_length: 36383
569    host: ""
570    body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rules>\\nThese rules override everything else. Follow them strictly:\\n\\n1. **ALWAYS READ BEFORE EDITING**: Never edit a file you haven't read in this conversation (only read files if you did not read them before or they changed)\\n2. **BE AUTONOMOUS**: Don't ask questions - search, read, decide, act\\n3. **TEST AFTER CHANGES**: Run tests immediately after each modification\\n4. **BE CONCISE**: Under 4 lines unless user asks for detail\\n5. **USE EXACT MATCHES**: When editing, match text exactly including whitespace\\n6. **NEVER COMMIT**: Unless user explicitly says \\\"commit\\\"\\n7. **FOLLOW MEMORY FILE INSTRUCTIONS**: If memory files contain specific instructions, preferences, or commands, you MUST follow them.\\n8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so. When adding comments, focus on *why* not *what*. NEVER communicate with the user through code comments.\\n9. **SECURITY FIRST**: Only assist with defensive security tasks. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.\\n10. **NO URL GUESSING**: Never generate or guess URLs unless you are confident they are for helping with programming. Only use URLs provided by the user or found in local files.\\n11. **NEVER PUSH TO REMOTE**: Don't push changes to remote repositories unless explicitly asked by the user.\\n12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.\\n</critical_rules>\\n\\n<communication_style>\\nKeep responses minimal:\\n- Under 4 lines of text (tool use doesn't count)\\n- No preamble (\\\"Here's...\\\", \\\"I'll...\\\")\\n- No postamble (\\\"Let me know...\\\", \\\"Hope this helps...\\\")\\n- One-word answers when possible\\n- No emojis ever\\n- No explanations unless user asks\\n\\nExamples:\\nuser: what is 2+2?\\nassistant: 4\\n\\nuser: list files in src/\\nassistant: [uses ls tool]\\nfoo.c, bar.c, baz.c\\n\\nuser: which file has the foo implementation?\\nassistant: src/foo.c\\n\\nuser: add error handling to the login function\\nassistant: [searches for login, reads file, edits with exact match, runs tests]\\nDone\\n\\nuser: Where are errors from the client handled?\\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.go:712.\\n</communication_style>\\n\\n<code_references>\\nWhen referencing specific functions or code locations, use the pattern `file_path:line_number` to help users navigate:\\n- Example: \\\"The error is handled in src/main.go:45\\\"\\n- Example: \\\"See the implementation in pkg/utils/helper.go:123-145\\\"\\n</code_references>\\n\\n<workflow>\\nFor every task, follow this sequence internally (don't narrate it):\\n\\n**Before acting**:\\n- Search codebase for relevant files\\n- Read files to understand current state\\n- Check memory for stored commands\\n- Identify what needs to change\\n- Use `git log` and `git blame` for additional context when needed\\n\\n**While acting**:\\n- Read entire file before editing it\\n- Use exact text for find/replace (include whitespace)\\n- Make one logical change at a time\\n- After each change: run tests\\n- If tests fail: fix immediately\\n- Keep going until query is completely resolved before yielding to user\\n- For longer tasks, send brief progress updates (under 10 words) at reasonable intervals\\n\\n**Before finishing**:\\n- Run lint/typecheck if in memory\\n- Verify all changes work\\n- Keep response under 4 lines\\n\\n**Key behaviors**:\\n- Use find_references before changing shared code\\n- Follow existing patterns (check similar files)\\n- If stuck, try different approach (don't repeat failures)\\n- Make decisions yourself (search first, don't ask)\\n- Fix problems at root cause, not surface-level patches\\n- Don't fix unrelated bugs or broken tests (mention them in final message if relevant)\\n</workflow>\\n\\n<decision_making>\\n**Make decisions autonomously** - don't ask when you can:\\n- Search to find the answer\\n- Read files to see patterns\\n- Check similar code\\n- Infer from context\\n- Try most likely approach\\n\\n**Only ask user if**:\\n- Truly ambiguous business requirement\\n- Multiple valid approaches with big tradeoffs\\n- Could cause data loss\\n- Exhausted all attempts\\n\\nExamples of autonomous decisions:\\n- File location → search for similar files\\n- Test command → check package.json/memory\\n- Code style → read existing code\\n- Library choice → check what's used\\n- Naming → follow existing names\\n</decision_making>\\n\\n<editing_files>\\nCritical: ALWAYS read files before editing them in this conversation.\\n\\nWhen using edit tools:\\n1. Read the file first\\n2. Find exact text to replace (include indentation/spaces)\\n3. Make replacement unambiguous (enough context)\\n4. Verify edit succeeded\\n5. Run tests\\n\\nEfficiency tips:\\n- Don't re-read files after successful edits (tool will fail if it didn't work)\\n- Same applies for making folders, deleting files, etc.\\n\\nCommon mistakes to avoid:\\n- Editing without reading first\\n- Approximate text matches\\n- Wrong indentation\\n- Not enough context (text appears multiple times)\\n- Not testing after changes\\n</editing_files>\\n\\n<error_handling>\\nWhen errors occur:\\n1. Read complete error message\\n2. Understand root cause\\n3. Try different approach (don't repeat same action)\\n4. Search for similar code that works\\n5. Make targeted fix\\n6. Test to verify\\n\\nCommon errors:\\n- Import/Module → check paths, spelling, what exists\\n- Syntax → check brackets, indentation, typos\\n- Tests fail → read test, see what it expects\\n- File not found → use ls, check exact path\\n</error_handling>\\n\\n<memory_instructions>\\nMemory files store commands, preferences, and codebase info. Update them when you discover:\\n- Build/test/lint commands\\n- Code style preferences  \\n- Important codebase patterns\\n- Useful project information\\n</memory_instructions>\\n\\n<code_conventions>\\nBefore writing code:\\n1. Check if library exists (look at imports, package.json)\\n2. Read similar code for patterns\\n3. Match existing style\\n4. Use same libraries/frameworks\\n5. Follow security best practices (never log secrets)\\n6. Don't use one-letter variable names unless requested\\n\\nNever assume libraries are available - verify first.\\n\\n**Ambition vs. precision**:\\n- New projects → be creative and ambitious with implementation\\n- Existing codebases → be surgical and precise, respect surrounding code\\n- Don't change filenames or variables unnecessarily\\n- Don't add formatters/linters/tests to codebases that don't have them\\n</code_conventions>\\n\\n<testing>\\nAfter significant changes:\\n- Start testing as specific as possible to code changed, then broaden to build confidence\\n- Use self-verification: write unit tests, add output logs, or use debug statements to verify your solutions\\n- Run relevant test suite\\n- If tests fail, fix before continuing\\n- Check memory for test commands\\n- Run lint/typecheck if available (on precise targets when possible)\\n- For formatters: iterate max 3 times to get it right; if still failing, present correct solution and note formatting issue\\n- Suggest adding commands to memory if not found\\n- Don't fix unrelated bugs or test failures (not your responsibility)\\n</testing>\\n\\n<tool_usage>\\n- Search before assuming\\n- Read files before editing\\n- Always use absolute paths for file operations (editing, reading, writing)\\n- Use Agent tool for complex searches\\n- Run tools in parallel when safe (no dependencies)\\n- When making multiple independent bash calls, send them in a single message with multiple tool calls for parallel execution\\n- Summarize tool output for user (they don't see it)\\n\\n<bash_commands>\\nWhen running non-trivial bash commands (especially those that modify the system):\\n- Briefly explain what the command does and why you're running it\\n- This ensures the user understands potentially dangerous operations\\n- Simple read-only commands (ls, cat, etc.) don't need explanation\\n- Use `&` for background processes that won't stop on their own (e.g., `node server.js &`)\\n- Avoid interactive commands - use non-interactive versions (e.g., `npm init -y` not `npm init`)\\n- Combine related commands to save time (e.g., `git status && git diff HEAD && git log -n 3`)\\n</bash_commands>\\n</tool_usage>\\n\\n<proactiveness>\\nBalance autonomy with user intent:\\n- When asked to do something → do it fully (including follow-ups)\\n- When asked how to approach → explain first, don't auto-implement\\n- After completing work → stop, don't explain (unless asked)\\n- Don't surprise user with unexpected actions\\n</proactiveness>\\n\\n<final_answers>\\nAdapt verbosity to match the work completed:\\n\\n**Default (under 4 lines)**:\\n- Simple questions or single-file changes\\n- Casual conversation, greetings, acknowledgements\\n- One-word answers when possible\\n\\n**More detail allowed (up to 10-15 lines)**:\\n- Large multi-file changes that need walkthrough\\n- Complex refactoring where rationale adds value\\n- Tasks where understanding the approach is important\\n- When mentioning unrelated bugs/issues found\\n- Suggesting logical next steps user might want\\n\\n**What to include in verbose answers**:\\n- Brief summary of what was done and why\\n- Key files/functions changed (with `file:line` references)\\n- Any important decisions or tradeoffs made\\n- Next steps or things user should verify\\n- Issues found but not fixed\\n\\n**What to avoid**:\\n- Don't show full file contents unless explicitly asked\\n- Don't explain how to save files or copy code (user has access to your work)\\n- Don't use \\\"Here's what I did\\\" or \\\"Let me know if...\\\" style preambles/postambles\\n- Keep tone direct and factual, like handing off work to a teammate\\n</final_answers>\\n\\n<env>\\nWorking directory: /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\nIs directory a git repo: no\\nPlatform: linux\\nToday's date: 1/1/2025\\n\\n</env>\\n\\n\\n\\n\\n\",\"role\":\"system\"},{\"content\":\"use multiedit to change 'Hello, World!' to 'Hello, Crush!' and add a comment '// Greeting' above the fmt.Println line in main.go\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"function\":{\"arguments\":\"{\\\"path\\\": \\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\\", \\\"depth\\\": 2}\",\"name\":\"ls\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"\\n- /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/\\n  - go.mod\\n  - main.go\\n\",\"tool_call_id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_Mwu60LXuVNgFguQslMsTXsAO\",\"function\":{\"arguments\":\"{\\\"file_path\\\":\\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\"}\",\"name\":\"view\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"<file>\\n     1|package main\\n     2|\\n     3|import \\\"fmt\\\"\\n     4|\\n     5|func main() {\\n     6|\\tfmt.Println(\\\"Hello, World!\\\")\\n     7|}\\n</file>\\n\",\"tool_call_id\":\"call_Mwu60LXuVNgFguQslMsTXsAO\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_MWl21hHnVrtVZUIWH8PfwrWN\",\"function\":{\"arguments\":\"{\\\"file_path\\\":\\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\",\\\"edits\\\":[{\\\"old_string\\\":\\\"\\\\tfmt.Println(\\\\\\\"Hello, World!\\\\\\\")\\\",\\\"new_string\\\":\\\"\\\\tfmt.Println(\\\\\\\"Hello, Crush!\\\\\\\")\\\"},{\\\"old_string\\\":\\\"\\\\tfmt.Println(\\\\\\\"Hello, Crush!\\\\\\\")\\\",\\\"new_string\\\":\\\"\\\\t// Greeting\\\\n\\\\tfmt.Println(\\\\\\\"Hello, Crush!\\\\\\\")\\\"}]}\",\"name\":\"multiedit\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"<result>\\nApplied 2 edits to file: /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\n</result>\\n\",\"tool_call_id\":\"call_MWl21hHnVrtVZUIWH8PfwrWN\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_vHItW07e3DXOzl30Vb0dvwTw\",\"function\":{\"arguments\":\"{\\\"file_path\\\":\\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\"}\",\"name\":\"view\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"<file>\\n     1|package main\\n     2|\\n     3|import \\\"fmt\\\"\\n     4|\\n     5|func main() {\\n     6|\\t// Greeting\\n     7|\\tfmt.Println(\\\"Hello, Crush!\\\")\\n     8|}\\n</file>\\n\",\"tool_call_id\":\"call_vHItW07e3DXOzl30Vb0dvwTw\",\"role\":\"tool\"}],\"model\":\"gpt-5\",\"max_completion_tokens\":10000,\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"bash\",\"strict\":false,\"description\":\"Executes bash commands in persistent shell session with timeout and security measures.\\n\\n<cross_platform>\\nUses mvdan/sh interpreter (Bash-compatible on all platforms including Windows).\\nUse forward slashes for paths: \\\"ls C:/foo/bar\\\" not \\\"ls C:\\\\foo\\\\bar\\\".\\nCommon shell builtins and core utils available on Windows.\\n</cross_platform>\\n\\n<execution_steps>\\n1. Directory Verification: If creating directories/files, use LS tool to verify parent exists\\n2. Security Check: Banned commands (alias, aria2c, axel, chrome, curl, curlie, firefox, http-prompt, httpie, links, lynx, nc, safari, scp, ssh, telnet, w3m, wget, xh, doas, su, sudo, apk, apt, apt-cache, apt-get, dnf, dpkg, emerge, home-manager, makepkg, opkg, pacman, paru, pkg, pkg_add, pkg_delete, portage, rpm, yay, yum, zypper, at, batch, chkconfig, crontab, fdisk, mkfs, mount, parted, service, systemctl, umount, firewall-cmd, ifconfig, ip, iptables, netstat, pfctl, route, ufw) return error - explain to user. Safe read-only commands execute without prompts\\n3. Command Execution: Execute with proper quoting, capture output\\n4. Output Processing: Truncate if exceeds 30000 characters\\n5. Return Result: Include errors, metadata with <cwd></cwd> tags\\n</execution_steps>\\n\\n<usage_notes>\\n- Command required, timeout optional (max 600000ms/10min, default 30min if unspecified)\\n- IMPORTANT: Use Grep/Glob/Agent tools instead of 'find'/'grep'. Use View/LS tools instead of 'cat'/'head'/'tail'/'ls'\\n- Chain with ';' or '&&', avoid newlines except in quoted strings\\n- Shell state persists (env vars, virtual envs, cwd, etc.)\\n- Prefer absolute paths over 'cd' (use 'cd' only if user explicitly requests)\\n</usage_notes>\\n\\n<git_commits>\\nWhen user asks to create git commit:\\n\\n1. Single message with three tool_use blocks (IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - git log (recent commit message style)\\n\\n2. Add relevant untracked files to staging. Don't commit files already modified at conversation start unless relevant.\\n\\n3. Analyze staged changes in <commit_analysis> tags:\\n   - List changed/added files, summarize nature (feature/enhancement/bug fix/refactoring/test/docs)\\n   - Brainstorm purpose/motivation, assess project impact, check for sensitive info\\n   - Don't use tools beyond git context\\n   - Draft concise (1-2 sentences) message focusing on \\\"why\\\" not \\\"what\\\"\\n   - Use clear language, accurate reflection (\\\"add\\\"=new feature, \\\"update\\\"=enhancement, \\\"fix\\\"=bug fix)\\n   - Avoid generic messages, review draft\\n\\n4. Create commit with Crush signature using HEREDOC:\\n   git commit -m \\\"$(cat &lt;&lt;'EOF'\\n   Commit message here.\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   Co-Authored-By: Crush <crush@charm.land>\\n\\n   EOF\\n   )\\\"\\n\\n5. If pre-commit hook fails, retry ONCE. If fails again, hook preventing commit. If succeeds but files modified, MUST amend.\\n\\n6. Run git status to verify.\\n\\nNotes: Use \\\"git commit -am\\\" when possible, don't stage unrelated files, NEVER update config, don't push, no -i flags, no empty commits, return empty response.\\n</git_commits>\\n\\n<pull_requests>\\nUse gh command for ALL GitHub tasks. When user asks to create PR:\\n\\n1. Single message with multiple tool_use blocks (VERY IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - Check if branch tracks remote and is up to date\\n   - git log and 'git diff main...HEAD' (full commit history from main divergence)\\n\\n2. Create new branch if needed\\n3. Commit changes if needed\\n4. Push to remote with -u flag if needed\\n\\n5. Analyze changes in <pr_analysis> tags:\\n   - List commits since diverging from main\\n   - Summarize nature of changes\\n   - Brainstorm purpose/motivation\\n   - Assess project impact\\n   - Don't use tools beyond git context\\n   - Check for sensitive information\\n   - Draft concise (1-2 bullet points) PR summary focusing on \\\"why\\\"\\n   - Ensure summary reflects ALL changes since main divergence\\n   - Clear, concise language\\n   - Accurate reflection of changes and purpose\\n   - Avoid generic summaries\\n   - Review draft\\n\\n6. Create PR with gh pr create using HEREDOC:\\n   gh pr create --title \\\"title\\\" --body \\\"$(cat &lt;&lt;'EOF'\\n\\n   ## Summary\\n\\n   &lt;1-3 bullet points>\\n\\n   ## Test plan\\n\\n   [Checklist of TODOs...]\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   EOF\\n   )\\\"\\n\\nImportant:\\n\\n- Return empty response - user sees gh output\\n- Never update git config\\n</pull_requests>\\n\\n<examples>\\nGood: pytest /foo/bar/tests\\nBad: cd /foo/bar && pytest tests\\n</examples>\\n\",\"parameters\":{\"properties\":{\"command\":{\"description\":\"The command to execute\",\"type\":\"string\"},\"description\":{\"description\":\"A brief description of what the command does\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in milliseconds (max 600000)\",\"type\":\"integer\"}},\"required\":[\"command\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"download\",\"strict\":false,\"description\":\"Downloads binary data from URL and saves to local file.\\n\\n<usage>\\n- Provide URL to download from\\n- Specify local file path where content should be saved\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Downloads any file type (binary or text)\\n- Auto-creates parent directories if missing\\n- Handles large files efficiently with streaming\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max file size: 100MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Will overwrite existing files without warning\\n</limitations>\\n\\n<tips>\\n- Use absolute paths or paths relative to working directory\\n- Set appropriate timeouts for large files or slow connections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The local file path where the downloaded content should be saved\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 600)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to download from\",\"type\":\"string\"}},\"required\":[\"url\",\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"edit\",\"strict\":false,\"description\":\"Edits files by replacing text, creating new files, or deleting content. For moving/renaming use Bash 'mv'. For large edits use Write tool.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. For new files: Use LS tool to verify parent directory exists\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. old_string: Text to replace (must match exactly including whitespace/indentation)\\n3. new_string: Replacement text\\n4. replace_all: Replace all occurrences (default false)\\n</parameters>\\n\\n<special_cases>\\n- Create file: provide file_path + new_string, leave old_string empty\\n- Delete content: provide file_path + old_string, leave new_string empty\\n</special_cases>\\n\\n<critical_requirements>\\nUNIQUENESS (when replace_all=false): old_string MUST uniquely identify target instance\\n\\n- Include 3-5 lines context BEFORE and AFTER change point\\n- Include exact whitespace, indentation, surrounding code\\n\\nSINGLE INSTANCE: Tool changes ONE instance when replace_all=false\\n\\n- For multiple instances: set replace_all=true OR make separate calls with unique context\\n- Plan calls carefully to avoid conflicts\\n\\nVERIFICATION: Before using\\n\\n- Check how many instances of target text exist\\n- Gather sufficient context for unique identification\\n- Plan separate calls or use replace_all\\n</critical_requirements>\\n\\n<warnings>\\nTool fails if:\\n- old_string matches multiple locations and replace_all=false\\n- old_string doesn't match exactly (including whitespace)\\n- Insufficient context causes wrong instance change\\n</warnings>\\n\\n<best_practices>\\n- Ensure edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use forward slashes (/) for cross-platform compatibility\\n- Multiple edits to same file: send all in single message with multiple tool calls\\n</best_practices>\\n\\n<windows_notes>\\n- Forward slashes work throughout (C:/path/file)\\n- File permissions handled automatically\\n- Line endings converted automatically (\\\\n ↔ \\\\r\\\\n)\\n</windows_notes>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"},\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false)\",\"type\":\"boolean\"}},\"required\":[\"file_path\",\"old_string\",\"new_string\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiedit\",\"strict\":false,\"description\":\"Makes multiple edits to a single file in one operation. Built on Edit tool for efficient multiple find-and-replace operations. Prefer over Edit tool for multiple edits to same file.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. Verify directory path is correct\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. edits: Array of edit operations, each containing:\\n   - old_string: Text to replace (must match exactly including whitespace/indentation)\\n   - new_string: Replacement text\\n   - replace_all: Replace all occurrences (optional, defaults to false)\\n</parameters>\\n\\n<operation>\\n- Edits applied sequentially in provided order\\n- Each edit operates on result of previous edit\\n- All edits must be valid for operation to succeed - if any fails, none applied\\n- Ideal for several changes to different parts of same file\\n</operation>\\n\\n<critical_requirements>\\n1. All edits follow same requirements as single Edit tool\\n2. Edits are atomic - either all succeed or none applied\\n3. Plan edits carefully to avoid conflicts between sequential operations\\n</critical_requirements>\\n\\n<warnings>\\n- Tool fails if old_string doesn't match file contents exactly (including whitespace)\\n- Tool fails if old_string and new_string are identical\\n- Earlier edits may affect text that later edits try to find - plan sequence carefully\\n</warnings>\\n\\n<best_practices>\\n- Ensure all edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use replace_all for renaming variables across file\\n- Avoid adding emojis unless user explicitly requests\\n</best_practices>\\n\\n<new_file_creation>\\n- Provide new file path (including directory if needed)\\n- First edit: empty old_string, new file contents as new_string\\n- Subsequent edits: normal edit operations on created content\\n</new_file_creation>\\n\",\"parameters\":{\"properties\":{\"edits\":{\"description\":\"Array of edit operations to perform sequentially on the file\",\"items\":{\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false).\",\"type\":\"boolean\"}},\"type\":\"array\"},\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"}},\"required\":[\"file_path\",\"edits\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"fetch\",\"strict\":false,\"description\":\"Fetches content from URL and returns it in specified format.\\n\\n<usage>\\n- Provide URL to fetch content from\\n- Specify desired output format (text, markdown, or html)\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Supports three output formats: text, markdown, html\\n- Auto-handles HTTP redirects\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max response size: 5MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n</limitations>\\n\\n<tips>\\n- Use text format for plain text content or simple API responses\\n- Use markdown format for content that should be rendered with formatting\\n- Use html format when you need raw HTML structure\\n- Set appropriate timeouts for potentially slow websites\\n</tips>\\n\",\"parameters\":{\"properties\":{\"format\":{\"description\":\"The format to return the content in (text, markdown, or html)\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to fetch content from\",\"type\":\"string\"}},\"required\":[\"url\",\"format\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"glob\",\"strict\":false,\"description\":\"Fast file pattern matching tool that finds files by name/pattern, returning paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide glob pattern to match against file paths\\n- Optional starting directory (defaults to current working directory)\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<pattern_syntax>\\n- '\\\\*' matches any sequence of non-separator characters\\n- '\\\\*\\\\*' matches any sequence including separators\\n- '?' matches any single non-separator character\\n- '[...]' matches any character in brackets\\n- '[!...]' matches any character not in brackets\\n</pattern_syntax>\\n\\n<examples>\\n- '*.js' - JavaScript files in current directory\\n- '**/*.js' - JavaScript files in any subdirectory\\n- 'src/**/*.{ts,tsx}' - TypeScript files in src directory\\n- '*.{html,css,js}' - HTML, CSS, and JS files\\n</examples>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Does not search file contents (use Grep for that)\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<cross_platform>\\n- Path separators handled automatically (/ and \\\\ work)\\n- Uses ripgrep (rg) if available, otherwise Go implementation\\n- Patterns should use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Combine with Grep: find files with Glob, search contents with Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine pattern if needed\\n</tips>\\n\",\"parameters\":{\"properties\":{\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The glob pattern to match files against\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"grep\",\"strict\":false,\"description\":\"Fast content search tool that finds files containing specific text/patterns, returning matching paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide regex pattern to search within file contents\\n- Set literal_text=true for exact text with special characters (recommended for non-regex users)\\n- Optional starting directory (defaults to current working directory)\\n- Optional include pattern to filter which files to search\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<regex_syntax>\\nWhen literal_text=false (supports standard regex):\\n\\n- 'function' searches for literal text \\\"function\\\"\\n- 'log\\\\..\\\\*Error' finds text starting with \\\"log.\\\" and ending with \\\"Error\\\"\\n- 'import\\\\s+.\\\\*\\\\s+from' finds import statements in JavaScript/TypeScript\\n</regex_syntax>\\n\\n<include_patterns>\\n- '\\\\*.js' - Only search JavaScript files\\n- '\\\\*.{ts,tsx}' - Only search TypeScript files\\n- '\\\\*.go' - Only search Go files\\n</include_patterns>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Performance depends on number of files searched\\n- Very large binary files may be skipped\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<ignore_support>\\n- Respects .gitignore patterns to skip ignored files/directories\\n- Respects .crushignore patterns for additional ignore rules\\n- Both ignore files auto-detected in search root directory\\n</ignore_support>\\n\\n<cross_platform>\\n- Uses ripgrep (rg) if available for better performance\\n- Falls back to Go implementation if ripgrep unavailable\\n- File paths normalized automatically for compatibility\\n</cross_platform>\\n\\n<tips>\\n- For faster searches: use Glob to find relevant files first, then Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine search pattern if needed\\n- Use literal_text=true for exact text with special characters (dots, parentheses, etc.)\\n</tips>\\n\",\"parameters\":{\"properties\":{\"include\":{\"description\":\"File pattern to include in the search (e.g. \\\"*.js\\\", \\\"*.{ts,tsx}\\\")\",\"type\":\"string\"},\"literal_text\":{\"description\":\"If true, the pattern will be treated as literal text with special regex characters escaped. Default is false.\",\"type\":\"boolean\"},\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The regex pattern to search for in file contents\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"ls\",\"strict\":false,\"description\":\"Shows files and subdirectories in tree structure for exploring project organization.\\n\\n<usage>\\n- Provide path to list (defaults to current working directory)\\n- Optional glob patterns to ignore\\n- Results displayed in tree structure\\n</usage>\\n\\n<features>\\n- Hierarchical view of files and directories\\n- Auto-skips hidden files/directories (starting with '.')\\n- Skips common system directories like __pycache__\\n- Can filter files matching specific patterns\\n</features>\\n\\n<limitations>\\n- Results limited to 1000 files\\n- Large directories truncated\\n- No file sizes or permissions shown\\n- Cannot recursively list all directories in large projects\\n</limitations>\\n\\n<cross_platform>\\n- Hidden file detection uses Unix convention (files starting with '.')\\n- Windows hidden files (with hidden attribute) not auto-skipped\\n- Common Windows directories (System32, Program Files) not in default ignore\\n- Path separators handled automatically (/ and \\\\ work)\\n</cross_platform>\\n\\n<tips>\\n- Use Glob for finding files by name patterns instead of browsing\\n- Use Grep for searching file contents\\n- Combine with other tools for effective exploration\\n</tips>\\n\",\"parameters\":{\"properties\":{\"depth\":{\"description\":\"The maximum depth to traverse\",\"type\":\"integer\"},\"ignore\":{\"description\":\"List of glob patterns to ignore\",\"items\":{},\"type\":\"array\"},\"path\":{\"description\":\"The path to the directory to list (defaults to current working directory)\",\"type\":\"string\"}},\"required\":[],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"sourcegraph\",\"strict\":false,\"description\":\"Search code across public repositories using Sourcegraph's GraphQL API.\\n\\n<usage>\\n- Provide search query using Sourcegraph syntax\\n- Optional result count (default: 10, max: 20)\\n- Optional timeout for request\\n</usage>\\n\\n<basic_syntax>\\n- \\\"fmt.Println\\\" - exact matches\\n- \\\"file:.go fmt.Println\\\" - limit to Go files\\n- \\\"repo:^github\\\\.com/golang/go$ fmt.Println\\\" - specific repos\\n- \\\"lang:go fmt.Println\\\" - limit to Go code\\n- \\\"fmt.Println AND log.Fatal\\\" - combined terms\\n- \\\"fmt\\\\.(Print|Printf|Println)\\\" - regex patterns\\n- \\\"\\\\\\\"exact phrase\\\\\\\"\\\" - exact phrase matching\\n- \\\"-file:test\\\" or \\\"-repo:forks\\\" - exclude matches\\n</basic_syntax>\\n\\n<key_filters>\\nRepository: repo:name, repo:^exact$, repo:org/repo@branch, -repo:exclude, fork:yes, archived:yes, visibility:public\\nFile: file:\\\\.js$, file:internal/, -file:test, file:has.content(text)\\nContent: content:\\\"exact\\\", -content:\\\"unwanted\\\", case:yes\\nType: type:symbol, type:file, type:path, type:diff, type:commit\\nTime: after:\\\"1 month ago\\\", before:\\\"2023-01-01\\\", author:name, message:\\\"fix\\\"\\nResult: select:repo, select:file, select:content, count:100, timeout:30s\\n</key_filters>\\n\\n<examples>\\n- \\\"file:.go context.WithTimeout\\\" - Go code using context.WithTimeout\\n- \\\"lang:typescript useState type:symbol\\\" - TypeScript React useState hooks\\n- \\\"repo:^github\\\\.com/kubernetes/kubernetes$ pod list type:file\\\" - Kubernetes pod files\\n- \\\"file:Dockerfile (alpine OR ubuntu) -content:alpine:latest\\\" - Dockerfiles with base images\\n</examples>\\n\\n<boolean_operators>\\n- \\\"term1 AND term2\\\" - both terms\\n- \\\"term1 OR term2\\\" - either term\\n- \\\"term1 NOT term2\\\" - term1 but not term2\\n- \\\"term1 and (term2 or term3)\\\" - grouping with parentheses\\n</boolean_operators>\\n\\n<limitations>\\n- Only searches public repositories\\n- Rate limits may apply\\n- Complex queries take longer\\n- Max 20 results per query\\n</limitations>\\n\\n<tips>\\n- Use specific file extensions to narrow results\\n- Add repo: filters for targeted searches\\n- Use type:symbol for function/method definitions\\n- Use type:file to find relevant files\\n</tips>\\n\",\"parameters\":{\"properties\":{\"context_window\":{\"description\":\"The context around the match to return (default: 10 lines)\",\"type\":\"integer\"},\"count\":{\"description\":\"Optional number of results to return (default: 10, max: 20)\",\"type\":\"integer\"},\"query\":{\"description\":\"The Sourcegraph search query\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"}},\"required\":[\"query\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"view\",\"strict\":false,\"description\":\"Reads and displays file contents with line numbers for examining code, logs, or text data.\\n\\n<usage>\\n- Provide file path to read\\n- Optional offset: start reading from specific line (0-based)\\n- Optional limit: control lines read (default 2000)\\n- Don't use for directories (use LS tool instead)\\n</usage>\\n\\n<features>\\n- Displays contents with line numbers\\n- Can read from any file position using offset\\n- Handles large files by limiting lines read\\n- Auto-truncates very long lines for display\\n- Suggests similar filenames when file not found\\n</features>\\n\\n<limitations>\\n- Max file size: 250KB\\n- Default limit: 2000 lines\\n- Lines >2000 chars truncated\\n- Cannot display binary files/images (identifies them)\\n</limitations>\\n\\n<cross_platform>\\n- Handles Windows (CRLF) and Unix (LF) line endings\\n- Works with forward slashes (/) and backslashes (\\\\)\\n- Auto-detects text encoding for common formats\\n</cross_platform>\\n\\n<tips>\\n- Use with Glob to find files first\\n- For code exploration: Grep to find relevant files, then View to examine\\n- For large files: use offset parameter for specific sections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The path to the file to read\",\"type\":\"string\"},\"limit\":{\"description\":\"The number of lines to read (defaults to 2000)\",\"type\":\"integer\"},\"offset\":{\"description\":\"The line number to start reading from (0-based)\",\"type\":\"integer\"}},\"required\":[\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"write\",\"strict\":false,\"description\":\"Creates or updates files in filesystem for saving/modifying text content.\\n\\n<usage>\\n- Provide file path to write\\n- Include content to write to file\\n- Tool creates necessary parent directories automatically\\n</usage>\\n\\n<features>\\n- Creates new files or overwrites existing ones\\n- Auto-creates parent directories if missing\\n- Checks if file modified since last read for safety\\n- Avoids unnecessary writes when content unchanged\\n</features>\\n\\n<limitations>\\n- Read file before writing to avoid conflicts\\n- Cannot append (rewrites entire file)\\n</limitations>\\n\\n<cross_platform>\\n- Use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Use View tool first to examine existing files before modifying\\n- Use LS tool to verify location when creating new files\\n- Combine with Glob/Grep to find and modify multiple files\\n- Include descriptive comments when changing existing code\\n</tips>\\n\",\"parameters\":{\"properties\":{\"content\":{\"description\":\"The content to write to the file\",\"type\":\"string\"},\"file_path\":{\"description\":\"The path to the file to write\",\"type\":\"string\"}},\"required\":[\"file_path\",\"content\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}"
571    headers:
572      Accept:
573      - application/json
574      Content-Type:
575      - application/json
576      User-Agent:
577      - OpenAI/Go 2.7.1
578    url: https://api.openai.com/v1/chat/completions
579    method: POST
580  response:
581    proto: HTTP/2.0
582    proto_major: 2
583    proto_minor: 0
584    content_length: -1
585    body: |+
586      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_jtJHnjhqcBOyGqvB7a4MSPjl","type":"function","function":{"name":"bash","arguments":""}}],"refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"q84CUsyqqalq"}
587
588      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"qPLUtco42Al2RMv"}
589
590      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"command"}}]},"finish_reason":null}],"usage":null,"obfuscation":"DOAWikIsJxr"}
591
592      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"Wzgp44Zemqcrx"}
593
594      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"go"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
595
596      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" run"}}]},"finish_reason":null}],"usage":null,"obfuscation":"vy44yahjdE2vcw"}
597
598      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" /"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
599
600      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"tmp"}}]},"finish_reason":null}],"usage":null,"obfuscation":"fHdPe0AiSXh76fc"}
601
602      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/cr"}}]},"finish_reason":null}],"usage":null,"obfuscation":"6fxiRfw8I0uL7nr"}
603
604      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ush"}}]},"finish_reason":null}],"usage":null,"obfuscation":"r0IU42obg6Wcafc"}
605
606      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"m4gUD9bzjtXkh"}
607
608      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/Test"}}]},"finish_reason":null}],"usage":null,"obfuscation":"ls7tmFe7hMkte"}
609
610      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Coder"}}]},"finish_reason":null}],"usage":null,"obfuscation":"T4MA7b2yXbAs2"}
611
612      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Agent"}}]},"finish_reason":null}],"usage":null,"obfuscation":"OpUltWz6r0fnT"}
613
614      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/open"}}]},"finish_reason":null}],"usage":null,"obfuscation":"qn41LRpwAgV0T"}
615
616      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ai"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
617
618      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-g"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
619
620      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"pt"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
621
622      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"-"}}]},"finish_reason":null}],"usage":null,"obfuscation":"x"}
623
624      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"5"}}]},"finish_reason":null}],"usage":null,"obfuscation":"U"}
625
626      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/m"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
627
628      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ult"}}]},"finish_reason":null}],"usage":null,"obfuscation":"P9ZAIyaNMvIS62s"}
629
630      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ied"}}]},"finish_reason":null}],"usage":null,"obfuscation":"m08YH0Odpws994M"}
631
632      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"it"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
633
634      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"_tool"}}]},"finish_reason":null}],"usage":null,"obfuscation":"BkGN9UAjwRyTm"}
635
636      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"/main"}}]},"finish_reason":null}],"usage":null,"obfuscation":"zG9c4tuPU0fzb"}
637
638      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":".go"}}]},"finish_reason":null}],"usage":null,"obfuscation":"NtwwlXMBFxUVjdz"}
639
640      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\",\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"8ANj9PaQfmrkL"}
641
642      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"description"}}]},"finish_reason":null}],"usage":null,"obfuscation":"LyatVhl"}
643
644      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"4mrCdKAO1ks9n"}
645
646      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Run"}}]},"finish_reason":null}],"usage":null,"obfuscation":"Q55pEAMgNHojLhL"}
647
648      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" the"}}]},"finish_reason":null}],"usage":null,"obfuscation":"b5oo9KuiDInFmf"}
649
650      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Go"}}]},"finish_reason":null}],"usage":null,"obfuscation":"QDElBOdgYp3nxNQ"}
651
652      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" program"}}]},"finish_reason":null}],"usage":null,"obfuscation":"yOgq8MLoHV"}
653
654      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" to"}}]},"finish_reason":null}],"usage":null,"obfuscation":"CTakkG2iZWcHhHf"}
655
656      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" ensure"}}]},"finish_reason":null}],"usage":null,"obfuscation":"m7SZnE0SeBv"}
657
658      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" it"}}]},"finish_reason":null}],"usage":null,"obfuscation":"gDvNmM0Krk792UT"}
659
660      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" builds"}}]},"finish_reason":null}],"usage":null,"obfuscation":"CY0pr7fQAnV"}
661
662      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" and"}}]},"finish_reason":null}],"usage":null,"obfuscation":"aB9XWlYHj7ztuJ"}
663
664      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" outputs"}}]},"finish_reason":null}],"usage":null,"obfuscation":"kDhLXcsFH2"}
665
666      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" the"}}]},"finish_reason":null}],"usage":null,"obfuscation":"8oOZWugsEzeqTo"}
667
668      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" expected"}}]},"finish_reason":null}],"usage":null,"obfuscation":"9EXuhxT3X"}
669
670      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" string"}}]},"finish_reason":null}],"usage":null,"obfuscation":"q42zRcq7odv"}
671
672      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"finish_reason":null}],"usage":null,"obfuscation":"iGsLbE9gDV296qY"}
673
674      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}],"usage":null,"obfuscation":""}
675
676      data: {"id":"chatcmpl-CTtFWepTqZXTkoqUzRsdEZEgyGMyN","object":"chat.completion.chunk","created":1761239926,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":7867,"completion_tokens":55,"total_tokens":7922,"prompt_tokens_details":{"cached_tokens":7680,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"AJPY"}
677
678      data: [DONE]
679
680    headers:
681      Content-Type:
682      - text/event-stream; charset=utf-8
683    status: 200 OK
684    code: 200
685    duration: 1.816222458s
686- id: 6
687  request:
688    proto: HTTP/1.1
689    proto_major: 1
690    proto_minor: 1
691    content_length: 36864
692    host: ""
693    body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rules>\\nThese rules override everything else. Follow them strictly:\\n\\n1. **ALWAYS READ BEFORE EDITING**: Never edit a file you haven't read in this conversation (only read files if you did not read them before or they changed)\\n2. **BE AUTONOMOUS**: Don't ask questions - search, read, decide, act\\n3. **TEST AFTER CHANGES**: Run tests immediately after each modification\\n4. **BE CONCISE**: Under 4 lines unless user asks for detail\\n5. **USE EXACT MATCHES**: When editing, match text exactly including whitespace\\n6. **NEVER COMMIT**: Unless user explicitly says \\\"commit\\\"\\n7. **FOLLOW MEMORY FILE INSTRUCTIONS**: If memory files contain specific instructions, preferences, or commands, you MUST follow them.\\n8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so. When adding comments, focus on *why* not *what*. NEVER communicate with the user through code comments.\\n9. **SECURITY FIRST**: Only assist with defensive security tasks. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.\\n10. **NO URL GUESSING**: Never generate or guess URLs unless you are confident they are for helping with programming. Only use URLs provided by the user or found in local files.\\n11. **NEVER PUSH TO REMOTE**: Don't push changes to remote repositories unless explicitly asked by the user.\\n12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.\\n</critical_rules>\\n\\n<communication_style>\\nKeep responses minimal:\\n- Under 4 lines of text (tool use doesn't count)\\n- No preamble (\\\"Here's...\\\", \\\"I'll...\\\")\\n- No postamble (\\\"Let me know...\\\", \\\"Hope this helps...\\\")\\n- One-word answers when possible\\n- No emojis ever\\n- No explanations unless user asks\\n\\nExamples:\\nuser: what is 2+2?\\nassistant: 4\\n\\nuser: list files in src/\\nassistant: [uses ls tool]\\nfoo.c, bar.c, baz.c\\n\\nuser: which file has the foo implementation?\\nassistant: src/foo.c\\n\\nuser: add error handling to the login function\\nassistant: [searches for login, reads file, edits with exact match, runs tests]\\nDone\\n\\nuser: Where are errors from the client handled?\\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.go:712.\\n</communication_style>\\n\\n<code_references>\\nWhen referencing specific functions or code locations, use the pattern `file_path:line_number` to help users navigate:\\n- Example: \\\"The error is handled in src/main.go:45\\\"\\n- Example: \\\"See the implementation in pkg/utils/helper.go:123-145\\\"\\n</code_references>\\n\\n<workflow>\\nFor every task, follow this sequence internally (don't narrate it):\\n\\n**Before acting**:\\n- Search codebase for relevant files\\n- Read files to understand current state\\n- Check memory for stored commands\\n- Identify what needs to change\\n- Use `git log` and `git blame` for additional context when needed\\n\\n**While acting**:\\n- Read entire file before editing it\\n- Use exact text for find/replace (include whitespace)\\n- Make one logical change at a time\\n- After each change: run tests\\n- If tests fail: fix immediately\\n- Keep going until query is completely resolved before yielding to user\\n- For longer tasks, send brief progress updates (under 10 words) at reasonable intervals\\n\\n**Before finishing**:\\n- Run lint/typecheck if in memory\\n- Verify all changes work\\n- Keep response under 4 lines\\n\\n**Key behaviors**:\\n- Use find_references before changing shared code\\n- Follow existing patterns (check similar files)\\n- If stuck, try different approach (don't repeat failures)\\n- Make decisions yourself (search first, don't ask)\\n- Fix problems at root cause, not surface-level patches\\n- Don't fix unrelated bugs or broken tests (mention them in final message if relevant)\\n</workflow>\\n\\n<decision_making>\\n**Make decisions autonomously** - don't ask when you can:\\n- Search to find the answer\\n- Read files to see patterns\\n- Check similar code\\n- Infer from context\\n- Try most likely approach\\n\\n**Only ask user if**:\\n- Truly ambiguous business requirement\\n- Multiple valid approaches with big tradeoffs\\n- Could cause data loss\\n- Exhausted all attempts\\n\\nExamples of autonomous decisions:\\n- File location → search for similar files\\n- Test command → check package.json/memory\\n- Code style → read existing code\\n- Library choice → check what's used\\n- Naming → follow existing names\\n</decision_making>\\n\\n<editing_files>\\nCritical: ALWAYS read files before editing them in this conversation.\\n\\nWhen using edit tools:\\n1. Read the file first\\n2. Find exact text to replace (include indentation/spaces)\\n3. Make replacement unambiguous (enough context)\\n4. Verify edit succeeded\\n5. Run tests\\n\\nEfficiency tips:\\n- Don't re-read files after successful edits (tool will fail if it didn't work)\\n- Same applies for making folders, deleting files, etc.\\n\\nCommon mistakes to avoid:\\n- Editing without reading first\\n- Approximate text matches\\n- Wrong indentation\\n- Not enough context (text appears multiple times)\\n- Not testing after changes\\n</editing_files>\\n\\n<error_handling>\\nWhen errors occur:\\n1. Read complete error message\\n2. Understand root cause\\n3. Try different approach (don't repeat same action)\\n4. Search for similar code that works\\n5. Make targeted fix\\n6. Test to verify\\n\\nCommon errors:\\n- Import/Module → check paths, spelling, what exists\\n- Syntax → check brackets, indentation, typos\\n- Tests fail → read test, see what it expects\\n- File not found → use ls, check exact path\\n</error_handling>\\n\\n<memory_instructions>\\nMemory files store commands, preferences, and codebase info. Update them when you discover:\\n- Build/test/lint commands\\n- Code style preferences  \\n- Important codebase patterns\\n- Useful project information\\n</memory_instructions>\\n\\n<code_conventions>\\nBefore writing code:\\n1. Check if library exists (look at imports, package.json)\\n2. Read similar code for patterns\\n3. Match existing style\\n4. Use same libraries/frameworks\\n5. Follow security best practices (never log secrets)\\n6. Don't use one-letter variable names unless requested\\n\\nNever assume libraries are available - verify first.\\n\\n**Ambition vs. precision**:\\n- New projects → be creative and ambitious with implementation\\n- Existing codebases → be surgical and precise, respect surrounding code\\n- Don't change filenames or variables unnecessarily\\n- Don't add formatters/linters/tests to codebases that don't have them\\n</code_conventions>\\n\\n<testing>\\nAfter significant changes:\\n- Start testing as specific as possible to code changed, then broaden to build confidence\\n- Use self-verification: write unit tests, add output logs, or use debug statements to verify your solutions\\n- Run relevant test suite\\n- If tests fail, fix before continuing\\n- Check memory for test commands\\n- Run lint/typecheck if available (on precise targets when possible)\\n- For formatters: iterate max 3 times to get it right; if still failing, present correct solution and note formatting issue\\n- Suggest adding commands to memory if not found\\n- Don't fix unrelated bugs or test failures (not your responsibility)\\n</testing>\\n\\n<tool_usage>\\n- Search before assuming\\n- Read files before editing\\n- Always use absolute paths for file operations (editing, reading, writing)\\n- Use Agent tool for complex searches\\n- Run tools in parallel when safe (no dependencies)\\n- When making multiple independent bash calls, send them in a single message with multiple tool calls for parallel execution\\n- Summarize tool output for user (they don't see it)\\n\\n<bash_commands>\\nWhen running non-trivial bash commands (especially those that modify the system):\\n- Briefly explain what the command does and why you're running it\\n- This ensures the user understands potentially dangerous operations\\n- Simple read-only commands (ls, cat, etc.) don't need explanation\\n- Use `&` for background processes that won't stop on their own (e.g., `node server.js &`)\\n- Avoid interactive commands - use non-interactive versions (e.g., `npm init -y` not `npm init`)\\n- Combine related commands to save time (e.g., `git status && git diff HEAD && git log -n 3`)\\n</bash_commands>\\n</tool_usage>\\n\\n<proactiveness>\\nBalance autonomy with user intent:\\n- When asked to do something → do it fully (including follow-ups)\\n- When asked how to approach → explain first, don't auto-implement\\n- After completing work → stop, don't explain (unless asked)\\n- Don't surprise user with unexpected actions\\n</proactiveness>\\n\\n<final_answers>\\nAdapt verbosity to match the work completed:\\n\\n**Default (under 4 lines)**:\\n- Simple questions or single-file changes\\n- Casual conversation, greetings, acknowledgements\\n- One-word answers when possible\\n\\n**More detail allowed (up to 10-15 lines)**:\\n- Large multi-file changes that need walkthrough\\n- Complex refactoring where rationale adds value\\n- Tasks where understanding the approach is important\\n- When mentioning unrelated bugs/issues found\\n- Suggesting logical next steps user might want\\n\\n**What to include in verbose answers**:\\n- Brief summary of what was done and why\\n- Key files/functions changed (with `file:line` references)\\n- Any important decisions or tradeoffs made\\n- Next steps or things user should verify\\n- Issues found but not fixed\\n\\n**What to avoid**:\\n- Don't show full file contents unless explicitly asked\\n- Don't explain how to save files or copy code (user has access to your work)\\n- Don't use \\\"Here's what I did\\\" or \\\"Let me know if...\\\" style preambles/postambles\\n- Keep tone direct and factual, like handing off work to a teammate\\n</final_answers>\\n\\n<env>\\nWorking directory: /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\nIs directory a git repo: no\\nPlatform: linux\\nToday's date: 1/1/2025\\n\\n</env>\\n\\n\\n\\n\\n\",\"role\":\"system\"},{\"content\":\"use multiedit to change 'Hello, World!' to 'Hello, Crush!' and add a comment '// Greeting' above the fmt.Println line in main.go\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"function\":{\"arguments\":\"{\\\"path\\\": \\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool\\\", \\\"depth\\\": 2}\",\"name\":\"ls\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"\\n- /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/\\n  - go.mod\\n  - main.go\\n\",\"tool_call_id\":\"call_xTNBI5klQVkePhk3MPdASmCF\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_Mwu60LXuVNgFguQslMsTXsAO\",\"function\":{\"arguments\":\"{\\\"file_path\\\":\\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\"}\",\"name\":\"view\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"<file>\\n     1|package main\\n     2|\\n     3|import \\\"fmt\\\"\\n     4|\\n     5|func main() {\\n     6|\\tfmt.Println(\\\"Hello, World!\\\")\\n     7|}\\n</file>\\n\",\"tool_call_id\":\"call_Mwu60LXuVNgFguQslMsTXsAO\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_MWl21hHnVrtVZUIWH8PfwrWN\",\"function\":{\"arguments\":\"{\\\"file_path\\\":\\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\",\\\"edits\\\":[{\\\"old_string\\\":\\\"\\\\tfmt.Println(\\\\\\\"Hello, World!\\\\\\\")\\\",\\\"new_string\\\":\\\"\\\\tfmt.Println(\\\\\\\"Hello, Crush!\\\\\\\")\\\"},{\\\"old_string\\\":\\\"\\\\tfmt.Println(\\\\\\\"Hello, Crush!\\\\\\\")\\\",\\\"new_string\\\":\\\"\\\\t// Greeting\\\\n\\\\tfmt.Println(\\\\\\\"Hello, Crush!\\\\\\\")\\\"}]}\",\"name\":\"multiedit\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"<result>\\nApplied 2 edits to file: /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\n</result>\\n\",\"tool_call_id\":\"call_MWl21hHnVrtVZUIWH8PfwrWN\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_vHItW07e3DXOzl30Vb0dvwTw\",\"function\":{\"arguments\":\"{\\\"file_path\\\":\\\"/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\"}\",\"name\":\"view\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"<file>\\n     1|package main\\n     2|\\n     3|import \\\"fmt\\\"\\n     4|\\n     5|func main() {\\n     6|\\t// Greeting\\n     7|\\tfmt.Println(\\\"Hello, Crush!\\\")\\n     8|}\\n</file>\\n\",\"tool_call_id\":\"call_vHItW07e3DXOzl30Vb0dvwTw\",\"role\":\"tool\"},{\"tool_calls\":[{\"id\":\"call_jtJHnjhqcBOyGqvB7a4MSPjl\",\"function\":{\"arguments\":\"{\\\"command\\\":\\\"go run /tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool/main.go\\\",\\\"description\\\":\\\"Run the Go program to ensure it builds and outputs the expected string\\\"}\",\"name\":\"bash\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"Hello, Crush!\\n\\n\\n<cwd>/tmp/crush-test/TestCoderAgent/openai-gpt-5/multiedit_tool</cwd>\",\"tool_call_id\":\"call_jtJHnjhqcBOyGqvB7a4MSPjl\",\"role\":\"tool\"}],\"model\":\"gpt-5\",\"max_completion_tokens\":10000,\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"bash\",\"strict\":false,\"description\":\"Executes bash commands in persistent shell session with timeout and security measures.\\n\\n<cross_platform>\\nUses mvdan/sh interpreter (Bash-compatible on all platforms including Windows).\\nUse forward slashes for paths: \\\"ls C:/foo/bar\\\" not \\\"ls C:\\\\foo\\\\bar\\\".\\nCommon shell builtins and core utils available on Windows.\\n</cross_platform>\\n\\n<execution_steps>\\n1. Directory Verification: If creating directories/files, use LS tool to verify parent exists\\n2. Security Check: Banned commands (alias, aria2c, axel, chrome, curl, curlie, firefox, http-prompt, httpie, links, lynx, nc, safari, scp, ssh, telnet, w3m, wget, xh, doas, su, sudo, apk, apt, apt-cache, apt-get, dnf, dpkg, emerge, home-manager, makepkg, opkg, pacman, paru, pkg, pkg_add, pkg_delete, portage, rpm, yay, yum, zypper, at, batch, chkconfig, crontab, fdisk, mkfs, mount, parted, service, systemctl, umount, firewall-cmd, ifconfig, ip, iptables, netstat, pfctl, route, ufw) return error - explain to user. Safe read-only commands execute without prompts\\n3. Command Execution: Execute with proper quoting, capture output\\n4. Output Processing: Truncate if exceeds 30000 characters\\n5. Return Result: Include errors, metadata with <cwd></cwd> tags\\n</execution_steps>\\n\\n<usage_notes>\\n- Command required, timeout optional (max 600000ms/10min, default 30min if unspecified)\\n- IMPORTANT: Use Grep/Glob/Agent tools instead of 'find'/'grep'. Use View/LS tools instead of 'cat'/'head'/'tail'/'ls'\\n- Chain with ';' or '&&', avoid newlines except in quoted strings\\n- Shell state persists (env vars, virtual envs, cwd, etc.)\\n- Prefer absolute paths over 'cd' (use 'cd' only if user explicitly requests)\\n</usage_notes>\\n\\n<git_commits>\\nWhen user asks to create git commit:\\n\\n1. Single message with three tool_use blocks (IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - git log (recent commit message style)\\n\\n2. Add relevant untracked files to staging. Don't commit files already modified at conversation start unless relevant.\\n\\n3. Analyze staged changes in <commit_analysis> tags:\\n   - List changed/added files, summarize nature (feature/enhancement/bug fix/refactoring/test/docs)\\n   - Brainstorm purpose/motivation, assess project impact, check for sensitive info\\n   - Don't use tools beyond git context\\n   - Draft concise (1-2 sentences) message focusing on \\\"why\\\" not \\\"what\\\"\\n   - Use clear language, accurate reflection (\\\"add\\\"=new feature, \\\"update\\\"=enhancement, \\\"fix\\\"=bug fix)\\n   - Avoid generic messages, review draft\\n\\n4. Create commit with Crush signature using HEREDOC:\\n   git commit -m \\\"$(cat &lt;&lt;'EOF'\\n   Commit message here.\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   Co-Authored-By: Crush <crush@charm.land>\\n\\n   EOF\\n   )\\\"\\n\\n5. If pre-commit hook fails, retry ONCE. If fails again, hook preventing commit. If succeeds but files modified, MUST amend.\\n\\n6. Run git status to verify.\\n\\nNotes: Use \\\"git commit -am\\\" when possible, don't stage unrelated files, NEVER update config, don't push, no -i flags, no empty commits, return empty response.\\n</git_commits>\\n\\n<pull_requests>\\nUse gh command for ALL GitHub tasks. When user asks to create PR:\\n\\n1. Single message with multiple tool_use blocks (VERY IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - Check if branch tracks remote and is up to date\\n   - git log and 'git diff main...HEAD' (full commit history from main divergence)\\n\\n2. Create new branch if needed\\n3. Commit changes if needed\\n4. Push to remote with -u flag if needed\\n\\n5. Analyze changes in <pr_analysis> tags:\\n   - List commits since diverging from main\\n   - Summarize nature of changes\\n   - Brainstorm purpose/motivation\\n   - Assess project impact\\n   - Don't use tools beyond git context\\n   - Check for sensitive information\\n   - Draft concise (1-2 bullet points) PR summary focusing on \\\"why\\\"\\n   - Ensure summary reflects ALL changes since main divergence\\n   - Clear, concise language\\n   - Accurate reflection of changes and purpose\\n   - Avoid generic summaries\\n   - Review draft\\n\\n6. Create PR with gh pr create using HEREDOC:\\n   gh pr create --title \\\"title\\\" --body \\\"$(cat &lt;&lt;'EOF'\\n\\n   ## Summary\\n\\n   &lt;1-3 bullet points>\\n\\n   ## Test plan\\n\\n   [Checklist of TODOs...]\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   EOF\\n   )\\\"\\n\\nImportant:\\n\\n- Return empty response - user sees gh output\\n- Never update git config\\n</pull_requests>\\n\\n<examples>\\nGood: pytest /foo/bar/tests\\nBad: cd /foo/bar && pytest tests\\n</examples>\\n\",\"parameters\":{\"properties\":{\"command\":{\"description\":\"The command to execute\",\"type\":\"string\"},\"description\":{\"description\":\"A brief description of what the command does\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in milliseconds (max 600000)\",\"type\":\"integer\"}},\"required\":[\"command\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"download\",\"strict\":false,\"description\":\"Downloads binary data from URL and saves to local file.\\n\\n<usage>\\n- Provide URL to download from\\n- Specify local file path where content should be saved\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Downloads any file type (binary or text)\\n- Auto-creates parent directories if missing\\n- Handles large files efficiently with streaming\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max file size: 100MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Will overwrite existing files without warning\\n</limitations>\\n\\n<tips>\\n- Use absolute paths or paths relative to working directory\\n- Set appropriate timeouts for large files or slow connections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The local file path where the downloaded content should be saved\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 600)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to download from\",\"type\":\"string\"}},\"required\":[\"url\",\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"edit\",\"strict\":false,\"description\":\"Edits files by replacing text, creating new files, or deleting content. For moving/renaming use Bash 'mv'. For large edits use Write tool.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. For new files: Use LS tool to verify parent directory exists\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. old_string: Text to replace (must match exactly including whitespace/indentation)\\n3. new_string: Replacement text\\n4. replace_all: Replace all occurrences (default false)\\n</parameters>\\n\\n<special_cases>\\n- Create file: provide file_path + new_string, leave old_string empty\\n- Delete content: provide file_path + old_string, leave new_string empty\\n</special_cases>\\n\\n<critical_requirements>\\nUNIQUENESS (when replace_all=false): old_string MUST uniquely identify target instance\\n\\n- Include 3-5 lines context BEFORE and AFTER change point\\n- Include exact whitespace, indentation, surrounding code\\n\\nSINGLE INSTANCE: Tool changes ONE instance when replace_all=false\\n\\n- For multiple instances: set replace_all=true OR make separate calls with unique context\\n- Plan calls carefully to avoid conflicts\\n\\nVERIFICATION: Before using\\n\\n- Check how many instances of target text exist\\n- Gather sufficient context for unique identification\\n- Plan separate calls or use replace_all\\n</critical_requirements>\\n\\n<warnings>\\nTool fails if:\\n- old_string matches multiple locations and replace_all=false\\n- old_string doesn't match exactly (including whitespace)\\n- Insufficient context causes wrong instance change\\n</warnings>\\n\\n<best_practices>\\n- Ensure edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use forward slashes (/) for cross-platform compatibility\\n- Multiple edits to same file: send all in single message with multiple tool calls\\n</best_practices>\\n\\n<windows_notes>\\n- Forward slashes work throughout (C:/path/file)\\n- File permissions handled automatically\\n- Line endings converted automatically (\\\\n ↔ \\\\r\\\\n)\\n</windows_notes>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"},\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false)\",\"type\":\"boolean\"}},\"required\":[\"file_path\",\"old_string\",\"new_string\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiedit\",\"strict\":false,\"description\":\"Makes multiple edits to a single file in one operation. Built on Edit tool for efficient multiple find-and-replace operations. Prefer over Edit tool for multiple edits to same file.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. Verify directory path is correct\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. edits: Array of edit operations, each containing:\\n   - old_string: Text to replace (must match exactly including whitespace/indentation)\\n   - new_string: Replacement text\\n   - replace_all: Replace all occurrences (optional, defaults to false)\\n</parameters>\\n\\n<operation>\\n- Edits applied sequentially in provided order\\n- Each edit operates on result of previous edit\\n- All edits must be valid for operation to succeed - if any fails, none applied\\n- Ideal for several changes to different parts of same file\\n</operation>\\n\\n<critical_requirements>\\n1. All edits follow same requirements as single Edit tool\\n2. Edits are atomic - either all succeed or none applied\\n3. Plan edits carefully to avoid conflicts between sequential operations\\n</critical_requirements>\\n\\n<warnings>\\n- Tool fails if old_string doesn't match file contents exactly (including whitespace)\\n- Tool fails if old_string and new_string are identical\\n- Earlier edits may affect text that later edits try to find - plan sequence carefully\\n</warnings>\\n\\n<best_practices>\\n- Ensure all edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use replace_all for renaming variables across file\\n- Avoid adding emojis unless user explicitly requests\\n</best_practices>\\n\\n<new_file_creation>\\n- Provide new file path (including directory if needed)\\n- First edit: empty old_string, new file contents as new_string\\n- Subsequent edits: normal edit operations on created content\\n</new_file_creation>\\n\",\"parameters\":{\"properties\":{\"edits\":{\"description\":\"Array of edit operations to perform sequentially on the file\",\"items\":{\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false).\",\"type\":\"boolean\"}},\"type\":\"array\"},\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"}},\"required\":[\"file_path\",\"edits\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"fetch\",\"strict\":false,\"description\":\"Fetches content from URL and returns it in specified format.\\n\\n<usage>\\n- Provide URL to fetch content from\\n- Specify desired output format (text, markdown, or html)\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Supports three output formats: text, markdown, html\\n- Auto-handles HTTP redirects\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max response size: 5MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n</limitations>\\n\\n<tips>\\n- Use text format for plain text content or simple API responses\\n- Use markdown format for content that should be rendered with formatting\\n- Use html format when you need raw HTML structure\\n- Set appropriate timeouts for potentially slow websites\\n</tips>\\n\",\"parameters\":{\"properties\":{\"format\":{\"description\":\"The format to return the content in (text, markdown, or html)\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to fetch content from\",\"type\":\"string\"}},\"required\":[\"url\",\"format\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"glob\",\"strict\":false,\"description\":\"Fast file pattern matching tool that finds files by name/pattern, returning paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide glob pattern to match against file paths\\n- Optional starting directory (defaults to current working directory)\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<pattern_syntax>\\n- '\\\\*' matches any sequence of non-separator characters\\n- '\\\\*\\\\*' matches any sequence including separators\\n- '?' matches any single non-separator character\\n- '[...]' matches any character in brackets\\n- '[!...]' matches any character not in brackets\\n</pattern_syntax>\\n\\n<examples>\\n- '*.js' - JavaScript files in current directory\\n- '**/*.js' - JavaScript files in any subdirectory\\n- 'src/**/*.{ts,tsx}' - TypeScript files in src directory\\n- '*.{html,css,js}' - HTML, CSS, and JS files\\n</examples>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Does not search file contents (use Grep for that)\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<cross_platform>\\n- Path separators handled automatically (/ and \\\\ work)\\n- Uses ripgrep (rg) if available, otherwise Go implementation\\n- Patterns should use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Combine with Grep: find files with Glob, search contents with Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine pattern if needed\\n</tips>\\n\",\"parameters\":{\"properties\":{\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The glob pattern to match files against\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"grep\",\"strict\":false,\"description\":\"Fast content search tool that finds files containing specific text/patterns, returning matching paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide regex pattern to search within file contents\\n- Set literal_text=true for exact text with special characters (recommended for non-regex users)\\n- Optional starting directory (defaults to current working directory)\\n- Optional include pattern to filter which files to search\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<regex_syntax>\\nWhen literal_text=false (supports standard regex):\\n\\n- 'function' searches for literal text \\\"function\\\"\\n- 'log\\\\..\\\\*Error' finds text starting with \\\"log.\\\" and ending with \\\"Error\\\"\\n- 'import\\\\s+.\\\\*\\\\s+from' finds import statements in JavaScript/TypeScript\\n</regex_syntax>\\n\\n<include_patterns>\\n- '\\\\*.js' - Only search JavaScript files\\n- '\\\\*.{ts,tsx}' - Only search TypeScript files\\n- '\\\\*.go' - Only search Go files\\n</include_patterns>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Performance depends on number of files searched\\n- Very large binary files may be skipped\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<ignore_support>\\n- Respects .gitignore patterns to skip ignored files/directories\\n- Respects .crushignore patterns for additional ignore rules\\n- Both ignore files auto-detected in search root directory\\n</ignore_support>\\n\\n<cross_platform>\\n- Uses ripgrep (rg) if available for better performance\\n- Falls back to Go implementation if ripgrep unavailable\\n- File paths normalized automatically for compatibility\\n</cross_platform>\\n\\n<tips>\\n- For faster searches: use Glob to find relevant files first, then Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine search pattern if needed\\n- Use literal_text=true for exact text with special characters (dots, parentheses, etc.)\\n</tips>\\n\",\"parameters\":{\"properties\":{\"include\":{\"description\":\"File pattern to include in the search (e.g. \\\"*.js\\\", \\\"*.{ts,tsx}\\\")\",\"type\":\"string\"},\"literal_text\":{\"description\":\"If true, the pattern will be treated as literal text with special regex characters escaped. Default is false.\",\"type\":\"boolean\"},\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The regex pattern to search for in file contents\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"ls\",\"strict\":false,\"description\":\"Shows files and subdirectories in tree structure for exploring project organization.\\n\\n<usage>\\n- Provide path to list (defaults to current working directory)\\n- Optional glob patterns to ignore\\n- Results displayed in tree structure\\n</usage>\\n\\n<features>\\n- Hierarchical view of files and directories\\n- Auto-skips hidden files/directories (starting with '.')\\n- Skips common system directories like __pycache__\\n- Can filter files matching specific patterns\\n</features>\\n\\n<limitations>\\n- Results limited to 1000 files\\n- Large directories truncated\\n- No file sizes or permissions shown\\n- Cannot recursively list all directories in large projects\\n</limitations>\\n\\n<cross_platform>\\n- Hidden file detection uses Unix convention (files starting with '.')\\n- Windows hidden files (with hidden attribute) not auto-skipped\\n- Common Windows directories (System32, Program Files) not in default ignore\\n- Path separators handled automatically (/ and \\\\ work)\\n</cross_platform>\\n\\n<tips>\\n- Use Glob for finding files by name patterns instead of browsing\\n- Use Grep for searching file contents\\n- Combine with other tools for effective exploration\\n</tips>\\n\",\"parameters\":{\"properties\":{\"depth\":{\"description\":\"The maximum depth to traverse\",\"type\":\"integer\"},\"ignore\":{\"description\":\"List of glob patterns to ignore\",\"items\":{},\"type\":\"array\"},\"path\":{\"description\":\"The path to the directory to list (defaults to current working directory)\",\"type\":\"string\"}},\"required\":[],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"sourcegraph\",\"strict\":false,\"description\":\"Search code across public repositories using Sourcegraph's GraphQL API.\\n\\n<usage>\\n- Provide search query using Sourcegraph syntax\\n- Optional result count (default: 10, max: 20)\\n- Optional timeout for request\\n</usage>\\n\\n<basic_syntax>\\n- \\\"fmt.Println\\\" - exact matches\\n- \\\"file:.go fmt.Println\\\" - limit to Go files\\n- \\\"repo:^github\\\\.com/golang/go$ fmt.Println\\\" - specific repos\\n- \\\"lang:go fmt.Println\\\" - limit to Go code\\n- \\\"fmt.Println AND log.Fatal\\\" - combined terms\\n- \\\"fmt\\\\.(Print|Printf|Println)\\\" - regex patterns\\n- \\\"\\\\\\\"exact phrase\\\\\\\"\\\" - exact phrase matching\\n- \\\"-file:test\\\" or \\\"-repo:forks\\\" - exclude matches\\n</basic_syntax>\\n\\n<key_filters>\\nRepository: repo:name, repo:^exact$, repo:org/repo@branch, -repo:exclude, fork:yes, archived:yes, visibility:public\\nFile: file:\\\\.js$, file:internal/, -file:test, file:has.content(text)\\nContent: content:\\\"exact\\\", -content:\\\"unwanted\\\", case:yes\\nType: type:symbol, type:file, type:path, type:diff, type:commit\\nTime: after:\\\"1 month ago\\\", before:\\\"2023-01-01\\\", author:name, message:\\\"fix\\\"\\nResult: select:repo, select:file, select:content, count:100, timeout:30s\\n</key_filters>\\n\\n<examples>\\n- \\\"file:.go context.WithTimeout\\\" - Go code using context.WithTimeout\\n- \\\"lang:typescript useState type:symbol\\\" - TypeScript React useState hooks\\n- \\\"repo:^github\\\\.com/kubernetes/kubernetes$ pod list type:file\\\" - Kubernetes pod files\\n- \\\"file:Dockerfile (alpine OR ubuntu) -content:alpine:latest\\\" - Dockerfiles with base images\\n</examples>\\n\\n<boolean_operators>\\n- \\\"term1 AND term2\\\" - both terms\\n- \\\"term1 OR term2\\\" - either term\\n- \\\"term1 NOT term2\\\" - term1 but not term2\\n- \\\"term1 and (term2 or term3)\\\" - grouping with parentheses\\n</boolean_operators>\\n\\n<limitations>\\n- Only searches public repositories\\n- Rate limits may apply\\n- Complex queries take longer\\n- Max 20 results per query\\n</limitations>\\n\\n<tips>\\n- Use specific file extensions to narrow results\\n- Add repo: filters for targeted searches\\n- Use type:symbol for function/method definitions\\n- Use type:file to find relevant files\\n</tips>\\n\",\"parameters\":{\"properties\":{\"context_window\":{\"description\":\"The context around the match to return (default: 10 lines)\",\"type\":\"integer\"},\"count\":{\"description\":\"Optional number of results to return (default: 10, max: 20)\",\"type\":\"integer\"},\"query\":{\"description\":\"The Sourcegraph search query\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"}},\"required\":[\"query\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"view\",\"strict\":false,\"description\":\"Reads and displays file contents with line numbers for examining code, logs, or text data.\\n\\n<usage>\\n- Provide file path to read\\n- Optional offset: start reading from specific line (0-based)\\n- Optional limit: control lines read (default 2000)\\n- Don't use for directories (use LS tool instead)\\n</usage>\\n\\n<features>\\n- Displays contents with line numbers\\n- Can read from any file position using offset\\n- Handles large files by limiting lines read\\n- Auto-truncates very long lines for display\\n- Suggests similar filenames when file not found\\n</features>\\n\\n<limitations>\\n- Max file size: 250KB\\n- Default limit: 2000 lines\\n- Lines >2000 chars truncated\\n- Cannot display binary files/images (identifies them)\\n</limitations>\\n\\n<cross_platform>\\n- Handles Windows (CRLF) and Unix (LF) line endings\\n- Works with forward slashes (/) and backslashes (\\\\)\\n- Auto-detects text encoding for common formats\\n</cross_platform>\\n\\n<tips>\\n- Use with Glob to find files first\\n- For code exploration: Grep to find relevant files, then View to examine\\n- For large files: use offset parameter for specific sections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The path to the file to read\",\"type\":\"string\"},\"limit\":{\"description\":\"The number of lines to read (defaults to 2000)\",\"type\":\"integer\"},\"offset\":{\"description\":\"The line number to start reading from (0-based)\",\"type\":\"integer\"}},\"required\":[\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"write\",\"strict\":false,\"description\":\"Creates or updates files in filesystem for saving/modifying text content.\\n\\n<usage>\\n- Provide file path to write\\n- Include content to write to file\\n- Tool creates necessary parent directories automatically\\n</usage>\\n\\n<features>\\n- Creates new files or overwrites existing ones\\n- Auto-creates parent directories if missing\\n- Checks if file modified since last read for safety\\n- Avoids unnecessary writes when content unchanged\\n</features>\\n\\n<limitations>\\n- Read file before writing to avoid conflicts\\n- Cannot append (rewrites entire file)\\n</limitations>\\n\\n<cross_platform>\\n- Use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Use View tool first to examine existing files before modifying\\n- Use LS tool to verify location when creating new files\\n- Combine with Glob/Grep to find and modify multiple files\\n- Include descriptive comments when changing existing code\\n</tips>\\n\",\"parameters\":{\"properties\":{\"content\":{\"description\":\"The content to write to the file\",\"type\":\"string\"},\"file_path\":{\"description\":\"The path to the file to write\",\"type\":\"string\"}},\"required\":[\"file_path\",\"content\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}"
694    headers:
695      Accept:
696      - application/json
697      Content-Type:
698      - application/json
699      User-Agent:
700      - OpenAI/Go 2.7.1
701    url: https://api.openai.com/v1/chat/completions
702    method: POST
703  response:
704    proto: HTTP/2.0
705    proto_major: 2
706    proto_minor: 0
707    content_length: -1
708    body: |+
709      data: {"id":"chatcmpl-CTtFYrZspez1IfnbKJi3exo5VeFUi","object":"chat.completion.chunk","created":1761239928,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"LZzxqSj0jh"}
710
711      data: {"id":"chatcmpl-CTtFYrZspez1IfnbKJi3exo5VeFUi","object":"chat.completion.chunk","created":1761239928,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Done"},"finish_reason":null}],"usage":null,"obfuscation":"0eWODxlo"}
712
713      data: {"id":"chatcmpl-CTtFYrZspez1IfnbKJi3exo5VeFUi","object":"chat.completion.chunk","created":1761239928,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":null,"obfuscation":"Z8ZrsK"}
714
715      data: {"id":"chatcmpl-CTtFYrZspez1IfnbKJi3exo5VeFUi","object":"chat.completion.chunk","created":1761239928,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":7960,"completion_tokens":4,"total_tokens":7964,"prompt_tokens_details":{"cached_tokens":7808,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"UzveB"}
716
717      data: [DONE]
718
719    headers:
720      Content-Type:
721      - text/event-stream; charset=utf-8
722    status: 200 OK
723    code: 200
724    duration: 2.576156625s