Skip to content

[BUG] Stray tab before "Tool Use Guidelines" in the system prompt #1415

Description

@daewoongoh

Problem (one or two sentences)

The system prompt contains a stray tab character before the "Tool Use Guidelines" sub-section.

Context (who is affected and when)

This affects every user. It's not visible in the UI, but it happens on every request when system.ts builds the system prompt, so a meaningless whitespace token gets sent to the LLM every time.

Reproduction steps

  1. Call SYSTEM_PROMPT() in src/core/prompts/system.ts to generate the system prompt string.
  2. Look at the Tool Use Guidelines sub-section that follows the TOOL USE section.
  3. Compare its indentation with the other sections (markdownFormattingSection(), getCapabilitiesSection(), etc.).

Expected result

# Tool Use Guidelines should start at the beginning of the line with no leading indentation, consistent with the other sections.

Actual result

${getToolUseGuidelinesSection()} is preceded by a tab character, so it renders as \t# Tool Use Guidelines.

Variations tried (optional)

No response

App Version

v3.80.0

API Provider (optional)

None

Model Used (optional)

No response

Zoo Code Task Links (optional)

No response

Relevant logs or errors (optional)

====

TOOL USE

You have access to a set of tools that are executed upon the user's approval. Use the provider-native tool-calling mechanism. Do not include XML markup or examples. You must call at least one tool per assistant response. Prefer calling as many tools as are reasonably needed in a single response to reduce back-and-forth and complete tasks faster.

	# Tool Use Guidelines

1. Assess what information you already have and what information you need to proceed with the task.
2. Choose the most appropriate tool based on the task and the tool descriptions provided. Assess if you need additional information to proceed, and which of the available tools would be most effective for gathering this information. For example using the list_files tool is more effective than running a command like `ls` in the terminal. It's critical that you think about each available tool and use the one that best fits the current step in the task.
3. If multiple actions are needed, you may use multiple tools in a single message when appropriate, or use tools iteratively across messages. Each tool use should be informed by the results of previous tool uses. Do not assume the outcome of any tool use. Each step must be informed by the previous step's result.

By carefully considering the user's response after tool executions, you can react accordingly and make informed decisions about how to proceed with the task. This iterative process helps ensure the overall success and accuracy of your work.

====

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions