Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/content/docs/terminal-presets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Pre-configured presets for popular AI agents. Defaults are safe-by-default — a

- **amp** - `amp` (built-in permission rules auto-deny destructive ops)
- **claude** - `claude --permission-mode acceptEdits`
- **codex** - `codex ... --full-auto` (workspace-sandboxed)
- **codex** - `codex ... --sandbox workspace-write --ask-for-approval never` (workspace-sandboxed)
- **gemini** - `gemini --approval-mode=auto_edit`
- **copilot** - `copilot --allow-tool=write`
- **cursor-agent** - `cursor-agent` (prompts for every action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export const AGENT_PRESETS = [
'model_reasoning_summary="detailed"',
"-c",
"model_supports_reasoning_summaries=true",
"--full-auto",
"--sandbox",
"workspace-write",
"--ask-for-approval",
"never",
],
Comment on lines +67 to 71
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 No migration for existing users with --full-auto

Existing users who already have the codex preset stored in the database will continue receiving the unexpected argument '--full-auto' found error until they manually reset or edit their preset. The seed change only affects new installs and resetToDefaults() callers.

Adding a targeted DB migration (finding rows with presetId = 'codex' and argsJson containing --full-auto and replacing those args in-place) would silently fix all affected installs on next startup — similar to how schema migrations already run in this package. Without it, existing users have no indication anything changed and no automatic recovery path.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/host-service/src/trpc/router/settings/agent-presets.ts
Line: 67-71

Comment:
**No migration for existing users with `--full-auto`**

Existing users who already have the codex preset stored in the database will continue receiving the `unexpected argument '--full-auto' found` error until they manually reset or edit their preset. The seed change only affects new installs and `resetToDefaults()` callers.

Adding a targeted DB migration (finding rows with `presetId = 'codex'` and `argsJson` containing `--full-auto` and replacing those args in-place) would silently fix all affected installs on next startup — similar to how schema migrations already run in this package. Without it, existing users have no indication anything changed and no automatic recovery path.

How can I resolve this? If you propose a fix, please make it concise.

promptTransport: "argv",
promptArgs: ["--"],
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/agent-command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("buildAgentPromptCommand", () => {
});

expect(command).toContain(
"model_supports_reasoning_summaries=true --full-auto -- \"$(cat <<'SUPERSET_PROMPT_12345678'",
"model_supports_reasoning_summaries=true --sandbox workspace-write --ask-for-approval never -- \"$(cat <<'SUPERSET_PROMPT_12345678'",
);
expect(command).toContain("- Only modified file: runtime.ts");
});
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/agent-launch-request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("buildPromptAgentLaunchRequest", () => {
agentType: "codex",
terminal: {
command:
'codex -c model_reasoning_effort="high" -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --full-auto',
'codex -c model_reasoning_effort="high" -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --sandbox workspace-write --ask-for-approval never',
},
});
});
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/src/builtin-terminal-agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export const BUILTIN_TERMINAL_AGENTS = [
description:
"OpenAI's coding agent for reading, modifying, and running code across tasks.",
command:
'codex -c model_reasoning_effort="high" -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --full-auto',
'codex -c model_reasoning_effort="high" -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --sandbox workspace-write --ask-for-approval never',
promptCommand:
'codex -c model_reasoning_effort="high" -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --full-auto --',
'codex -c model_reasoning_effort="high" -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true --sandbox workspace-write --ask-for-approval never --',
includeInDefaultTerminalPresets: true,
}),
createBuiltinTerminalAgent({
Expand Down
Loading