Where
starter_ai_agents/openai_research_agent/research_agent.py, lines 82–87.
What
The research_agent's instructions argument uses Python's implicit string-literal concatenation across six lines, but each line is missing the trailing space. Python joins adjacent string literals verbatim, so the string actually shipped to the model contains fused words:
instructions="You are a research assistant. Given a search term, you search the web for that term and"
"produce a concise summary of the results. The summary must 2-3 paragraphs and less than 300"
"words. Capture the main points. Write succintly, no need to have complete sentences or good"
"grammar. This will be consumed by someone synthesizing a report, so its vital you capture the"
"essence and ignore any fluff. Do not include any additional commentary other than the summary"
"itself.",
After Python's concatenation, the string the LLM actually receives contains:
"…for that term andproduce a concise summary…"
"…must 2-3 paragraphs and less than 300words…"
"…complete sentences or goodgrammar…"
"…so its vital you capture theessence and ignore any fluff…"
"…other than the summaryitself."
Every line boundary loses the space. It's not a crash, but it degrades the system prompt on a template used to teach the OpenAI Agents SDK.
Two related minor typos live in the same block (succintly → succinctly, must 2-3 paragraphs → must be 2-3 paragraphs, its vital → it's vital).
Fix
Add the missing trailing spaces (and fix the typos while touching those lines). PR incoming.
Where
starter_ai_agents/openai_research_agent/research_agent.py, lines 82–87.What
The
research_agent'sinstructionsargument uses Python's implicit string-literal concatenation across six lines, but each line is missing the trailing space. Python joins adjacent string literals verbatim, so the string actually shipped to the model contains fused words:After Python's concatenation, the string the LLM actually receives contains:
"…for that term andproducea concise summary…""…must 2-3 paragraphs and less than 300words…""…complete sentences or goodgrammar…""…so its vital you capture theessenceand ignore any fluff…""…other than the summaryitself."Every line boundary loses the space. It's not a crash, but it degrades the system prompt on a template used to teach the OpenAI Agents SDK.
Two related minor typos live in the same block (
succintly→succinctly,must 2-3 paragraphs→must be 2-3 paragraphs,its vital→it's vital).Fix
Add the missing trailing spaces (and fix the typos while touching those lines). PR incoming.