Skip to content

Remove query-level option overrides#48

Merged
guess merged 11 commits intomainfrom
feature/query-opts-cleanup
Mar 29, 2026
Merged

Remove query-level option overrides#48
guess merged 11 commits intomainfrom
feature/query-opts-cleanup

Conversation

@guess
Copy link
Copy Markdown
Owner

@guess guess commented Mar 29, 2026

Summary

  • Remove @query_opts_schema, validate_query_options/1, merge_options/2, and query_schema/0 from ClaudeCode.Options — these were never sent to the CLI
  • Simplify {:query_stream, prompt, opts} tuple to {:query_stream, prompt} throughout the pipeline
  • Session.Server.execute_request now passes only [session_id: state.session_id] to the adapter
  • Remove per-query override examples from 5 guides, CLAUDE.md, and cli-sync skill reference

Context

The CLI subprocess is configured once at startup. Query-level option overrides (model, tools, system prompt, etc.) were validated and merged in Session.Server but the adapter only ever read :session_id from the merged opts. This created a false abstraction where users believed they could reconfigure the session per-stream/3 call.

stream/3 still accepts :timeout and :filter opts — these are consumed locally by Stream.create and never sent to the server.

Test plan

  • mix quality passes (compile, format, credo, dialyzer)
  • mix test passes (1490 tests, 2 pre-existing failures unrelated to changes)
  • Verified 2 test failures are pre-existing (session_id capture in test adapter)

guess added 11 commits March 29, 2026 16:00
Query-level option overrides were never sent to the CLI — the
subprocess is configured once at startup. Remove the dead schema,
validation, and merge functions.
Stream.create no longer forwards opts to the server. The
{:query_stream, prompt} tuple replaces {:query_stream, prompt, opts}.
execute_request always passes [session_id: state.session_id] directly.
Delete tests for removed functions. Update GenServer calls to use
the new {:query_stream, prompt} tuple without opts.
These options were never actually sent to the CLI. Session-level
configuration is the correct pattern.
@guess guess merged commit addd8b4 into main Mar 29, 2026
2 checks passed
@guess guess deleted the feature/query-opts-cleanup branch March 29, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant