Repository navigation
Replies: 16 comments
|
A cheaper way to get this for Claude threads: the Claude Agent SDK already predicts the next prompt, T3 just does not switch it on.
I built the SDK-native version on a fork so it can be evaluated (or thrown away): main...getbrikly:t3code:feat/claude-prompt-suggestions What it contains (13 files, +458/−2, no new dependencies):
Deliberately not included:
Verified with targeted typecheck (contracts, server, web, mobile), |
|
Opened the SDK-native version as a PR, rebased onto today's main: #8524. Same shape as described above ( |
|
+1, would love to see this. It's one of the Claude Code features i miss most in T3. The smaller version described in the #8524 close note sounds right to me: keep the suggestion as ephemeral session state, add a toggle in Settings, and accept it with Tab or right arrow like in the Claude Code CLI. |
|
I opened a PR for the smaller version that the #8524 close note asked for: #17618. It uses the Claude Agent SDK's own
In the web and desktop apps the suggestion shows as ghost text in the empty composer. Right Arrow or Tab puts it in the draft without sending, as in the Claude Code CLI, and Esc hides it. It is cleared when the next turn starts, when a background wake starts, on rollback and when the session closes. It is Claude-only by construction. Suggestions for other providers would need the text-generation approach from the original post, which this PR does not attempt. Status: it is up to date with |
|
I'd like to help add Codex follow-up suggestions once 0.163 reaches stable, ideally reusing the opt-in, ephemeral suggestion state and composer behavior from #17618 in a separate Codex change. We verified an end-to-end path on For clarity, this uses prediction fork mode, not Would this be a welcome follow-up once 0.163 is stable? Happy to wait for #17618 and maintainer direction before proposing an upstream implementation. AI-assisted; the alpha fork flow was tested locally. |
|
I like the provider-independent direction of this proposal. We’ve been looking into related implementations, and a few findings seem relevant:
These findings suggest that native support will vary between agents and versions. Could suggestion generation sit behind a common interface, with three configurable options?
Our setup routes multiple providers through a shared relay. Being able to select one inexpensive suggestion model across Codex, Claude, OpenCode, and other integrations would be useful. Native and generic generation could share the same composer behavior, while avoiding duplicate requests. For the generic path, I’d suggest bounded context containing the task goal, recent relevant messages, and what the agent actually completed. Returning no suggestion should be a valid outcome, particularly when the task is finished. Requests should happen at most once per completed turn, only for the active conversation with an empty composer. Results should be discarded if the user starts typing or another turn begins. Accepting a suggestion should fill an editable draft without sending it, and unaccepted suggestions should stay out of conversation history. A small, explicit opt-in first version with one suggestion and a configurable suggestion model seems like a good starting point. Is an interchangeable generation interface compatible with the direction you envision here? |
|
Thanks both. #17618 should already work as the shared layer you describe: the server's @aj604 a separate Codex PR on top of that sounds right to me once 0.163 is stable. Since prediction fork mode is an extra turn on the user's own plan, I'd keep it behind its own off-by-default toggle per Codex instance, the same way Claude works. @ironyh I'd keep the generic "separate model" option out of the first version. I also had that idea but it adds a model call per turn and gets less context than the native path. If maintainers want it later, it could reuse the existing text-generation model setting as a fallback for providers without native suggestions, with a selector for preferred behaviour for all providers. In the end it's up to the maintainers whether they want this direction. |
|
#17618 was closed because upstream isn't taking feature PRs right now, which is fair. Until it lands upstream, I'm publishing a patched nightly on my fork for anyone who wants Claude prompt suggestions now: It's the official nightly with only the #17618 patch added. An hourly workflow picks up each new upstream nightly, applies the patch and builds macOS, Windows and Linux (x64 and arm64). A patched build usually follows the official one within an hour or two, with the same version number, and the app updates itself from my fork's releases. To use it, install it over your existing T3 Code (Nightly), then turn on Settings → Providers → Claude → Prompt suggestions. Claude Code itself decides when to offer a suggestion. It never offers one on the first turn of a new session, in plan mode, after an API error, or when your usage limit is reached, and close to the limit it holds them back unless you opt in. To keep them on as much as Claude allows, add this to {
"promptSuggestionEnabled": true,
"env": {
"CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": "true"
}
}The main limitations: it's unofficial (please report problems on my fork, not upstream), it only works for Claude in the desktop app, and it replaces the official Nightly instead of installing next to it. The full list, including notes for macOS, Windows and Linux, is in the README. Going back to the official nightly: download the newest |
|
👍 Moving my proposal here as Julius asked (closed #21429 as a duplicate). There's a draft implementation in #21428. It's the provider-independent version of this idea, shaped by the #8524 close note:
Design questions for maintainers:
|
|
I have an updated provider-independent implementation of this idea in PR #25652, building on the opt-in and ephemeral-state concerns discussed here. I’m linking it for design feedback; explicit maintainer approval of the direction and scope is still outstanding. The proposed interaction is grey text in the empty composer after an agent reply the user watched finish. Tab or Right Arrow inserts an editable draft and never sends it; Escape dismisses it. Accepting consumes the suggestion. Opening an old thread does not generate one. The current shape:
Local verification at For maintainers, the two decisions I’d like to settle are:
Happy to narrow or reshape the PR around the agreed direction. This is a request for product-direction feedback, not a claim that the feature has been approved. |
|
+1 — seconding this request. I would love composer predictions in T3 Code similar to the Codex experience: a suggested next prompt after a turn finishes, with Tab to accept it into an editable draft and Escape to dismiss. Accepting should never send automatically. This would make it easier to keep work moving without having to type every follow-up from scratch. |
|
+1 from a T3 Code Nightly user on macOS using Codex. This is the interaction I want from ChatGPT: after the assistant finishes, the empty composer automatically shows a context-aware follow-up message as faint ghost text, and I press Tab to accept it. My preferred behavior:
A simple example: after the agent explains a change, the composer could suggest “Can you verify this with a focused test?” I press Tab, adjust the wording if needed, and send. The suggestion itself must not start another agent turn or grant approval for an action. I saw the maintainer direction in #21429 to consolidate this request here, and the Claude-specific work in #9394. Adding my use case here rather than opening a duplicate. I would like to contribute toward this once maintainers agree on direction and scope. Customize the suggestion agent in SettingsPlease also expose a Follow-up suggestions settings section where I can:
These settings should apply only to suggestion generation, without changing the main conversation agent's instructions. The suggestion agent's job is to return proposed text; it should not execute tools or actions. If a provider-native suggestion mechanism does not support model or instruction customization, make that limitation explicit in Settings rather than implying those controls work. Choosing another provider should also make clear that conversation context will be sent to that provider and may incur additional usage. Prepared with Codex assistance. The reference screenshots contain private conversation details, so I have described the interaction instead of uploading them. No implementation or testing is claimed. |
|
Would still really love this feature 😃 |
|
This was picked up separately by Theo in #28047, which is now merged. It adds a Suggest next prompt option under Settings → Labs, off by default, for both Claude and Codex. Tab fills in the suggestion and Escape dismisses it. Mobile is listed as a follow-up. |
|
Following up on #28047 (thanks @t3dotgg). It shipped the built-in Claude and Codex suggestions behind Labs. This proposes one opt-in extension: a "My model" source, so a user can steer suggestions with a model and focus they choose. It's the shape @ironyh (Automatic / Separate model / Off) and @Abaans (choose provider and model, edit the suggestion agent's instructions) asked for above. I'm looking for direction and scope approval before opening anything. What it addsUnder Settings → Labs → Suggest next prompt:
See itSettings: source, model and effort, behaviors, and adding your own. t3-my-model-suggestions-1-settings.mp4In a thread: each suggestion appears in the empty composer after the turn, and Tab fills it in. t3-my-model-suggestions-2-in-a-thread.mp4The composer, Tab, Escape and staleness rules are #28047's, unchanged. My model writes into the same in-memory suggestion store through a new Cost and safety rails
Evidence (eval, 15 short conversations)
Real app checkThese results come from a dev server with a real Claude Haiku turn:
Settings showed "Recent suggestions took about 5 s". Size and scopeThe branch is on my fork: https://github.com/subhi229/t3code/tree/feat/custom-prompt-suggestions It covers server, contracts, client-runtime, the web Labs panel, docs and the eval. Tests cover the service (watching, gating, continuation skip, cancellation by a newer run, late updates for older runs, one paid request per run, queued messages, project behavior, failures, per-model speed), session-manager gating, settings resolution and the behavior options. Before posting, I had three models review the branch independently, and fixed what they agreed on between rounds:
One finding I left as is: when the suggestion model's provider is disabled for a project, it falls back to the text generation model the same way commit messages do. Changing that seems like a decision for all text generation, not this feature. Happy to cut scope. For example, the first PR could drop custom behaviors and per-project overrides and keep only Source, Model and the presets. Which shape, if any, would you accept? |
|
Thanks for shipping #28047. Suggest next prompt works well in my Claude and Codex threads. Could OpenCode threads get it too? On v0.1.9, turning on the Labs toggle and restarting the app still gives no suggestions in OpenCode threads. From the source, only the Claude and Codex adapters produce one. OpenCode doesn't seem to have a built-in prediction like Claude's |
Uh oh!
There was an error while loading. Please reload this page.
What
When a turn completes, T3 Code could propose the user's next prompt — a one-line "here's the natural next step from where the work left off" rendered above the composer. Tap to insert into the composer (never auto-send), or dismiss.
Claude Code has this and it carries real momentum: the moment a turn settles is exactly when the user has to re-derive context and decide what to ask next, and the assistant's own closing recommendations usually already contain the answer. Today the composer is just empty at that moment.
Proposed shape
generateNextPromptSuggestionoperation on the user's configured text-generation model. Returnssuggestion: string | null— null when there is no meaningful next step.💡 NEXT — <suggestion>), click-to-insert into the composer draft, dismissible. Fits alongside the plan-follow-up banner pattern.Working proof of concept
I built and tested this end-to-end on a fork branch, in case it helps evaluate the idea (or gets thrown away — that's fine too):
main...kakismash:t3code:feat/suggested-next-prompt
What it contains (+463/−15 across contracts, server, client-runtime, web):
orchestration.suggestNextPromptRPC (payload{threadId}, success{suggestion | null}), read scope inRpcAuthorizationgenerateNextPromptSuggestionon theTextGenerationservice, implemented for all five provider drivers, with prompt builder + sanitizer mirroringgenerateThreadTitleturnId,ComposerNextPromptSuggestionbanner, insert via the composer draft storeVerified working in a dev build: turn settles → suggestion generated by the configured text-gen model → banner renders → click inserts into the composer → draft persists. Full
apps/serversuite green (1812), typecheck clean across contracts/client-runtime/server/web.Deliberately not covered (awaiting your direction, per CONTRIBUTING)
Filing this as an issue first per CONTRIBUTING rather than a PR. Happy to adapt the branch to whatever shape you'd want — or drop it if this isn't a direction you want the product to go.
🤖 Generated with Claude Code
All reactions