feat(executor): add Grok CLI as a task executor - #691
Merged
Conversation
Register grok alongside claude/codex/gemini so tasks can run on the Grok CLI in tmux. Supports --resume session continuity, --always-approve dangerous mode (GROK_DANGEROUS_ARGS override), permission-mode flags, and the shared worktree write-guard via a PreToolUse hook.
Write a grok-native <worktree>/.grok/config.toml that points at the same ty mcp-server --task-id stdio server Claude gets via --mcp-config, so taskyou_complete / taskyou_needs_input load without a human in tmux. Share one launch helper between daemon Execute and BuildCommand so --effort, --model, WORKTREE_DB_PATH, and resume/dangerous flags stay in sync. Tests drive the shipped BuildCommand and fail if the MCP server or those flags go missing.
Owner
Author
Each letter was a fresh one-char prefix, so "g" picked gemini and "r"
matched nothing. Consecutive letters within a second now form one query
("gr" → grok). The buffer resets on timeout, tab, or left/right.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds Grok as a first-class TaskYou executor with Claude parity for the things that make an agent actually finish a task: MCP tools, permission/dangerous mode, session resume, model/effort overrides, and
WORKTREE_DB_PATH.GrokExecutorimplementsTaskExecutor; registered in the factory, CLI (--executor grok), TUI/GUI picker, desktop env checkgrok "$(cat promptfile)"in the task tmux window, never grok's own--worktree--resume <id>(~/.grok/sessions/<urlencoded-cwd>/)--always-approve(GROK_DANGEROUS_ARGSoverride);ResumeDangerous/ResumeSafeforce bypass on/off--effortand--modelpass through when the task sets themWORKTREE_DB_PATHis forwarded soty mcp-serveropens the same DB the daemon uses<worktree>/.grok/config.toml(mcp_servers.taskyou→ty mcp-server --task-id) because Grok has no--mcp-configflag;GROK_FOLDER_TRUST=0ungates project MCP/hooksPreToolUsehookTest Coverage
Shipped
BuildCommand/ factory / MCP wiring (not a reimplementation):WORKTREE_*env,grokbinary, no grok--worktree--resumeonly when a session id is supplied--always-approve/GROK_DANGEROUS_ARGS/WORKTREE_DANGEROUS_MODE--effortand--modelwhen task fields are setWORKTREE_DB_PATHprecedesgrokwhen set.grok/config.tomlcontains[mcp_servers.taskyou]+mcp-server --task-id <id>All passed.
QA
VHS screenshot of the new-task form executor picker (grok is in the cycle list):
Test plan
go test ./internal/executor/ ./internal/db/ ./cmd/task/go run ./cmd/task create --helplists grok (twice, stable)ty create "try grok" -e grok -xon a machine with grok logged intaskyou_completewithout a human in tmux