alfin06/swegent-issues-filtered huggingface dataset:
Regression: Positional prompt argument is still ignored with other flags

### What happened?

When providing a prompt as a positional argument along with other flags (e.g., `gemini -e none "Hello, world!"`), the Gemini CLI ignores the positional prompt and enters interactive mode. It displays the Gemini logo and does not process the prompt.

This is a regression of issue #8689.


### What did you expect to happen?

The CLI should process "Hello" as the prompt and return a response, even when other flags are present. The expected behavior is that the CLI processes the positional prompt regardless of other flags being present, consistent with how it works when no other flags are provided (`gemini Hello`).


### Client information

<details>
<summary>Client Information</summary>

Run `gemini` to enter the interactive CLI, then run the `/about` command.

```console
> /about

╭───────────────────────────────────────────────────────────────────────────────────╮
│                                                                                   │
│ About Gemini CLI                                                                  │
│                                                                                   │
│ CLI Version                 0.8.0-nightly.20250925.b1da8c21-git.11c995e9          │
│ Git Commit                  11c995e9                                              │
│ Model                       auto                                                  │
│ Sandbox                     no sandbox                                            │
│ OS                          linux                                                 │
│ Auth Method                 gemini-api-key                                        │
│                                                                                   │
╰───────────────────────────────────────────────────────────────────────────────────╯

```

</details>

### Login information

Gemini API Key


### Anything else we need to know?

This issue was previously reported in #8689 and was supposedly fixed in PR #9004. However, the issue still persists in the latest nightly build. As per my conversation with @allenhutchison, I'm filing this new issue since I don't have permissions to reopen the original one.


Labels: status/need-triage
State: closed
Add ability to list the paths for GEMINI.md files in use

### What would you like to be added?

I'd like the ability to know which GEMINI.md files are in used by hierarchical memory including their location. 

### Why is this needed?

This will be useful to troubleshot complex hierarchical memory situations as well as scenarios where the GEMINI.md files are not located in the project directory (e.g. long term memory in ~./.gemini).

### Additional context

_No response_

Labels: priority/p2, area/core
State: closed
System message not passed to Gemini as system_instruction

