feat: expose all Claude Agent SDK options in session creation UI#1179
Open
ambient-code[bot] wants to merge 3 commits intomainfrom
Open
feat: expose all Claude Agent SDK options in session creation UI#1179ambient-code[bot] wants to merge 3 commits intomainfrom
ambient-code[bot] wants to merge 3 commits intomainfrom
Conversation
Add a collapsible "Advanced SDK Options" section to the new session page, gated behind the `advanced-sdk-options` workspace feature flag (disabled by default). Allows users to configure temperature, max tokens, thinking tokens, turn limits, cost budgets, permission mode, allowed tools, system prompt, beta flags, and more. Data flow: frontend sends sdkOptions → backend serializes into SDK_OPTIONS env var (with server-side allowlist) → runner parses and merges into adapter options (with defense-in-depth denylist). Also adds: - GHA workflow for weekly SDK options drift detection (auto-PR with amber:auto-fix label) - SDK options manifest for tracking ClaudeAgentOptions fields - Removal of unused create-session-dialog.tsx (dead code) - Removal of Type column from feature flags settings page - Tests for frontend component, runner SDK_OPTIONS parsing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix GHA FileNotFoundError message (was misleading about creating manifest) - Guard against non-dict JSON in SDK_OPTIONS parsing (runner) - Remove timeout/inactivity_timeout from SDK allowlist (platform-level, not SDK) - Per-test QueryClient in new-session-view tests (prevent cache leakage) - Add beforeEach mock reset in advanced-sdk-options tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Drift workflow: fix FileNotFoundError to create initial manifest, detect metadata changes (type/required) not just key additions/removals - Backend: add ClearSdkOptions field for explicit empty SDK options clearing, add type/range validation in filterSdkOptions with error returns - Frontend: rename ambiguous "default" SelectItem to "prompt_user" with proper SDK value mapping, add client-side JSON validation for output format field, fix toggle logic to treat undefined allowed_tools as runner defaults, add source-of-truth comment on DEFAULT_TOOLS - Runner: add timeout/inactivity_timeout to sdk-options-manifest.json, add denylist filtering test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 tasks
Contributor
Author
Review Queue Status
Action needed: Fix failing Go Lint - Backend
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #1146 (fork branch cannot be updated by the GitHub App integration).
Add a collapsible "Advanced SDK Options" section to the new session page, gated behind the
advanced-sdk-optionsworkspace feature flag (disabled by default). Allows users to configure temperature, max tokens, thinking tokens, turn limits, cost budgets, permission mode, allowed tools, system prompt, beta flags, and more.Data flow: frontend sends sdkOptions → backend serializes into SDK_OPTIONS env var (with server-side allowlist + type validation) → runner parses and merges into adapter options (with defense-in-depth denylist).
Changes
AdvancedSdkOptionscollapsible component with full SDK option controls, JSON preview, client-side validationfilterSdkOptionswith type validation,ClearSdkOptionssupport in UpdateSession, allowlist enforcementsdk-options-manifest.jsontracking all ClaudeAgentOptions fields including timeout/inactivity_timeoutadvanced-sdk-optionsworkspace-scoped flagCodeRabbit Review Feedback (all 13 items addressed)
See commit
fix: address all CodeRabbit review feedback on advanced SDK optionsfor details.Test plan
go vet ./...passesgo build ./...passesnpx tsc --noEmitpassesnpm run buildpassespytest tests/test_sdk_options.py— 6/6 passGenerated with Claude Code