Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

docs: pass --code to the aichat commit-generation example (#4332)

FenjuFuca8d3797b245
diff --git a/Taskfile.yaml b/Taskfile.yaml
index 967110865..04fca0bc7 100644
--- a/Taskfile.yaml
+++ b/Taskfile.yaml
@@ -364,7 +364,7 @@ tasks:
declare -A COMMANDS
COMMANDS["claude"]='MAX_THINKING_TOKENS=0 claude -p --no-session-persistence --model=haiku --tools='"'"''"'"' --safe-mode --setting-sources='"'"'user'"'"' --system-prompt='"'"''"'"''
COMMANDS["llm"]='llm -m claude-haiku-4.5'
- COMMANDS["aichat"]='aichat -m claude:claude-haiku-4.5'
+ COMMANDS["aichat"]='aichat -m claude:claude-haiku-4.5 --code'
COMMANDS["codex"]='codex exec -m gpt-6-luna -c model_reasoning_effort='"'"'none'"'"' -c project_doc_max_bytes=0 -c skills.max_context_tokens=1 -c agents.enabled=false -c features.goals=false -c web_search=disabled -c '"'"'model_instructions_file="~/.codex/worktrunk-commit-instructions.txt"'"'"' -c features.shell_tool=false -c features.unified_exec=false -c features.apps=false -c features.plugins=false --ephemeral --sandbox=read-only --json - | jq -sr '"'"'[.[] | select(.item.type? == "agent_message")] | last.item.text'"'"''
COMMANDS["opencode"]='opencode run -m anthropic/claude-haiku-4.5 --variant fast'
diff --git a/dev/config.example.toml b/dev/config.example.toml
index cff232c64..5cadcfbcc 100644
--- a/dev/config.example.toml
+++ b/dev/config.example.toml
@@ -84,8 +84,10 @@
#
# ### aichat
#
+# `--code` drops the `<think>` block aichat prints before the message when the model reasons.
+#
# [commit.generation]
-# command = "aichat -m claude:claude-haiku-4.5"
+# command = "aichat -m claude:claude-haiku-4.5 --code"
#
# See LLM commits docs (https://worktrunk.dev/llm-commits/) for setup and Custom prompt templates (#custom-prompt-templates) for template customization.
#
diff --git a/docs/src/content/docs/config.md b/docs/src/content/docs/config.md
index c9d350243..3f08e24a7 100644
--- a/docs/src/content/docs/config.md
+++ b/docs/src/content/docs/config.md
@@ -173,9 +173,11 @@ command = "llm -m claude-haiku-4.5"
### aichat
+`--code` drops the `<think>` block aichat prints before the message when the model reasons.
+
```toml
[commit.generation]
-command = "aichat -m claude:claude-haiku-4.5"
+command = "aichat -m claude:claude-haiku-4.5 --code"
```
See [LLM commits docs](/llm-commits/) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.
diff --git a/docs/src/content/docs/llm-commits.md b/docs/src/content/docs/llm-commits.md
index b302b937a..af55a7cc7 100644
--- a/docs/src/content/docs/llm-commits.md
+++ b/docs/src/content/docs/llm-commits.md
@@ -51,8 +51,8 @@ command = "opencode run -m anthropic/claude-haiku-4.5 --variant fast"
# llm
command = "llm -m claude-haiku-4.5"
-# aichat
-command = "aichat -m claude:claude-haiku-4.5"
+# aichat — --code drops the <think> block reasoning models print
+command = "aichat -m claude:claude-haiku-4.5 --code"
```
## Usage
diff --git a/plugins/worktrunk/skills/worktrunk/reference/config.md b/plugins/worktrunk/skills/worktrunk/reference/config.md
index 573934cb8..0fdb3623d 100644
--- a/plugins/worktrunk/skills/worktrunk/reference/config.md
+++ b/plugins/worktrunk/skills/worktrunk/reference/config.md
@@ -167,9 +167,11 @@ command = "llm -m claude-haiku-4.5"
### aichat
+`--code` drops the `<think>` block aichat prints before the message when the model reasons.
+
```toml
[commit.generation]
-command = "aichat -m claude:claude-haiku-4.5"
+command = "aichat -m claude:claude-haiku-4.5 --code"
```
See [LLM commits docs](https://worktrunk.dev/llm-commits/) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.
diff --git a/plugins/worktrunk/skills/worktrunk/reference/llm-commits.md b/plugins/worktrunk/skills/worktrunk/reference/llm-commits.md
index 2479aa4c3..0dc770149 100644
--- a/plugins/worktrunk/skills/worktrunk/reference/llm-commits.md
+++ b/plugins/worktrunk/skills/worktrunk/reference/llm-commits.md
@@ -39,8 +39,8 @@ command = "opencode run -m anthropic/claude-haiku-4.5 --variant fast"
# llm
command = "llm -m claude-haiku-4.5"
-# aichat
-command = "aichat -m claude:claude-haiku-4.5"
+# aichat — --code drops the <think> block reasoning models print
+command = "aichat -m claude:claude-haiku-4.5 --code"
```
## Usage
diff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.md
index 573934cb8..0fdb3623d 100644
--- a/skills/worktrunk/reference/config.md
+++ b/skills/worktrunk/reference/config.md
@@ -167,9 +167,11 @@ command = "llm -m claude-haiku-4.5"
### aichat
+`--code` drops the `<think>` block aichat prints before the message when the model reasons.
+
```toml
[commit.generation]
-command = "aichat -m claude:claude-haiku-4.5"
+command = "aichat -m claude:claude-haiku-4.5 --code"
```
See [LLM commits docs](https://worktrunk.dev/llm-commits/) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.
diff --git a/skills/worktrunk/reference/llm-commits.md b/skills/worktrunk/reference/llm-commits.md
index 2479aa4c3..0dc770149 100644
--- a/skills/worktrunk/reference/llm-commits.md
+++ b/skills/worktrunk/reference/llm-commits.md
@@ -39,8 +39,8 @@ command = "opencode run -m anthropic/claude-haiku-4.5 --variant fast"
# llm
command = "llm -m claude-haiku-4.5"
-# aichat
-command = "aichat -m claude:claude-haiku-4.5"
+# aichat — --code drops the <think> block reasoning models print
+command = "aichat -m claude:claude-haiku-4.5 --code"
```
## Usage
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 14c0d70c7..4c346b4b0 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -2136,9 +2136,11 @@ command = "llm -m claude-haiku-4.5"
### aichat
+`--code` drops the `<think>` block aichat prints before the message when the model reasons.
+
```toml
[commit.generation]
-command = "aichat -m claude:claude-haiku-4.5"
+command = "aichat -m claude:claude-haiku-4.5 --code"
```
See [LLM commits docs](/llm-commits/) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
index a58b3bf25..760389df9 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -161,8 +161,10 @@ Creates ~/.config/worktrunk/config.toml with the following content:
  #
  # ### aichat
  #
+  # `--code` drops the `<think>` block aichat prints before the message when the model reasons.
+  #
  # [commit.generation]
-  # command = "aichat -m claude:claude-haiku-4.5"
+  # command = "aichat -m claude:claude-haiku-4.5 --code"
  #
  # See LLM commits docs (https://worktrunk.dev/llm-commits/) for setup and Custom prompt templates (#custom-prompt-templates) for template customization.
  #
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index 910c70c49..08c4c1c02 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -208,8 +208,10 @@ Create ~/.codex/worktrunk-commit-instructions.txt containing just .
aichat
+--code drops the <think> block aichat prints before the message when the model reasons.
+
  [commit.generation]
-  command = "aichat -m claude:claude-haiku-4.5"
+  command = "aichat -m claude:claude-haiku-4.5 --code"
See LLM commits docs for setup and Custom prompt templates for template customization.