<https://github.com/All-Hands-AI/agent-sdk/pull/45...
# proj-sdk
q
https://github.com/All-Hands-AI/agent-sdk/pull/454 - small pr adding llm based security analyzer to default agent this only activates when the confirmation policy is set to be risk based
c
left a comment
q
Ah the confirmation policy is a flag The security analyzer is not a flag, and is separate from the confirmation policy In V1 CLI mid conversation I need to flip the confirmation policy and execute
agent.model_copy(update={"security_analyzer": LLMSecurityAnalyzer})
to confirm high risk actions (because the agent is frozen)
Thoughts on making the agent class not frozen?
c
yeah, i know.. instead of making agent class not frozen, i'd actually consider allow user to set confirmation mode at the begining of a convo? 🤔
i think the annoying part is that, when you add security analzyer, you spend additional tokens predicting it, despite the fact that you might not be using it
i.e., waste token
Maybe this could be a @elegant-branch-54423 decision - Codex allows you to set
/approvals
at the begining..
q
Ah that seems wasteful is there a reason we don't disable the analyzers if the confirmation policy isn't set to risk based?
c
is there a reason we don't disable the analyzers if the confirmation policy isn't set to risk based?
only reason is because confirmation policy was defined at the state-level, not agent level 😞
👍 1
q
/approvals
can also be execute mid conversation. it means as the client I still need to call
agent.model_copy(update={"security_analyzer": LLMSecurityAnalyzer})
c
and i do see if people want to do
openhands-cli -p --always-allow
or
openhands-cli -p --stop-at-high-risk
nod 1
hmm and when that happens, we change the agent, and that updates the system prompt... and break all the prompt caching..
nod 1
anyway i think we can deal with the waste here 😞
if we try to get rid of this waste AND support switching confirmation mode in the middle of the convo, we'd need to pay for invalidated cache
e
The Security Analyzer seems important for CLI use cases since the CLI defaults to executing commands locally on your filesystem, rather than a docker container. IN terms of it being default on or off....
c
so i think product problem here is: whether we want to support switching confirmation mode on the fly
e
I see that Codex lets you change
/approvals
mid-convo, which seems like the ideal.... maybe it's default ON, but mid-convo you can turn it off?
c
yeah... seems so
yeah it is definietly flexible this way
Let's merge the PR as is then
we can probably live with a little waste here
👍 1
🍰 on PR then @quick-window-91705
ty 1