I am attempting to define a command \ideal that will wrap its argument in bold parentheses.
Here is my attempt: \newcommand{\ideal}[1]{\boldsymbol{\left(\right.} #1 \boldsymbol{\left.\right)}}
This compiles correctly visually (on overleaf) but produces this error:
You need to enclose all mathematical expressions and symbols with special markers. These special markers create a ‘math mode’. Use $...$ for inline math mode, and [...] or one of the mathematical environments (e.g. equation) for display math mode. This applies to symbols such as subscripts ( _ ), integrals ( \int ), Greek letters ( \alpha, \beta, \delta ) and modifiers (\vec{x}, \tilde{x} ).
If I use too many of them in the same document, it will not compile at all.

\boldsymbolis the wrong approach (as well as using\leftand\right), instead you could use something like this:\newcommand\ideal[1]{\textbf{(}#1\textbf{)}}. As it is currently defined the\leftand\rightcalls don't do anything useful anyway\leftand\rightso that the parentheses would resize.\leftand\right. What you're doing is using two empty pairs of\leftand\right. This way it won't resize to anything.