Skip to content

feat(init): default VS Code chat sessions to Squad #1486

Closed

Description

@tamirdresher

Summary

Change squad init so it sets the repository's VS Code workspace default chat mode to Squad by default, via .vscode/settings.json:

{
  "chat.newSession.defaultMode": "Squad"
}

Behavior / Acceptance Criteria

  • Plain squad init enables this behavior by default.
  • If .vscode/settings.json does not exist, create it (and .vscode/ if needed) with "chat.newSession.defaultMode": "Squad".
  • If .vscode/settings.json exists and chat.newSession.defaultMode is absent, add that property while preserving all existing settings.
  • If chat.newSession.defaultMode already exists with any value, preserve it exactly and do not overwrite it (treat as user ownership, regardless of casing/value).
  • Provide an explicit CLI opt-out following the repo's established --no-flag convention (e.g.--no-vscode-default). Document the exact flag in squad init --help` and relevant init documentation.
  • With the opt-out flag, do not create or modify .vscode/settings.json for this behavior at all.
  • Editing must be JSONC-aware: preserve comments, trailing commas, existing keys, and reasonable formatting. Reuse an existing helper/dependency where possible rather than hand-rolling a parser; do not replace the whole file or strip comments.
  • If an existing settings file cannot be safely parsed/edited, do not corrupt or replace it - surface a warning consistent with existing CLI patterns and continue init (unless repo conventions require a hard failure).
  • The operation must be idempotent: rerunning squad init causes no further diff.
  • Scope is limited to squad init; this behavior should not be added to squad upgrade unless architecture makes init/upgrade inseparable (if so, that must be documented and justified).

Testing

Add/update focused tests covering:

  • Missing settings file
  • Existing settings file without the key
  • Existing key present with a different value (must be preserved)
  • Comments / trailing commas preserved after edit
  • Opt-out flag behavior
  • Idempotent rerun (no diff on second run)
  • Malformed/unparseable existing file (safety - no corruption)

Docs

Update user-facing docs/help directly related to the new flag and default behavior.

Non-goals

  • Do not modify unrelated files or pre-existing user work.
  • Do not touch squad upgrade behavior unless justified per above.

Requested by Tamir Dresher.

Activity

  1. added a commit that references this issue on Jul 27, 2026
    e8ddcb0
  2. added a commit that references this issue on Jul 28, 2026
    d84e369
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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