[GH-ISSUE #1151] [BUG]: Agent chat triggered by @ in code prompts #707

Closed
opened 2026-02-22 18:20:55 -05:00 by yindo · 1 comment
Owner

Originally created by @Mitazaki on GitHub (Apr 20, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1151

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Using the @ symbol anywhere in the prompt seems to invoke the agent.

This makes prompts with code problematic

The following does not work as expected

class TestClass: 
@staticmethod def some_method(): 
      pass

And outputs

Swapping over to agent chat. Type /exit to exit agent execution loop early.

However removing the @ works

class TestClass: 
staticmethod def some_method(): 
      pass

Outputs

It seems like you are asking about a class named “TestClass” and its method “some_method”. Is there anything specific you would like to know about this class or method?

Are there known steps to reproduce?

Using @ anywhere in prompt triggers agent chat

Originally created by @Mitazaki on GitHub (Apr 20, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1151 Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? Using the @ symbol anywhere in the prompt seems to invoke the agent. This makes prompts with code problematic # The following does not work as expected ``` class TestClass: @staticmethod def some_method(): pass ``` And outputs ```Agent @staticmethod invoked. Swapping over to agent chat. Type /exit to exit agent execution loop early. ``` # However removing the @ works ``` class TestClass: staticmethod def some_method(): pass ``` Outputs ``` It seems like you are asking about a class named “TestClass” and its method “some_method”. Is there anything specific you would like to know about this class or method? ``` ### Are there known steps to reproduce? Using @ anywhere in prompt triggers agent chat
yindo added the bug label 2026-02-22 18:20:55 -05:00
yindo closed this issue 2026-02-22 18:20:55 -05:00
Author
Owner

@ShadowArcanist commented on GitHub (Apr 20, 2024):

Image of what happens when you have @ anywhere in the input message

image

Note 1: This image is just a supporting image for this Issue as the Original Poster didn't attached any images
Note 2: Kindly ignore the error message saying "Incorrect API Key" (I just entered some random words as API Key)

@ShadowArcanist commented on GitHub (Apr 20, 2024): Image of what happens when you have @ anywhere in the input message ![image](https://github.com/Mintplex-Labs/anything-llm/assets/162910371/a225f39c-ee6a-412a-9e27-59629deab733) Note 1: This image is just a supporting image for this Issue as the Original Poster didn't attached any images Note 2: Kindly ignore the error message saying "Incorrect API Key" (I just entered some random words as API Key)
yindo changed title from [BUG]: Agent chat triggered by @ in code prompts to [GH-ISSUE #1151] [BUG]: Agent chat triggered by @ in code prompts 2026-06-05 14:36:46 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#707