How AI agents decide, mapped from their code
Each map reads one agent's repository at one commit. It shows what the agent decides by itself, when it asks you, and problems the map found. None of this is a score, and none of it changes a tool's rank here.
Make a map of an agent you work on · Compare coding agents →
What it decides by itself, and when it asks you
Mapped from the code in OpenHands/software-agent-sdk.
On its default settings, the software that runs the OpenHands agent never stops to ask for your approval. An app built on it can turn approvals on, but deciding when the work is done and what to remember stays with plain code and AI models.
Does it ask you before it runs a command or edits a file?
Decided by: Plain codeOnly if the app turns on an approval policy; the default policy never asks.
If you send a new message instead of answering, does that count as a yes?
Decided by: Plain codeIt can: when the conversation runs again, it attempts the waiting actions before it looks at your new message, without asking again.
When a helper agent it starts pauses for approval, and the app gave it no approval check of its own, who answers?
Decided by: NobodyNobody: the helper is run again and attempts its waiting actions without asking anyone.
How does it decide it has finished?
Decided by: Plain codeA reply with visible text and no request to use a tool marks the run finished.
Three problems the map found
A new message can count as approval
Fix proposedWhen the approval policy calls for it, the agent pauses before an action until the app approves or rejects it. If you send a new message instead, and the app then runs the conversation again without rejecting, the waiting action is attempted as if you had approved it. A message saying "wait, not that" does not by itself cancel the action.
The goal judge can read "false" as done
Fix proposedWith the goal feature, a judge model is asked for a short structured reply that includes a "complete" field. The code turns that field into yes or no with a Python conversion (bool) that counts any non-empty text as yes, including the word "false". So if the judge writes "false" as text in that field, the goal is marked complete.
A secret inside a tool request is recorded unmasked
ReportedYou can register secrets, such as service access keys, so they are masked in text replies that contain no request to use a tool. When the model puts a registered secret into a request to use a tool, such as a shell command, the details of that request are written to the conversation record without masking, and when the model gives no summary of the request, the automatic summary repeats them. Anyone who can read that record can read the key.
Not checked: This card was taken from the published map of the OpenHands agent SDK at one commit; it did not look at the OpenHands app or its screens, at the hosted services the SDK can call, or at code outside the map's folders, and no OpenHands code was run to make it.
Mapped by agent-ops-patterns (open source) from OpenHands/software-agent-sdk at commit aae9c43. Mapped Oct 6, 2026. Last updated Oct 18, 2026.
What it decides by itself, and when it asks you
Mapped from the code in cline/cline.
In an ordinary Cline session, plain code runs the work and sets its limits, and the AI model decides when the task is done. By default the model also writes the summary that replaces older history, and in command-line plan mode it decides when to start acting on the plan.
In plan mode on the command line, who decides you have approved the plan and the work can start?
Decided by: The AI modelThe model, by calling a switch-to-act tool; the tool does not look at what you wrote. When that turn completes, the command-line tool rebuilds the session in act mode and starts on the plan.
On the command line, when is a running shell command stopped?
Decided by: Plain codeAfter 30 seconds by default, when code tries to kill the command and the processes it started. The command-line tool does not change that default.
When another tool runs past its time limit, is it stopped?
Decided by: Plain codeUsually not. The model is told the tool timed out, but the work itself is not cancelled and may still finish, so a file edit that timed out can still be written.
How does it decide the task is finished?
Decided by: The AI modelIn an ordinary session, the model replies without asking to use a tool and code ends the run as completed; nothing checks that the work was done.
Three problems the map found
Shell commands are cut off at 30 seconds
Already trackedOn the command line, a shell command the agent runs is stopped after 30 seconds by default and the agent is told it timed out, so a long build, test run or install can be stopped partway. Cline's tracker has two open reports about this limit.
A file edit that timed out can still be written
Not reported yetFile edits are given a time limit, but reaching it only tells the model the edit failed; the edit itself is not stopped. So the model can be told an edit timed out while the change still lands in the file.
A cut-off summary is used as if it were complete
Already trackedWhen the history is shortened, the model's summary replaces the older messages. If the summary was cut off before the model finished it, code still puts it in place; only an empty summary is skipped.
Not checked: This card was taken from the published cut-down map of Cline at one commit and covers only decisions shown there; it did not look at Cline's hosted services or at code outside the map's folders, and no Cline code was run to make it.
Mapped by agent-ops-patterns (open source) from cline/cline at commit d800bf8. Mapped Oct 19, 2026. Last updated Oct 28, 2026.
What it decides by itself, and when it asks you
Mapped from the code in browser-use/browser-use.
In browser-use, the AI model chooses the actions on each of its steps (code may first open a web address named in the task) and decides the task is finished by calling done. Among the decisions this map shows, nobody is asked before an action runs, so a form submit or a script the model writes goes ahead on its own, and code clicks OK on alerts and confirm dialogs. The built-in limits on how long a run goes are counts, not judgments (500 steps, or 5 failed steps in a row), and the run's success flag is the model's value when it gives one and true when it does not; a second model call grades the run without changing that flag.
Before the agent submits, buys, sends, deletes or runs page JavaScript, does anyone approve it?
Decided by: Plain codeNobody is asked: the model's actions run as soon as they are parsed. An integrator can add a check in their own code through the step callback, which sees the proposed actions before they run.
Which actions is the model offered this step?
Decided by: Plain codeEvery built-in action on every page, including evaluate, which runs JavaScript the model writes, except screenshot at the default vision setting and any the integrator excluded, plus custom actions whose site filter matches. On the last step or after repeated failures, only done.
When a page opens a JavaScript dialog, who decides OK or Cancel?
Decided by: Plain codeCode clicks OK on every alert, confirm and leave-page dialog the moment it opens, and Cancel on every text prompt, before the model sees it; the model is told afterwards.
Which browser permissions are granted to the sites the agent visits?
Decided by: Plain codeWhen the browser connects, code grants clipboard read/write and notifications to every site; any other permission a page asks for is left to Chrome.
Three problems the map found
A run can be reported successful when the model never said so
Fix proposedA program reads the success flag in the model's done call at the end of a run. If the model leaves the flag out, code records success. When the developer asks for a structured result, that field is hidden from the model, so such a run normally reads as successful unless the model sets it anyway. An open pull request in browser-use's tracker proposes a fix.
After a step times out, the model is not told which of its actions already ran
Not reported yetA whole step gets 180 seconds by default. If it runs over, it is cut off, the record of which of the step's actions finished is dropped, and the step's result is only a timeout error. If the run takes another step, the model sees the page as it now is, which may show some effects, but it is not told which of its actions already ran. We found no report of this in browser-use's tracker.
Pressing Enter does not resume a paused run, though the message says it will
Not reported yetOn Mac and Linux, pressing Ctrl+C pauses the run and prints "Press [Enter] to resume or [Ctrl+C] again to quit". Pressing Enter does not resume it; only code that calls agent.resume() does, so a person at the terminal can quit with a second Ctrl+C but cannot continue the run from there. We found no report of this in browser-use's tracker.
Not checked: This card was taken from the published map of browser-use at one commit and covers only decisions shown there; it did not look at the beta agent, the sandbox runner, the MCP server, the command line, Browser Use's cloud browsers or features that are off until a setting turns them on, and no browser-use code was run to make it.
Mapped by agent-ops-patterns (open source) from browser-use/browser-use at commit b49a68e. Mapped Oct 29, 2026. Last updated Nov 1, 2026.
What it decides by itself, and when it asks you
Mapped from the code in anomalyco/opencode.
In opencode, the AI model chooses each next step, and a step normally ends the turn when it calls no local tool; plain code checks its tool calls, decides when older history is summarised, and decides from the agent's and session's rules whether an action runs, waits for you, or is refused. Nothing reads the final answer to check the work, and unless an agent sets a step limit, nothing caps how many steps a run takes.
Does an action run, wait for a person, or get refused?
Decided by: Plain codeCode merges the agent's rules with the session's rules; if the last matching rule for any resource is a deny, the action is refused. Otherwise the project's saved approvals are added, anything no rule matches waits for a person, and plugin hooks may still change the result.
In the terminal interface, who answers a request that waits for a person?
Decided by: YouYou do: Allow once, Always allow (when the request offers it) or Reject. If the interface was started with --auto, --yolo or --dangerously-skip-permissions, or set to auto-accept, code answers "once" for you and no prompt is shown.
In a headless opencode run, what happens to a request that would ask a person?
Decided by: Plain codeCode answers every such request in the run's own sessions. Without --auto it refuses with a message telling the model nobody can approve, and the model carries on (in the older compatibility mode the run stops instead); with --auto it allows each one once.
How does it decide the turn is finished?
Decided by: The AI modelNormally, a step that calls no local tool ends the turn, and code then ends the run when no further input is waiting. Nothing reads the final text.
Three problems the map found
An agent's chosen model can be swapped for the default without a warning
Not reported yetWhen a session has no model of its own and the model its agent is set up with is not among the available models, code uses the default model instead. Nothing tells you the agent is running on a different model from the one it was configured with.
A patch change goes to the first lines that match
Not reported yetFor the models that edit files through patches (some GPT models), each change is placed at the first spot, searching from the end of the previous change, where its lines match, trying looser matches (ignoring spaces at the ends of lines, then at both ends) when there is no exact match. If the same lines appear more than once, the change goes to the first of them; the edit tool that other models use returns that case to the model as a failure unless it was asked to replace every match.
No default limit on a run that keeps repeating itself
Fix proposedBy default an agent has no step limit, and the map found no check in the current core for a model that keeps making the same tool calls, so a run whose repeated calls keep succeeding has no built-in limit and can go on until you stop it. opencode's tracker has an open discussion of this (#59339) and an open pull request that proposes loop detection.
Not checked: This card was taken from the published map of opencode at one commit and covers only decisions shown there; it did not look at opencode's hosted services or at code outside the parts the map covers (its core, command line, server and terminal interface), and no opencode code was run to make it.
Mapped by agent-ops-patterns (open source) from anomalyco/opencode at commit 0093fe5. Mapped Oct 24, 2026. Last updated Nov 1, 2026.
What it decides by itself, and when it asks you
Mapped from the code in earendil-works/pi.
In pi, the AI model chooses each next step and ends the run by replying without asking to use a tool; plain code checks and runs the tool calls but adds no check of its own that the work was done. By pi's stated design nobody is asked before a tool call runs unless an installed extension blocks it, and a shell command has no time limit unless the model sets one.
Is a person asked before a tool call the model issued runs?
Decided by: Plain codeNo, by pi's stated design. A call runs once its tool is found and its arguments are valid, unless an installed extension blocks it.
Can anything block a tool call?
Decided by: Plain codeOnly an installed extension that handles tool calls: the first one that says block stops the call, and the model gets its reason as an error. pi ships no blocking policy; the two in its repository are examples.
Should this project folder be trusted to load its own settings, extensions, skills and MCP servers?
Decided by: YouWhen nothing earlier answered, the person chooses at startup in the terminal: trust, trust the parent folder, do not trust, or either answer for this session only. A lasting choice is saved.
Is the work finished, so the run may stop?
Decided by: The AI modelThe model decides implicitly: a reply with no tool call normally ends the run unless messages are queued or an extension asks for more; a reply cut off at its length limit may first get one compact-and-retry. Code adds no check of its own.
Three problems the map found
Piped input and your message are joined with nothing between them
ReportedIn a one-shot run, pi joins piped input, the text of @file arguments and the first message into one prompt with no separator between them, so the end of one part runs straight into the start of the next. pi's maintainers closed the report about this as not planned.
Cut-down output from your own shell command can be marked as not cut
Fix proposedWhen you run a command yourself with !, pi keeps only the tail of a long output. After older output has been dropped, the flag that says the output was cut can still read false.
A "too long" error in unfamiliar wording is not recognized
Already trackedWhen a request fails, pi recognizes that it overflowed the model's context by matching the error text against a list of known provider messages. Wording the list does not know is treated as an ordinary error, so pi does not compact the history and retry. pi's tracker has an open report about one such message.
Not checked: This card was taken from the published map of pi at one commit and covers only decisions shown there; it did not look at code outside the map's scope (the command-line agent, agent loop, model layer, code mode and MCP client), and no pi code was run to make it.
Mapped by agent-ops-patterns (open source) from earendil-works/pi at commit 1ce44be. Mapped Oct 28, 2026. Last updated Nov 1, 2026.
What it decides by itself, and when it asks you
Mapped from the code in agno-agi/agno.
In an ordinary agno agent, the AI model decides at every turn whether to call tools or answer, and plain code runs every tool call it asks for without asking a person unless the developer marked that tool. The run ends when the model replies without asking for a tool, and by default nothing checks that answer, so even a reply cut off by the token limit is reported as completed.
When an agent is built without a model, which model answers its requests?
Decided by: Plain codeOpenAI's gpt-5.4 through the Responses API; any model the developer passes wins.
May a tool call the model issued run, without a person being asked?
Decided by: Plain codeYes. Code runs every tool call the model makes; it pauses for a person only on tools the developer marked for confirmation, user input or external execution, or on the ask-the-person tools when those are added.
Approve or reject this paused tool call?
Decided by: YouOnly for a tool marked for confirmation: the run pauses and returns, the developer's code collects the person's yes or no and continues the run, and a missing answer counts as a no.
Should the agent stop and ask the person?
Decided by: The AI modelOnly when the developer adds agno's ask-the-person toolkits; then the model decides when to stop and ask, and the run pauses for the person.
Three problems the map found
A reply cut off by the token limit is reported as completed
Fix proposedThe run ends as soon as the model replies without asking for a tool, and the shared run loop does not look at why the model stopped (some provider adapters only log a warning). So an answer cut short by the output-token limit, or refused, comes back as the answer with the run marked completed, and the caller cannot tell it from a finished one. An open pull request proposes reporting the provider's stop reason.
A structured answer that does not parse still counts as success
Fix proposedWhen the developer asks for a structured answer and the model's text cannot be turned into it, agno keeps the raw text, logs a warning, and still marks the run completed. Code that expects the structured object gets plain text instead unless it checks the type itself. An open pull request proposes an opt-in way to report the failure.
Later workflow steps can lose the user's original request
Not reported yetFrom the second step of a workflow on, an agent or team step receives only the previous step's output, not what the user first asked; the original request reaches it only when the previous step produced nothing. The function's own description says it combines the two, so a step can end up working without the user's question in front of it.
Not checked: This card was taken from the published map of agno at one commit and covers only decisions shown there; it did not look at AgentOS, the server that runs agents, or at provider adapters beyond those the map names, and no agno code was run to make it.
Mapped by agent-ops-patterns (open source) from agno-agi/agno at commit 9153aac. Mapped Oct 29, 2026. Last updated Nov 1, 2026.
What it decides by itself, and when it asks you
Mapped from the code in Mintplex-Labs/anything-llm.
In AnythingLLM, plain code routes each message, gathers what the model sees and cuts it down to fit, while the AI model picks the agent's tools and decides when the agent is done: its first reply without a tool call is the answer. In web chat a person is asked before some tool actions, but MCP tool calls run without asking anyone.
Does this message go to the agent instead of plain chat?
Decided by: Plain codeIt goes to the agent when it starts with @agent, or when the workspace is in automatic mode and its model can call tools natively, provided the agent run can be set up; otherwise it is answered as plain chat.
In web chat, should this tool action run right now?
Decided by: YouThe person sees a card with the skill name, the tool's description and the request, and clicks approve or reject.
May this MCP tool call run?
Decided by: Plain codeYes: once a server's tools are loaded, each call goes straight to the server with the model's arguments; nothing asks a person.
Has the agent finished, so its text goes back as the answer?
Decided by: The AI modelThe agent model decides: its first reply without a tool call ends the loop and becomes the answer. A reply that is exactly TERMINATE ends the whole session.
Three problems the map found
When the model asks for several tools at once, only the first runs
Not reported yetOn the shared OpenAI-compatible tool-calling path, if the model asks for more than one tool in a single reply, only the first is run and the others are dropped without the model being told. A request that needs several lookups or actions can come back with part of the work left undone unless the model notices and asks again.
The agent does not use the workspace's chat history setting
Not reported yetA workspace's chat history setting decides how much earlier conversation plain chat sends (20 when it is unset or zero). The agent does not read it: it always starts with the newest 20 saved exchanges, so a workspace set to send less, or more, gets 20 in agent mode.
Chats are marked as processed for memory even when the memory pass did not run
Not reported yetEvery 3 hours by default, a background job reads a person's recent chats to pick out facts worth remembering. Once a group of chats passes the first two checks it is marked processed whatever happened, so if the model call fails or no model is set up, the job does not come back to those chats on its next run. Only the latest 20 are read, so in a larger group the older chats are marked processed without being read.
Not checked: This card was taken from the published AnythingLLM map at one commit and covers only decisions shown there; it did not look at the web frontend or the document collector except where they reach the server, or at the 11 decisions left out of that edition, and no AnythingLLM code was run to make it.
Mapped by agent-ops-patterns (open source) from Mintplex-Labs/anything-llm at commit d7d68e7. Mapped Oct 15, 2026. Last updated Nov 1, 2026.