Skip to content

feat: enable AskQuestion tool by default#281

Merged
shuv1337 merged 2 commits intointegrationfrom
shuvcode-dev
Jan 7, 2026
Merged

feat: enable AskQuestion tool by default#281
shuv1337 merged 2 commits intointegrationfrom
shuvcode-dev

Conversation

@shuv1337
Copy link
Collaborator

@shuv1337 shuv1337 commented Jan 7, 2026

Summary

Enable the AskQuestion tool by default, removing the experimental flag requirement.

Changes

Features

  • AskQuestion tool is now enabled for all users without configuration
  • Removed experimental.askquestion_tool config option from schema

Documentation

  • Updated README.md to reflect the tool is enabled by default
  • Updated fork-features.json to document the change

Files Changed

  • packages/opencode/src/tool/registry.ts - Include AskQuestionTool unconditionally
  • packages/opencode/src/config/config.ts - Remove askquestion_tool from experimental config
  • README.md - Update documentation
  • script/sync/fork-features.json - Update feature documentation

Breaking Changes

None. Users who had experimental.askquestion_tool: true configured will see no change. The config option is simply no longer required.

Testing

Existing tests pass. The AskQuestion tool tests in packages/opencode/test/ continue to work.

Greptile Summary

This PR promotes the AskQuestion tool from experimental to default-enabled status, removing the need for manual configuration. The changes properly remove the conditional logic in the tool registry and the experimental config flag from the schema.

  • Removed experimental.askquestion_tool config option from the Zod schema
  • Changed tool registration from conditional spread to direct inclusion in registry.ts
  • Updated README.md to remove configuration instructions and mark as default-enabled
  • Updated fork-features.json documentation to reflect new status

The implementation is clean and straightforward - users who had the experimental flag enabled will see no behavioral change, while others will now have the tool available automatically.

Confidence Score: 4/5

  • Safe to merge with one minor cleanup step needed
  • The changes are well-structured and backward compatible. Only concern is the auto-generated SDK file needs regeneration to stay in sync with the config schema changes
  • packages/opencode/src/config/config.ts - needs SDK regeneration after merge

Important Files Changed

Filename Overview
packages/opencode/src/tool/registry.ts Removed conditional registration, AskQuestionTool now enabled by default
packages/opencode/src/config/config.ts Removed askquestion_tool experimental config flag from schema
README.md Updated docs to reflect tool is enabled by default, removed config instructions
script/sync/fork-features.json Updated feature documentation to reflect default-enabled status

Sequence Diagram

sequenceDiagram
    participant User
    participant Registry as ToolRegistry
    participant Config as Config Schema
    participant AskQuestion as AskQuestionTool

    Note over Registry,Config: Before PR (experimental flag)
    User->>Config: Reads opencode.json
    Config-->>User: experimental.askquestion_tool = true/false
    User->>Registry: Initialize tools
    Registry->>Config: Check experimental.askquestion_tool
    alt askquestion_tool === true
        Registry->>AskQuestion: Register AskQuestionTool
        Registry-->>User: Tools with AskQuestion
    else askquestion_tool !== true
        Registry-->>User: Tools without AskQuestion
    end

    Note over Registry,Config: After PR (default enabled)
    User->>Config: Reads opencode.json
    Note over Config: askquestion_tool removed from schema
    User->>Registry: Initialize tools
    Registry->>AskQuestion: Register AskQuestionTool unconditionally
    Registry-->>User: Tools with AskQuestion (always)
Loading

Remove experimental flag gating for the AskQuestion tool so it's
available to all users without configuration. Update documentation
and fork-features.json to reflect this change.
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@@ -977,7 +977,6 @@ export namespace Config {
chatMaxRetries: z.number().optional().describe("Number of retries for chat completions on failure"),
disable_paste_summary: z.boolean().optional(),
batch_tool: z.boolean().optional().describe("Enable the batch tool"),
Copy link

Choose a reason for hiding this comment

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

style: Run ./script/generate.ts to regenerate the SDK - the auto-generated file packages/sdk/js/src/v2/gen/types.gen.ts still contains the askquestion_tool field that was removed here

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/opencode/src/config/config.ts
Line: 979:979

Comment:
**style:** Run `./script/generate.ts` to regenerate the SDK - the auto-generated file `packages/sdk/js/src/v2/gen/types.gen.ts` still contains the `askquestion_tool` field that was removed here

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

…ion to sync SDK types with config schema change.
@shuv1337 shuv1337 closed this in 53b344e Jan 7, 2026
@shuv1337 shuv1337 merged commit 53b344e into integration Jan 7, 2026
1 check passed
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