gemini-cli - 💡(How to fix) Fix Invoke custom commands in the context of custom commands [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26496Fetched 2026-05-06 06:36:08
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
commented ×1cross-referenced ×1issue_type_added ×1labeled ×1
RAW_BUFFERClick to expand / collapse

What would you like to be added?

I'd like to be able to invoke custom commands in the prompt of other custom commands

Why is this needed?

I thought that, for composability and maintainability, it would be better to treat custom commands as functions that can also be invoked by other functions.

For example, imagine that to accomplish an extensive task, I need to complete subtasks A, B, and C. I'd like to be able to run these subtasks on their own, or simply isolate them to fine-tune their individual performance.

To achieve this, I started configuring separate commands for tasks A, B, and C. I then tried to configure a command for the whole task and write instructions for it to trigger A, B, and C sequentially. However, I found no reliable way to do this. The only technical path seems to be copying and pasting the subtask prompts into the main task, which feels incorrect and inefficient.

Additional context

Already opened at #10713 and #18056, which were closed with no human in the loop

extent analysis

TL;DR

Enable custom command composability by allowing prompts to invoke other custom commands.

Guidance

  • Investigate existing command configuration options to determine if there's a built-in way to sequence or nest custom commands.
  • Explore alternative approaches, such as using a scripting language or a workflow management tool, to orchestrate the execution of subtasks A, B, and C.
  • Review the closed issues #10713 and #18056 to understand the previous discussions and potential solutions that were considered.
  • Consider proposing a new feature or enhancement to the custom command system to support composability and maintainability.

Example

No code snippet is provided as the issue does not contain specific technical details or code examples.

Notes

The solution may require changes to the underlying command system or the introduction of new features, which could have implications for the overall system architecture and user experience.

Recommendation

Apply workaround: Implement a scripting or workflow management solution to orchestrate the execution of subtasks, as this approach can provide a flexible and maintainable way to achieve the desired composability.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix Invoke custom commands in the context of custom commands [1 comments, 2 participants]