Skip to content

refactor: consolidate SessionConfig — reduce 16 properties to ~5 meaningful settings #414

Description

@Aaronontheweb

Problem

SessionConfig has 16+ properties, most of which are internal tuning knobs that nobody changes. This makes the config surface confusing for developers and agents.

Current properties (16)

Actually useful to configure (~5):

  • Timeout settings (3 separate: SidecarLlmTimeoutSeconds, TurnLlmTimeoutSeconds, ToolExecutionTimeoutSeconds) — could be 1 base timeout with others derived
  • IdleTimeout — passivation timing
  • MemoryObserverIdleSeconds — observer timing
  • MaxToolCallsPerTurn — safety rail

Feature flags that should be removed once stable (2):

  • MemorySidecarsEnabled
  • DeterministicRetrievalEnabled

Internal tuning nobody changes (8):

  • CompactionThreshold, KeepRecentToolResults, KeepRecentMessages, SnapshotInterval, TitleGenerationInterval, MaxInlineToolResultChars, DiscoveredToolRetentionTurns, DiscoveredToolMaxCount

Not configurable — runtime-derived (4):

  • ModelId, ContextWindowTokens, InputModalities, OutputModalities

Proposed approach

  1. Consolidate 3 timeout settings into 1 base timeout with derived values
  2. Hardcode internal tuning as constants (still overridable via config for testing)
  3. Remove feature flags once memory and retrieval are stable
  4. Separate runtime-derived model properties from user config
  5. Update JSON schema to document the remaining ~5 settings with additionalProperties: false

Related

  • Session schema is currently additionalProperties: true (no validation)
  • CLAUDE.md Configuration Schema Sync Rule requires schema updates when adding properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions