Skip to content

fix: add TodoWrite to allowed tools in SDK presets#424

Merged
webdevcody merged 1 commit intoAutoMaker-Org:mainfrom
comzine:fix/add-todowrite-to-allowed-tools
Jan 12, 2026
Merged

fix: add TodoWrite to allowed tools in SDK presets#424
webdevcody merged 1 commit intoAutoMaker-Org:mainfrom
comzine:fix/add-todowrite-to-allowed-tools

Conversation

@comzine
Copy link
Copy Markdown
Contributor

@comzine comzine commented Jan 11, 2026

Summary

  • Add TodoWrite to fullAccess and chat tool presets in sdk-options.ts

Problem

The TodoWrite tool was missing from the allowed tools list, causing the Claude Agent SDK to crash with exit code 1 when the agent attempted to use it for task tracking during feature implementation.

Error observed:

Tool Call: TodoWrite
6 todo items

Error
❌ Error: Claude Code process exited with code 1

Solution

Added TodoWrite to both fullAccess and chat tool presets so the Claude agent can use its built-in task tracking capabilities.

Test plan

  • Start a feature in Auto Mode
  • Verify agent can use TodoWrite without crashing
  • Verify task completes successfully

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • TodoWrite is now available in both full-access and chat modes, expanding the tool set available to users. This enhancement enables TodoWrite functionality across multiple interaction modes, providing broader feature access and supporting more comprehensive user workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

The TodoWrite tool was missing from the fullAccess and chat tool
presets, causing the Claude Agent SDK to crash with exit code 1
when the agent attempted to use it for task tracking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 11, 2026

📝 Walkthrough

Walkthrough

The change adds the 'TodoWrite' tool permission to two existing TOOL_PRESETS configurations: fullAccess and chat. This expands the available tools in these preset modes without altering existing logic.

Changes

Cohort / File(s) Summary
Tool Permissions Configuration
apps/server/src/lib/sdk-options.ts
Adds 'TodoWrite' permission entry to both TOOL_PRESETS.fullAccess and TOOL_PRESETS.chat arrays

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A little permission, so small yet so bright,
TodoWrite joins the presets, everything's right!
Full access and chat modes now ready to play,
More tools in the toolbox to brighten the day! 🛠️✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding TodoWrite to allowed tools in SDK presets, which directly matches the changeset modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 299b838 and 6381eca.

📒 Files selected for processing (1)
  • apps/server/src/lib/sdk-options.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Always import from shared packages (@automaker/*), never from old relative paths

Files:

  • apps/server/src/lib/sdk-options.ts
apps/server/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use createEventEmitter() from lib/events.ts for all server operations to emit events that stream to frontend via WebSocket

Files:

  • apps/server/src/lib/sdk-options.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use resolveModelString() from @automaker/model-resolver to convert model aliases (haiku, sonnet, opus) to full model names

Files:

  • apps/server/src/lib/sdk-options.ts
🧠 Learnings (1)
📚 Learning: 2026-01-07T15:20:53.127Z
Learnt from: webdevcody
Repo: AutoMaker-Org/automaker PR: 378
File: apps/server/src/lib/sdk-options.ts:141-148
Timestamp: 2026-01-07T15:20:53.127Z
Learning: In apps/server/src/lib/sdk-options.ts, the code intentionally sets permissionMode to 'bypassPermissions' and allowDangerouslySkipPermissions to true for fully autonomous operation. This is an architectural choice and should be documented with rationale, threat model, and security controls (e.g., Docker as boundary). Reviewers should verify that this pattern is intentional and not a regression; ensure access to this option is restricted and add explicit comments explaining risk and when to revoke it. Consider adding a feature flag or runtime guard, and ensure tests cover the security boundary behavior.

Applied to files:

  • apps/server/src/lib/sdk-options.ts
🔇 Additional comments (1)
apps/server/src/lib/sdk-options.ts (1)

132-135: Addition of TodoWrite looks appropriate for the use cases.

The addition of TodoWrite to both fullAccess and chat presets correctly addresses the crash described in the PR. These are the appropriate presets for this tool:

  • fullAccess: Enables task tracking during autonomous feature implementation
  • chat: Enables task tracking during interactive coding sessions

The tool is correctly excluded from read-only presets (readOnly, specGeneration). TodoWrite is a supported tool in the Claude Agent SDK and other tool configurations across the codebase either reference these presets or specify custom tools for their specific use cases.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @comzine, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical bug in the Claude Agent SDK where the agent would crash when trying to use its task tracking feature. By integrating the TodoWrite tool into the fullAccess and chat tool presets, the agent can now seamlessly manage tasks, ensuring stable and efficient operation during feature implementation and interactive sessions.

Highlights

  • Bug Fix: Resolved an issue where the Claude Agent SDK would crash when attempting to use the TodoWrite tool due to its absence from allowed tool presets.
  • Tool Integration: The TodoWrite tool has been added to both the fullAccess and chat tool presets within sdk-options.ts.
  • Agent Functionality: This change enables the Claude agent to properly utilize its built-in task tracking capabilities without encountering runtime errors.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes a crash by adding the TodoWrite tool to the fullAccess and chat tool presets in the SDK options. The change is straightforward and addresses the problem described. I have added one suggestion to improve maintainability by removing code duplication between the two presets you've modified.

Comment on lines 131 to +135
/** Full tool access for feature implementation */
fullAccess: ['Read', 'Write', 'Edit', 'Glob', 'Grep', 'Bash', 'WebSearch', 'WebFetch'] as const,
fullAccess: ['Read', 'Write', 'Edit', 'Glob', 'Grep', 'Bash', 'WebSearch', 'WebFetch', 'TodoWrite'] as const,

/** Tools for chat/interactive mode */
chat: ['Read', 'Write', 'Edit', 'Glob', 'Grep', 'Bash', 'WebSearch', 'WebFetch'] as const,
chat: ['Read', 'Write', 'Edit', 'Glob', 'Grep', 'Bash', 'WebSearch', 'WebFetch', 'TodoWrite'] as const,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The fullAccess and chat tool presets are identical. While this is correct and confirmed by unit tests, duplicating the array literal creates a maintenance risk. If a tool is added to one in the future, it might be missed in the other.

To prevent this, consider defining the array once as a constant and reusing it:

const fullAccessAndChatTools = ['Read', 'Write', 'Edit', 'Glob', 'Grep', 'Bash', 'WebSearch', 'WebFetch', 'TodoWrite'] as const;

export const TOOL_PRESETS = {
  //...
  /** Full tool access for feature implementation */
  fullAccess: fullAccessAndChatTools,

  /** Tools for chat/interactive mode */
  chat: fullAccessAndChatTools,
} as const;

This makes the code more robust and easier to maintain.

@webdevcody webdevcody merged commit 0dc70ad into AutoMaker-Org:main Jan 12, 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.

2 participants