Request from [Discord](https://discord.com/channels/1153072414184452236/1340473517837389898/1340473517837389898)

> I'm exploring the use of Gemini for creating agents. Currently, the system_message of the ConversableAgent is being sent to the GeminiClient as the first message with the role "system."
>
> Since Gemini supports system instructions according to their documentation (https://ai.google.dev/gemini-api/docs/text-generation#system-instructions), do you think sending the system_message as a system_instruction could potentially be more effective?
>
> My current workaround is to convert the first message of "system" role to system_instruction, as shown in the screenshot.

![Image](https://github.com/user-attachments/assets/12cc2fb2-372e-46ae-be84-7cffe53059bb)

Labels: enhancement, good first issue
State: closed
Remove ambiguity around EDIT_NO_CHANGE error

### What would you like to be added?

Previously, the edit tool had two different paths in which this error could be surfaced. One where the old string matched the new string when invoking the replace tool. The other where an LLM healing loop determined on its own that the change was already present in the file. We can remove ambiguity by introducing a new error for the latter scenario, EDIT_NO_CHANGE_LLM_JUDGEMENT.

### Why is this needed?

This is needed so we can better troubleshoot what is happening during edit tool use failures.

### Additional context

_No response_

Labels: status/need-triage
State: closed
Introduce last edited check to Smart Edit

### What would you like to be added?

In the case when a file has been edited by a user or an external process since the agent last edited the file, we should a.) detect this in Smart Edit, and b.) ensure the tool sees the new version of this content during the healing process.

### Why is this needed?

This can help reduce EDIT_NO_OCCURRENCE errors, but also scenarios where an edit is successful but clobbers user or external tool edits that have been made since the agent last made changes.

### Additional context

_No response_

Labels: priority/p2, area/agent
State: closed
Support Gemini CLI extensions (MCP prompts) in headless/non-interactive mode

### What would you like to be added?

If I've configured extensions with Gemini CLI extensions. I want to be able to invoke these extension commands headlessly in automated, non-interactive contexts.

1. Consider the Gemini CLI extensions in this blog post, `/security:analyze` and `/deploy`: https://cloud.google.com/blog/products/ai-machine-learning/automate-app-deployment-and-security-analysis-with-new-gemini-cli-extensions
2. Assume I have configured these extensions in my gemini installations.
3. Run `gemini -p "/security:analyze Analyze the .jar files in the artifacts/ directory"

I'm happy to implement this or expand on this (I work in Google Cloud as well, happy to chat about a practical use case).

### Why is this needed?

This adds another access point for Gemini CLI extensions, allowing them to be leveraged in non-interactive, automated contexts (think CICD workflows, particularly ones that are not necessarily Github-native, or locally scripted workflows).

### Additional context

_No response_

Labels: priority/p2, area/non-interactive
State: closed
Loop mixing and duplicating received items

### Bug Description

When a loop receives a table, it shuffles items from different rows.

When a dataframe is passed to the loop, each row is expected to be executed separately, but that's not happening.

### Reproduction

1. Create a flow with a loop.
2. Create more than one branch after the loop.
3. Add a dataframe with more than one column.
4. Run the flow and see items from different lines being shuffled.

### Expected behavior

The rows of a dataframe must be executed in isolation and uniquely within the loop.

### Who can help?

[loop - Sheet1.csv](https://github.com/user-attachments/files/22797218/loop.-.Sheet1.csv)
[loop.json](https://github.com/user-attachments/files/22797219/loop.json)

### Operating System

Linus

### Langflow Version

1.6.4 and Main

### Python Version

3.12

### Screenshot

_No response_

### Flow File

https://github.com/user-attachments/assets/b571865b-3eaa-438d-a097-5fbe1107fa37

Labels: bug
State: closed
[BUG] Opaque Pydantic error when ToolContext is provided with mismatched parameter name

### Checks

- [x] I have updated to the lastest minor and patch version of Strands
- [x] I have checked the documentation and this is not expected behavior
- [x] I have searched [./issues](./issues?q=) and there are no duplicates of my issue

### Strands Version

1.11.0

### Python Version

3.13.3

### Operating System

macOs 15.6.1

### Installation Method

pip

### Steps to Reproduce

```python
# test.py
from strands import Agent, tool, ToolContext

@tool(context=True)
def test(context: ToolContext) -> dict:
    return {"success": True, "message": "The tool is working!"}

```

```
$ uv run test.py
Traceback (most recent call last):
  File "/Users/lilja/code/connector-agents/connector-agents/test.py", line 3, in <module>
    @tool(context=True)
     ~~~~^^^^^^^^^^^^^^
  File "/Users/lilja/code/connector-agents/connector-agents/.venv/lib/python3.13/site-packages/strands/tools/decorator.py", line 636, in decorator
    tool_spec = tool_meta.extract_metadata()
  File "/Users/lilja/code/connector-agents/connector-agents/.venv/lib/python3.13/site-packages/strands/tools/decorator.py", line 175, in extract_metadata
    input_schema = self.input_model.model_json_schema()
  File "/Users/lilja/code/connector-agents/connector-agents/.venv/lib/python3.13/site-packages/pydantic/main.py", line 555, in model_json_schema
    return model_json_schema(
        cls, by_alias=by_alias, ref_template=ref_template, schema_generator=schema_generator, mode=mode
    )
  File "/Users/lilja/code/connector-agents/connector-agents/.venv/lib/python3.13/site-packages/pydantic/json_schema.py", line 2407, in model_json_schema
    cls.__pydantic_core_schema__.rebuild()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/Users/lilja/code/connector-agents/connector-agents/.venv/lib/python3.13/site-packages/pydantic/_internal/_mock_val_ser.py", line 67, in rebuild
    raise PydanticUserError(self._error_message, code=self._code)
pydantic.errors.PydanticUserError: `TestTool` is not fully defined; you should define `Agent`, then call `TestTool.model_rebuild()`.

For further information visit https://errors.pydantic.dev/2.11/u/class-not-fully-defined
````

### Expected Behavior

-

### Actual Behavior

-

### Additional Context

_No response_

### Possible Solution

_No response_

### Related Issues

_No response_

Labels: bug, ready for contribution
State: closed
Flow with an agent throws a parent run not found exception

### Bug Description

Testing a flow with an agent throws a parent run not found exception. 

[FlowIssueParentRunNotFound.json](https://github.com/user-attachments/files/22882474/FlowIssueParentRunNotFound.json)

### Reproduction

A bare bones sample flow has been provided to reproduce the error. 

[FlowIssueParentRunNotFound.json](https://github.com/user-attachments/files/22882496/FlowIssueParentRunNotFound.json)

### Expected behavior

Setting of attributes or variables so that no exception is thrown.

### Who can help?

_No response_

### Operating System

MacOS 15.7

### Langflow Version

1.6.0

### Python Version

3.12

### Screenshot

_No response_

### Flow File

[FlowIssueParentRunNotFound.json](https://github.com/user-attachments/files/22882588/FlowIssueParentRunNotFound.json)

Labels: bug
State: closed
Metrics for healing loops in a tool

### What would you like to be added?

We should log/track when smart edit (or any other tool) performs self healing, and should track latency of that healing loop.

### Why is this needed?

This will help us understand at what frequency this occurs and what latency it introduces to the user.

### Additional context

_No response_

Labels: priority/p2, area/agent
State: closed
MCP servers with only prompts (no tools) cause "tools not supported" error

### What happened?

When using an MCP server that only provides prompts and no tools (like https://github.com/vasayxtx/mcp-prompt-engine), gemini-cli logs an error during discovery:

`Error discovering tools from <mcp_server_name>: MCP error -32601: tools not supported`

This error appears in the debug console even though the MCP server is functioning correctly and its prompts are being discovered successfully.

**Root Cause**

The issue is in `packages/core/src/tools/mcp-client.ts` in the `discoverTools()` function. It calls `mcpToTool()` without first checking if the server supports tools via `getServerCapabilities()?.tools`. When a prompt-only server doesn't implement the `tools/list` method, it returns error code -32601 (Method not found).

Reproduction

1. Configure an MCP server that only provides prompts
2. Run gemini-cli
3. Observe the error message in the Debug Console (ctrl+o)

Related
- Similar issue for prompts was fixed in PR #5616
- Original issue reported: https://github.com/vasayxtx/mcp-prompt-engine/issues/31

### What did you expect to happen?

Similar to how `discoverPrompts()` checks for prompt support:
`if (mcpClient.getServerCapabilities()?.prompts == null) return [];`

The `discoverTools()` function should check for tool support before attempting to call `mcpToTool()`, and silently return an empty array if tools are not supported.



### Client information

<details>
<summary>Client Information</summary>

Run `gemini` to enter the interactive CLI, then run the `/about` command.

```console
> /about
╭──────────────────────────────────────────────────────────────────────────────────╮
│                                                                                  │
│ About Gemini CLI                                                                 │
│                                                                                  │
│ CLI Version                 0.6.1                                                │
│ Git Commit                  f3078136                                             │
│ Model                       gemini-2.5-pro                                       │
│ Sandbox                     no sandbox                                           │
│ OS                          darwin                                               │
│ Auth Method                 OAuth                                                │
│                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────╯
```

</details>

### Login information

_No response_

### Anything else we need to know?

_No response_

Labels: priority/p2
State: closed
docs/ai-rsc: model gpt-4-turbo does not exist

### Description

Simply copying & pasting the example from concepts/generative-ui uses the `gpt-4-turbo` model which doesn't exist, should be updated to either `gpt-4-0125-preview` which is the latest gpt-4-turbo checkpoint.

```json
  error: {
    message: 'The model `gpt-4-turbo` does not exist',
    type: 'invalid_request_error',
    param: null,
    code: 'model_not_found'
  },
```

State: closed
Day summary message formatting

have a fixed structure returned from the backend, force gpt to follow a specific structure
![Image](https://github.com/user-attachments/assets/e7e5118f-3753-4db5-8da1-300022fc9487)


State: closed
[Feature Request]: Add support for LiteLLM and add user guide for it

### Is your feature request related to a problem? Please describe.

Original request from [Discord](https://discord.com/channels/1153072414184452236/1206149596376731722/1342346808084529183)

- [x] (ALREADY SUPPORTED) Add support for LiteLLM if it isn't already supported
- [x] Add User Guide on how to use it

### Describe the solution you'd like

_No response_

### Additional context

_No response_

Labels: enhancement
State: closed
[Bug] RC21: Session Lifecycle Regression - Duplicate Sessions Created

## Problem
Every MCP `run` currently creates TWO sessions with different UUIDs, causing session pollution.

## Details
- Location: background-launcher.ts:70
- Current Behavior: Uses V1 format (liveStore.agents)
- Expected Behavior: Use V2 format (liveStore.sessions)
- Impact: Breaks CLI reliability, creates unnecessary session entries

## Proposed Fix
- Update background-launcher.ts:70 to use liveStore.sessions instead of liveStore.agents
- Ensure one unique session is created per run
- Validate unique UUID generation and background polling

## QA Validation
- Verify single session creation across different scenarios
- Test with clean slate and post-rebuild environments
- Ensure all CLI validation tests pass

## Risks
- Potential side effects in session management
- Careful validation required to prevent breaking changes

## Related Sessions
See SESSION-STATE.md entries for RC21 QA Group B and RC21 Hotfix Plan

State: closed
--allowed-tools="ShellTool(...)" does not do substring matching in non-interactive mode.

### What happened?

The following behavior does not have parity with interactive mode (which will apply substring matching):

```sh
$ gemini --prompt="use wc to tell me how many lines there are in /proc/meminfo"
I will use `wc -l` to count the number of lines in `/proc/meminfo`.Error executing tool run_shell_command: Command "wc -l /proc/meminfo" is not in the list of allowed tools for non-interactive mode.
I am sorry, I cannot fulfill your request. The `wc` command is not available in my current environment.
$ cat ~/.gemini/settings.json
{
  "tools": {
    "allowed": [
      "ShellTool(wc -l)"
    ]
  }
}
```

### What did you expect to happen?

```sh
$ gemini --prompt="use wc to tell me how many lines there are in /proc/meminfo"
I will use `wc -l` to count the number of lines in `/proc/meminfo`.
There are 55 lines in /proc/meminfo.
$ cat ~/.gemini/settings.json
{
  "tools": {
    "allowed": [
      "ShellTool(wc -l)"
    ]
  }
}
```

### Client information

<details>
<summary>Client Information</summary>

Run `gemini` to enter the interactive CLI, then run the `/about` command.

```console
> /about
╭──────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                              │
│ About Gemini CLI                                                                             │
│                                                                                              │
│ CLI Version                     0.10.0-nightly.20251007.c195a9aa-git.c82c2c2b                │
│ Git Commit                      c82c2c2b                                                     │
│ Model                           gemini-2.5-pro                                               │
│ Sandbox                         no sandbox                                                   │
│ OS                              linux                                                        │
│ Auth Method                     gemini-api-key                                               │
│                                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────╯
```

</details>

### Login information

API key

### Anything else we need to know?

_No response_

Labels: priority/p2, area/non-interactive
State: closed
Inconsistent auth handling between Interactive and Non-interactive mode

### What happened?

In non-interactive mode, if GEMINI_API_KEY is set, it overrides any previously configured OAuth method.

### What did you expect to happen?

use oauth if GEMINI_API_KEY is set

### Client information

<details>
<summary>Client Information</summary>

Run `gemini` to enter the interactive CLI, then run the `/about` command.

```console
> /about
# paste output here
```

</details>

### Login information

_No response_

### Anything else we need to know?

_No response_

Labels: priority/p1, area/core, area/non-interactive
State: closed
run_shell_command integration tests are borked

### What happened?

These tests are totally broken, they aren't passing the arguments they think they are passing (due to existing static errors), yolo mode is enabled making them totally irrelevant, and they also pass even if the tool calls do fail.

They need a big overhaul.

### What did you expect to happen?

They should actually validate the behavior they intend to.

### Client information

<details>
<summary>Client Information</summary>

Run `gemini` to enter the interactive CLI, then run the `/about` command.

```console
> /about
# paste output here
```

</details>

### Login information

_No response_

### Anything else we need to know?

_No response_

Labels: priority/p1
State: closed
Inefficient Chat Compression Logic for Single-Message History

## Description

The `tryCompressChat` function in `packages/core/src/core/client.ts` attempts to
compress the chat history if it exceeds a certain token threshold.

In certain scenarios, such as when the history contains only a single, large
context message, the `findCompressSplitPoint` function returns 0. This results
in `historyToCompress` being an empty array.

The code then proceeds to make an API call to the model to summarize this empty
`historyToCompress`. This is an unnecessary API call that wastes resources, adds
latency, and could potentially result in an error from the API.

## Location

`packages/core/src/core/client.ts` within the `tryCompressChat` method.

## Proposed Solution

Add a check after `historyToCompress` is calculated. If it is empty, return a
`NOOP` status immediately to avoid the unnecessary API call.

```typescript
// packages/core/src/core/client.ts

// ... after findCompressSplitPoint

const historyToCompress = curatedHistory.slice(0, splitPoint);
const historyToKeep = curatedHistory.slice(splitPoint);

// Add this check
if (historyToCompress.length === 0) {
  return {
    originalTokenCount,
    newTokenCount: originalTokenCount,
    compressionStatus: CompressionStatus.NOOP,
  };
}

const summaryResponse = await this.config;
// ...
```

This change ensures that compression is only attempted when there is actual conversation history to compress beyond the initial context.


State: closed
claude code version should be pinned instead of "@latest"

In the "Execute Claude Code CLI" step, the claude code CLI version should be pinned

State: closed
feat(auth): Improve GEMINI_API_KEY not found error message

**Description:**

Currently, when the `GEMINI_API_KEY` is not set, the CLI displays a generic error message that is not very helpful for new users. This subtask is to update the error message to provide clear, actionable guidance.

**Acceptance Criteria:**

- The error message for a missing `GEMINI_API_KEY` should be updated in `packages/cli/src/config/auth.ts`.
- The new message should:
  1.  Clearly state that the `GEMINI_API_KEY` was not found.
  2.  Provide a direct link to `https://aistudio.google.com/apikey` for users to find their existing key or generate a new one.
  3.  Instruct the user on the immediate next steps required to authenticate (e.g., set the environment variable or add the key to a `.env` file).

**New Error Message:**
```
GEMINI_API_KEY not found. Find your existing key or generate a new one at: https://aistudio.google.com/apikey

To continue, please set the GEMINI_API_KEY environment variable or add it to a .env file.
```

State: closed
executeCommand endpoint in a2a server

### What would you like to be added?

The executeCommand endpoint would expose some slash command logic for use by a2a server clients

### Why is this needed?

Agent Mode GA for Gemini Code Assist

### Additional context

_No response_

State: closed
Fix flaky json-output.test.ts: should not exit on tool errors and allow model to self-correct in JSON mode

**Test File**: `integration-tests/json-output.test.ts`
**Test Name**: `should not exit on tool errors and allow model to self-correct in JSON mode`
**Testing Behavior**: Tests that the CLI does not exit on tool errors in JSON mode and allows the model to self-correct.

**Status**:
- Skipped: true
- Needs Model Call: true
- Currently Has Model Call: true

**Recommendation**:
Use a more flexible regex for the error message and focus on verifying the structure of the final JSON output (e.g., presence of `response` and `stats.tools.totalFail: 1`) rather than the exact text.

State: closed