Issue details
With a custom openai-chat-completions connection to DeepSeek (deepseek-v4-flash, thinking mode) and the default auto permission mode, shell commands are sometimes held with:
{"error":{"type":"tool_review_held","tool_name":"shell","message":"Safety reviewer unavailable; action held","reason":"review_unavailable","review_cause":"transport_permanent",...}}The review request itself fails with HTTP 400 from DeepSeek:
The `reasoning_content` in the thinking mode must be passed back to the API.The review request is built from the pending assistant tool call (build_review in src/gateway/chat_completions.zig). In the captured requests that assistant message never has reasoning_content, while the main-loop requests in the same session do replay it. DeepSeek doesn't reject every such request, but when it does, the command the user asked for doesn't run.
Environment: fx v0.0.14 (build_review unchanged on current main), Linux, fx acp, custom connection with "protocol": "openai-chat-completions", base_url DeepSeek, model deepseek-v4-flash.
Steps to reproduce
- Configure the connection above and leave
permission_modeat the default. - Ask something that makes the model think before running a shell command, e.g. give it a setup command to run and then ask it to run the tests.
- Some runs: the review call returns 400 and the shell call fails with
review_unavailable.
Seen in 4 of 18 runs across a few prompts. All 38 review requests we captured were missing reasoning_content, whether they got 400 or 200.
Trace
Not attached (captured from network logs, not /trace).
Sensitive information
- I reviewed the information above and removed secrets and other sensitive data.
Activity
0No activity yet.