Expand description
Provider-aware construction of per-turn subprocess arguments.
Constants§
- CODEX_
TOOL_ 🔒FEATURES - Codex features that each add a tool to the model’s request.
/btwdisables every one of them. Checked against the pinned CLI (0.154.0,codex features list) by capturing the request it sends: with these off, plus--ignore-user-configandweb_search="disabled", the only tool left isrequest_user_input, whichexecmode refuses to run (“request_user_input is not supported in exec mode”). - GEMINI_
DENY_ 🔒ALL_ TOOLS_ POLICY - The Gemini policy that denies every tool, built-in and MCP. Written to
disk for
--policy. Checked against the pinned CLI (0.60.0) by capturing its request: with this policy the request declares no tools at all, even with--yoloon. - MAX_
PROMPT_ 🔒ARG_ UNITS - The longest prompt
append_prompt_argpasses on the command line. Windows caps a whole command line at 32,767 UTF-16 units; this leaves room for the executable path and the provider’s own flags.
Functions§
- append_
prompt_ 🔒arg - For a provider that takes its prompt as an argument rather than on stdin
(Antigravity:
agy -p <prompt>), append<flag> <prompt>last, after any resume flag. A prompt too long for the command line is refused, never truncated: a cut-off prompt would run as something the user didn’t send. - args_
for_ 🔒log argsas they may be logged: the promptappend_prompt_argput last is replaced by its length. On stdin the prompt never reached a log; on the command line it must not either (#4407).- build_
codex_ 🔒argv - build_
codex_ 🔒side_ question_ argv - Build the argv for a
/btwside question on a Codex pane: a tool-lesscodex execturn, built from scratch rather than from the pane’s own argv, which may be the app-server’s and always carries--dangerously-bypass-approvals-and-sandbox. - build_
gemini_ 🔒side_ question_ argv - Build the argv for a
/btwside question on a Gemini pane: headless stream-json withGEMINI_DENY_ALL_TOOLS_POLICYatpolicy_path, and approval modedefaultinstead of the pane’s--yolo. No--skip-trust: trusting the folder would load the project’s own Gemini settings, hooks included, so/btwgets the same trust as the pane. - build_
legacy_ 🔒argv - build_
side_ 🔒question_ argv - Build the argv for a
/btwside-question one-shot turn (server/agent_handlers/side_question.rs) frombase_one_shot_args— the same one-shotcli_argsa normal turn on this block would use. - build_
turn_ 🔒argv - Build the argv for one provider turn, adding session continuation when a prior session id is available.
- model_
flag_ 🔒value - The value of
-m/--model(or--model=<v>) inargs, if any.