Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix: show Claude's thinking in the working pill

leepokai11c8605e4862
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.kt
index b111e353..ceb075ef 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.kt
@@ -40,7 +40,17 @@ class WorkingIndicatorTest {
compose.onNodeWithText("npm test").assertDoesNotExist()
}
- @Test fun activityWithoutStepsIsNotClickableAndUpdatesWithoutMovingHistory() {
+ /** Claude's thinking text arrives as its thinking ends, so the activity unfolds before the turn has steps. */
+ @Test fun activityUnfoldsBeforeTheTurnHasSteps() {
+ compose.mainClock.autoAdvance = false
+ compose.setContent { Hosted { WorkingIndicator(Bot("bot", "Bot", status = "working", activity = "Thinking…"), emptyList()) } }
+ compose.mainClock.advanceTimeBy(1000)
+ compose.onNodeWithText("Thinking…").performClick()
+ compose.mainClock.advanceTimeBy(1000)
+ compose.onNodeWithText("Nothing yet.").assertIsDisplayed()
+ }
+
+ @Test fun activityUpdatesWithoutMovingHistory() {
// The live orb runs a frame loop; advance motion explicitly instead of waiting for it to stop.
compose.mainClock.autoAdvance = false
val activity = mutableStateOf("Working…")
@@ -57,14 +67,14 @@ class WorkingIndicatorTest {
}
compose.mainClock.advanceTimeBy(1000)
compose.waitForIdle()
- compose.onNodeWithText("Working…").assertIsDisplayed().assertHasNoClickAction()
+ compose.onNodeWithText("Working…").assertIsDisplayed()
compose.runOnIdle {
assertFalse(list.canScrollForward)
activity.value = "Searching files…"
}
compose.mainClock.advanceTimeBy(1000)
compose.waitForIdle()
- compose.onNodeWithText("Searching files…").assertIsDisplayed().assertHasNoClickAction()
+ compose.onNodeWithText("Searching files…").assertIsDisplayed()
compose.runOnIdle { assertFalse(list.canScrollForward) }
compose.onNodeWithTag("conversation").performTouchInput { swipeDown() }
compose.mainClock.advanceTimeBy(1000)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt b/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt
index ea3cc99b..6a0ec1c8 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt
@@ -374,17 +374,15 @@ internal val Entry.botReactions: Map<String, List<String>> get() =
}
}
-/** The bot's current activity and elapsed time; once the turn has steps, a tap unfolds them. */
+/** The bot's current activity and elapsed time; a tap unfolds the turn's steps. */
@Composable internal fun WorkingIndicator(bot: Bot, steps: List<Entry>) {
val needs = bot.status == "needsInput"
// Each turn starts folded.
- var expanded by remember(bot.startedAt) { mutableStateOf(false) }
- val open = expanded && steps.isNotEmpty()
+ var open by remember(bot.startedAt) { mutableStateOf(false) }
val turn by animateFloatAsState(if (open) 90f else 0f, Motion.layout(), label = "Chevron")
val action = tr(if (open) "Hide steps" else "Show steps")
val state = tr(if (open) "Expanded" else "Collapsed")
- val toggle = if (steps.isEmpty()) Modifier else Modifier.clickable(role = Role.Button, onClickLabel = action) { expanded = !expanded }
- .semantics { stateDescription = state }
+ val toggle = Modifier.clickable(role = Role.Button, onClickLabel = action) { open = !open }.semantics { stateDescription = state }
Column(Modifier.fillMaxWidth().padding(top = 6.dp, end = 40.dp)) {
Column(Modifier.then(if (open) Modifier.fillMaxWidth() else Modifier).animateContentSize(Motion.layoutSize)
.clip(RoundedRectangle(18.dp)).background(Palette.bubbleAgent).padding(horizontal = 16.dp, vertical = 12.dp)) {
@@ -394,7 +392,7 @@ internal val Entry.botReactions: Map<String, List<String>> get() =
Text(tr(bot.activity.ifEmpty { "Working…" }), Modifier.weight(1f, fill = open), style = Type.subheadline,
color = if (needs) Palette.warning else Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
bot.startedAt?.let { Elapsed(it) }
- if (steps.isNotEmpty()) Symbol("chevron.right", Modifier.rotate(turn), size = 13.dp, tint = Palette.tertiary)
+ Symbol("chevron.right", Modifier.rotate(turn), size = 13.dp, tint = Palette.tertiary)
}
AnimatedVisibility(open, enter = fadeIn(Motion.fade()) + expandVertically(Motion.layoutSize),
exit = fadeOut(Motion.fade()) + shrinkVertically(Motion.layoutSize)) { WorkingSteps(steps) }
@@ -403,7 +401,7 @@ internal val Entry.botReactions: Map<String, List<String>> get() =
}
/** The turn's thinking, narration, tool calls and plan: hugs them, scrolls past 280 dp, and follows new steps until
- * the reader scrolls up. */
+ * the reader scrolls up. A turn can have none yet: Claude's thinking text arrives as its thinking ends. */
@Composable private fun WorkingSteps(steps: List<Entry>) {
val scroll = rememberScrollState()
var follow by remember { mutableStateOf(true) }
@@ -415,6 +413,7 @@ internal val Entry.botReactions: Map<String, List<String>> get() =
scroll.scrollTo(scroll.maxValue)
}
Column(Modifier.padding(top = 12.dp).heightIn(max = 280.dp).verticalScroll(scroll), verticalArrangement = Arrangement.spacedBy(10.dp)) {
+ if (steps.isEmpty()) Text(tr("Nothing yet."), style = Type.body, color = Palette.tertiary)
for (entry in steps) key(entry.id) { TraceRow(entry, unfolded = true) }
}
}
diff --git a/apps/desktop/src/renderer/views/thread/WorkingIndicator.tsx b/apps/desktop/src/renderer/views/thread/WorkingIndicator.tsx
index 521504e2..b70e3e1c 100644
--- a/apps/desktop/src/renderer/views/thread/WorkingIndicator.tsx
+++ b/apps/desktop/src/renderer/views/thread/WorkingIndicator.tsx
@@ -9,35 +9,24 @@ import { useTr } from '../../lib/use-language'
import { useFollowEnd } from './follow-end'
import { TraceRow } from './TraceView'
-/** The bot's current activity and elapsed time; once the turn has steps, a click unfolds them. */
+/** The bot's current activity and elapsed time; a click unfolds the turn's steps. */
export function WorkingIndicator({ bot, steps }: { bot: Bot; steps: Entry[] }) {
const tr = useTr()
const waiting = needsInput(bot)
- const [expanded, setExpanded] = useState(false)
- const unfoldable = steps.length > 0
- const open = expanded && unfoldable
- const status = (
- <HStack as="span" gap={8}>
- <ThinkingOrb state={waiting ? 'listening' : 'working'} size={16} color={waiting ? 'var(--warning)' : 'var(--secondary)'} />
- <Text size="subheadline" tone={waiting ? 'attention' : 'secondary'} truncate grow>{tr(bot.activity || 'Working…')}</Text>
- {bot.startedAt ? <Timer since={bot.startedAt} /> : null}
- {unfoldable ? (
- <span className={`disclosure-chevron${open ? ' open' : ''}`}>
- <Icon name="chevron.right" size={10} weight="semibold" />
- </span>
- ) : null}
- </HStack>
- )
+ const [open, setOpen] = useState(false)
return (
<VStack align="flex-start" className="agent-inset">
<div className={open ? 'working expanded' : 'working'}>
- {unfoldable ? (
- <button className="working-toggle" onClick={() => setExpanded((x) => !x)} aria-expanded={open} title={tr(open ? 'Hide steps' : 'Show steps')}>
- {status}
- </button>
- ) : (
- status
- )}
+ <button className="working-toggle" onClick={() => setOpen((x) => !x)} aria-expanded={open} title={tr(open ? 'Hide steps' : 'Show steps')}>
+ <HStack as="span" gap={8}>
+ <ThinkingOrb state={waiting ? 'listening' : 'working'} size={16} color={waiting ? 'var(--warning)' : 'var(--secondary)'} />
+ <Text size="subheadline" tone={waiting ? 'attention' : 'secondary'} truncate grow>{tr(bot.activity || 'Working…')}</Text>
+ {bot.startedAt ? <Timer since={bot.startedAt} /> : null}
+ <span className={`disclosure-chevron${open ? ' open' : ''}`}>
+ <Icon name="chevron.right" size={10} weight="semibold" />
+ </span>
+ </HStack>
+ </button>
<Reveal show={open}>
<WorkingSteps steps={steps} />
</Reveal>
@@ -46,12 +35,15 @@ export function WorkingIndicator({ bot, steps }: { bot: Bot; steps: Entry[] }) {
)
}
-/** The turn's thinking, narration, tool calls and plan in a bounded box that follows new steps until the reader scrolls up. */
+/** The turn's thinking, narration, tool calls and plan in a bounded box that follows new steps until the reader scrolls
+ * up. A turn can have none yet: Claude's thinking text arrives as its thinking ends. */
function WorkingSteps({ steps }: { steps: Entry[] }) {
+ const tr = useTr()
const follow = useFollowEnd()
return (
<div ref={follow.ref} className="working-steps" onScroll={follow.onScroll}>
<VStack gap={10}>
+ {steps.length === 0 ? <Text tone="tertiary">{tr('Nothing yet.')}</Text> : null}
{steps.map((e) => <TraceRow key={e.id} entry={e} unfolded />)}
</VStack>
</div>
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift
index d111781d..042b85df 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift
@@ -260,29 +260,24 @@ struct NoticeRow: View {
}
}
-/// The bot's current activity and elapsed time; once the turn has steps, a tap unfolds them.
+/// The bot's current activity and elapsed time; a tap unfolds the turn's steps.
struct WorkingIndicator: View {
let bot: Bot
let steps: [Entry]
- @State private var expanded = false
+ @State private var open = false
@Environment(\.accessibilityReduceMotion) private var reduceMotion
var body: some View {
- let open = expanded && !steps.isEmpty
let shape = RoundedRectangle(cornerRadius: 18, style: .continuous)
VStack(alignment: .leading, spacing: 0) {
- if steps.isEmpty {
- status(open: false)
- } else {
- Button {
- withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { expanded.toggle() }
- } label: {
- status(open: open).contentShape(Rectangle())
- }
- .buttonStyle(.plain)
- .accessibilityHint(L10n.tr(open ? "Hide steps" : "Show steps"))
- .accessibilityValue(open ? "Expanded" : "Collapsed")
+ Button {
+ withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { open.toggle() }
+ } label: {
+ status.contentShape(Rectangle())
}
+ .buttonStyle(.plain)
+ .accessibilityHint(L10n.tr(open ? "Hide steps" : "Show steps"))
+ .accessibilityValue(open ? "Expanded" : "Collapsed")
if open {
WorkingSteps(steps: steps)
.padding(.top, 12)
@@ -299,7 +294,7 @@ struct WorkingIndicator: View {
.padding(.trailing, 40)
}
- private func status(open: Bool) -> some View {
+ private var status: some View {
HStack(spacing: 8) {
ThinkingOrb(state: bot.needsInput ? .listening : .working, size: 16, color: bot.needsInput ? Palette.warning : Palette.secondary)
Text(L10n.tr(bot.activity.isEmpty ? "Working…" : bot.activity))
@@ -312,18 +307,17 @@ struct WorkingIndicator: View {
.font(.footnote.monospacedDigit())
.foregroundStyle(Palette.tertiary)
}
- if !steps.isEmpty {
- Image(systemName: "chevron.right")
- .font(.caption2.weight(.semibold))
- .foregroundStyle(Palette.tertiary)
- .rotationEffect(.degrees(open ? 90 : 0))
- }
+ Image(systemName: "chevron.right")
+ .font(.caption2.weight(.semibold))
+ .foregroundStyle(Palette.tertiary)
+ .rotationEffect(.degrees(open ? 90 : 0))
}
}
}
/// The turn's thinking, narration, tool calls and plan: hugs them, scrolls once they're taller than
/// 280 points, and keeps the newest in view. One scroll view, so what the reader unfolds stays unfolded.
+/// A turn can have none yet: Claude's thinking text arrives as its thinking ends.
private struct WorkingSteps: View {
let steps: [Entry]
@@ -331,6 +325,7 @@ private struct WorkingSteps: View {
CappedHeight(max: 280) {
ScrollView {
VStack(alignment: .leading, spacing: 10) {
+ if steps.isEmpty { Text(L10n.tr("Nothing yet.")).foregroundStyle(Palette.tertiary) }
ForEach(steps) { TraceRow(entry: $0, unfolded: true) }
}
.frame(maxWidth: .infinity, alignment: .leading)
diff --git a/docs/features/chat-messages.md b/docs/features/chat-messages.md
index e48c3c6f..153ebdd2 100644
--- a/docs/features/chat-messages.md
+++ b/docs/features/chat-messages.md
@@ -67,15 +67,19 @@ reads as **Typing…** (`activity()` in `agent/bot/tool_entry.rs`). The activity
animated orb, a short status and elapsed time, in a pill no wider than an agent bubble whose status
truncates to one line. Replies arrive as complete messages.
-Once the running turn has steps, the pill ends in a chevron and a tap (click) unfolds them inside it:
+The pill ends in a chevron, and a tap (click) unfolds the running turn's steps inside it:
the turn's thinking text, narration (never a `(pass)`), tool calls (MCP tools included) and plan, in order, with each
tool's output and diffs one more tap away. The pill widens to an agent bubble's width, the steps
scroll inside it past 280 pt and follow new ones until the reader scrolls up, and each turn starts
folded; the pill leaves with the turn. The host sets `bookkeeping` on every tool entry: `true` for
the bot's own bookkeeping (a `send_message` call, a `memory` MCP call, or a call naming a file in a
memory folder the bot sees), which the steps leave out, as the working line does. A host older than
-2.25.0 sets none, so its tool calls stay out of the steps too. A turn with no steps yet (some agents
-send no thinking text) shows no chevron.
+2.25.0 sets none, so its tool calls stay out of the steps too. A turn with no steps yet unfolds to
+**Nothing yet.**: some agents send no thinking text, and Claude's arrives only as its thinking ends.
+Claude Code leaves an SDK session's thinking text out unless asked, so Claude bots start with
+summaries shown (`--thinking-display summarized`, through `claudeCode.options.extraArgs` in
+`agent/bot/launch.rs`). Whether Claude thinks stays the user's Claude Code setting; when it does, a
+short thought's summary arrives in one piece when the thinking ends, a long one's in parts.
Full conversation remains available from the conversation menu. It contains narration, all
thoughts, tools and previous turns, and follows new steps until the reader scrolls up.
diff --git a/host/src/agent/bot/launch.rs b/host/src/agent/bot/launch.rs
index dc5798e9..4ed4f1ec 100644
--- a/host/src/agent/bot/launch.rs
+++ b/host/src/agent/bot/launch.rs
@@ -24,6 +24,8 @@ pub(super) fn claude_meta(cfg: &BotConfig, system: &str) -> Value {
/// Claude Code's own memory and its auto-dream stay off, so Codync's is the bot's one memory, unless the user kept
/// them on; then Claude Code sets both itself ([design](../../../../docs/design/bot-memory.md#claude-codes-own-memory)).
+/// Claude's thinking shows as summaries, which the working steps a chat unfolds show: an SDK session otherwise
+/// leaves its text out. Whether Claude thinks stays the user's Claude Code setting.
fn claude_options(cfg: &BotConfig) -> Value {
// The bot's replies, memory and team management are Codync's own tools, which follow the bot's permission inside
// Codync: the user's Claude Code auto-mode classifier mustn't refuse them (it blocked a reply naming the user's
@@ -33,7 +35,7 @@ fn claude_options(cfg: &BotConfig) -> Value {
settings["autoMemoryEnabled"] = false.into();
settings["autoDreamEnabled"] = false.into();
}
- json!({"options": {"settings": settings}})
+ json!({"options": {"settings": settings, "extraArgs": {"thinking-display": "summarized"}}})
}
/// Ways to start the bot's agent over ACP, best first: its own command, else its backend's.
@@ -221,4 +223,13 @@ mod tests {
"Claude Code decides"
);
}
+
+ #[test]
+ fn claude_streams_thinking_summaries() {
+ let cfg: BotConfig =
+ serde_json::from_value(json!({"id": "a", "name": "B", "backend": "claude", "cwd": "/work/app"})).unwrap();
+ let options = &claude_options(&cfg)["options"];
+ assert_eq!(options["extraArgs"]["thinking-display"], "summarized");
+ assert!(options.get("thinking").is_none(), "whether Claude thinks stays Claude Code's");
+ }
}
diff --git a/host/src/tui/app/steps.rs b/host/src/tui/app/steps.rs
index b602c1b2..77e66026 100644
--- a/host/src/tui/app/steps.rs
+++ b/host/src/tui/app/steps.rs
@@ -22,11 +22,7 @@ impl App {
/// `>` or a click on the working line: unfolds or folds the selected bot's steps for this turn.
pub(super) fn toggle_steps(&mut self) {
let Some(bot) = self.bot().filter(|b| self.shows_activity(b)) else { return };
- let lane = self.lane(&bot.id);
- if working_steps(&lane).is_empty() {
- return;
- }
- let Some(turn) = running_turn(&lane) else { return };
+ let Some(turn) = running_turn(&self.lane(&bot.id)) else { return };
let key = (bot.id.clone(), turn);
self.steps_open = if self.steps_open.as_ref() == Some(&key) { None } else { Some(key) };
}
diff --git a/host/src/tui/view/activity.rs b/host/src/tui/view/activity.rs
index 033ede4b..a7f07583 100644
--- a/host/src/tui/view/activity.rs
+++ b/host/src/tui/view/activity.rs
@@ -19,25 +19,22 @@ pub(super) fn activity(out: &mut Built, app: &App, bot: &Bot, entries: &[&Entry]
gap(out);
out.lines.push(Line::from(Span::styled(format!(" {}", bot.name), name_style(&bot.color))));
let steps = working_steps(entries);
- let open = !steps.is_empty()
- && app.steps_open.as_ref().is_some_and(|(id, turn)| id == &bot.id && Some(*turn) == running_turn(entries));
+ let open = app.steps_open.as_ref().is_some_and(|(id, turn)| id == &bot.id && Some(*turn) == running_turn(entries));
let text = if bot.activity.is_empty() { tr("Working…") } else { tr(&bot.activity) };
- let mut row = vec![
+ out.buttons.push((out.lines.len(), 0, u(width), Click::Steps));
+ out.lines.push(Line::from(vec![
Span::styled(format!(" {} ", spin(app)), t.secondary),
Span::styled(truncate(text.as_ref(), width.saturating_sub(8)), t.secondary),
- ];
- if !steps.is_empty() {
- row.push(Span::styled(if open { " v" } else { " >" }, t.dim));
- out.buttons.push((out.lines.len(), 0, u(width), Click::Steps));
- }
- out.lines.push(Line::from(row));
- let hint = if steps.is_empty() {
- " t full conversation".to_owned()
- } else {
- format!(" {} steps so far · > {} · t full conversation", steps.len(), if open { "hide" } else { "show" })
- };
+ Span::styled(if open { " v" } else { " >" }, t.dim),
+ ]));
+ let hint =
+ format!(" {} steps so far · > {} · t full conversation", steps.len(), if open { "hide" } else { "show" });
out.lines.push(Line::from(Span::styled(hint, t.dim)));
if open {
+ // Claude's thinking text arrives as its thinking ends, so a turn can have no steps yet.
+ if steps.is_empty() {
+ out.lines.push(Line::from(Span::styled(format!(" {}", tr("Nothing yet.")), t.dim)));
+ }
let mut lines = vec![];
for e in steps {
push_step(&mut lines, app, e, width, false);
@@ -116,14 +113,16 @@ mod tests {
}
#[test]
- fn a_turn_without_steps_offers_only_full_conversation() {
+ fn a_turn_without_steps_unfolds_to_nothing_yet() {
let (tx, _) = tokio::sync::mpsc::unbounded_channel();
let mut app = App::new(Client::new("http://127.0.0.1:1", None), tx, String::new());
- app.on_msg(Msg::Event(json!({"type": "bot", "bot": {"id": "bot", "name": "Bot", "activity": ""}})));
+ app.on_msg(Msg::Event(json!({"type": "bot", "bot": {"id": "bot", "name": "Bot", "activity": "Thinking…"}})));
let entries =
[Entry { id: "u".into(), seq: 1, turn: 1, kind: Kind::User, data: json!({"text": "hi"}), created_at: 0 }];
- let (text, buttons) = render(&app, &entries);
- assert!(text.contains("Working…") && text.contains("t full conversation") && !text.contains("> show"));
- assert_eq!(buttons, 0);
+ let (folded, buttons) = render(&app, &entries);
+ assert!(folded.contains("Thinking… >") && folded.contains("> show") && !folded.contains("Nothing yet."));
+ assert_eq!(buttons, 1);
+ app.steps_open = Some(("bot".into(), 1));
+ assert!(render(&app, &entries).0.contains("Nothing yet."));
}
}
diff --git a/web/content/docs/conversations.mdx b/web/content/docs/conversations.mdx
index 61f932d7..1ce0da72 100644
--- a/web/content/docs/conversations.mdx
+++ b/web/content/docs/conversations.mdx
@@ -6,7 +6,7 @@ The chat shows your messages, the bot's messages, approval cards and short notic
While the bot works, a line under the last message shows what it's doing and for how long. It reads **Typing…** while the bot writes you a message.
-Once the bot has done something this turn, the line ends in an arrow. Tap or click it to unfold this turn's steps right in the chat: its thinking, what it said along the way, the tools and MCP tools it called and its plan. Tap a tool to see its output or diff. A long turn scrolls inside the line, which keeps showing the newest step. On the terminal UI, press `>` or click the line. Each new turn starts folded, and the steps leave with the line when the bot finishes.
+The line ends in an arrow. Tap or click it to unfold this turn's steps right in the chat: its thinking, what it said along the way, the tools and MCP tools it called and its plan. Tap a tool to see its output or diff. A long turn scrolls inside the line, which keeps showing the newest step. On the terminal UI, press `>` or click the line. Each new turn starts folded, and the steps leave with the line when the bot finishes.
Everything else the agent did (its narration, thinking, tool calls, diffs and plans) is in **Full conversation**: