https://linen.dev logo
Can't get Linear tools to work properly on TS Open...
# 🖥│support-forum
e
When headed to traces, it's clear that agent is calling tools with empty args:
Copy code
{
  "callId": "toolu_vrtx_019cputrBMsRPi8nKmGGjS1y",
  "name": "LINEAR_LIST_LINEAR_PROJECTS",
  "type": "function_call",
  "arguments": "",
  "providerData": {
    ...
  },
  "status": "completed"
}
This results in error:
Copy code
ToolCallError: Failed to run function tools: SyntaxError: Unexpected end of JSON input
for other toolkits (i.e. GMAIL) same setup works fine. using aisdk + openrouter on anthropic/claude-sonnet-4
the error is ONLY with the tools that have no params such as: LINEAR_LIST_LINEAR_PROJECTS when calling with empty object: {} - all good when passing an empty string: "" - error could it be provider error?
c
Hey there, could you share your reproducible code snippet along with the SDK version?
e
seems like agents sdk was not handling tools properly, had to make a patch to fix it still, seems like the model itself is returning an "" instead of {} openai models work fine (calls with {}), while anthropic is returning "" in input @openai/agents-extensions@0.1.2 @openai/agents-core@0.1.3 @composio/core@0.1.52 @composio/openai-agents@0.1.52 https://cdn.discordapp.com/attachments/1419079208851996855/1419448099121926144/openai__agents-extensions0.1.2.patch?ex=68d1cb8e&is=68d07a0e&hm=b5d49012666822ff428d37024aa2712735855d472117387a5a0ef5196495f24e&
a
Hey @ertembiyik, could you please share the entire reproducible snippt? This would help in troubleshooting the issue. Thanks
e
yeah sorry, was tired after long debug sessions yesterday will provide an isolated example today
hey! here is an example: replace variables at the top with real values, then run:
Copy code
pnpm i
pnpm run dev
problem seems to be reproducible with anthropic/claude-sonnet-4 also tested with x-ai/grok-4-fast:free and openai/gpt-5 - they behave with no errors https://cdn.discordapp.com/attachments/1419079208851996855/1419597590416330792/agents-bug.zip?ex=68d256c8&is=68d10548&hm=5be9beb905f21d41249aa6b37f08003fc5782e51dcec86a6b8f13b2921e547cd&
the solution is not ideal since for some tools empty string might be a valid input preferably is to look for type of the tool param and infer from it if "" should be mapped to {} or remain a string
found similar issue for ai sdk for version 4: https://github.com/vercel/ai/issues/6687
opened a pr to agents sdk itself for a proper fix: https://github.com/openai/openai-agents-js/pull/499
l
Do you need developer?