code-yeongyu / code-yeongyu/senpi

`/thinking` is listed in autocomplete and /help but is sent to the model as a user message

Open
#1,437 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
429
Forks
98
Avg merge
5h 3m
Merged PRs (30d)
526

Description

### What happened?

`/thinking` and `/thinking high` in the interactive TUI do not change the thinking level. The text is submitted to the model as an ordinary user message (queued as a steering message while a response is streaming). Autocomplete still offers `/thinking `, `/help` lists `/thinking — Set thinking level`, and the 2026.8.25 changelog announces the command.

Cause: `BUILTIN_SLASH_COMMANDS` (`packages/coding-agent/src/core/slash-commands.ts`) advertises `thinking`, but `interactive-mode.ts` has no matching dispatch, so the input falls through to `session.prompt(text)`. Upstream commit 496185f6 added the metadata together with the handler (`/thinking` branch, argument completions, `handleThinkingCommand`, `showThinkingSelector`); the sync merge 463279038 (#1119) kept the metadata but dropped the handler (`git diff 463279038^2 463279038 -- packages/coding-agent/src/modes/interactive/interactive-mode.ts`). `/reasoning`, `/efforts` (#894) and Shift+Tab are unaffected.

### Steps to reproduce

Isolated agent dir whose `models.json` points a `mock` provider at a local OpenAI-compatible server, so the request body is visible. Reproduced with `-ne` (bundled extensions only) and with the omo-ai plugin loaded.

1. `senpi -ne --provider mock --model mock-model`
2. Type `/thinking high`, Enter.
3. While the reply is streaming, type `/thinking`, Enter.
4. For comparison: `/efforts high`, `/reasoning`, Shift+Tab.

Observed: step 2 sends a request whose user message is `/thinking high` and the footer keeps the previous level; step 3 appends `/thinking` as a user message to the next request; step 4 notifies and sends nothing.

### Expected behavior

`/thinking` opens the thinking-level selector; `/thinking high` sets the session level (footer `:high`, status "Thinking level: high") with no model request; an unknown level lists the available levels — the behavior of upstream 496185f6.

### Version

First hit on 2026.9.6 (omo-ai beta.45). Reproduced at runtime on npm 2026.9.7 and on `main` from source (2bbaae41d). Every tag from v2026.8.25 (first with 463279038) through v2026.9.7, and `main` d449726a, carries the metadata without the handler; v2026.8.24 has neither.

I'd like to send a PR restoring the upstream dispatch and handlers with a regression test (or, if `/thinking` is meant to be retired in favor of `/reasoning` + `/efforts`, removing the stale `thinking` entry instead).

Contributor guide

Open the contributing guide

Research direction

Start in packages/coding-agent/src/modes/interactive/interactive-mode.ts and compare its slash-command dispatch with upstream commit 496185f6; review the thinking metadata in packages/coding-agent/src/core/slash-commands.ts. Reproduce with `senpi -ne --provider mock --model mock-model`, then add a regression test covering `/thinking` and `/thinking high`. Done means the selector or level update occurs without sending a model request, while unknown levels list available levels.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.