[GH-ISSUE #188] terminal tool failed #73

Closed
opened 2026-06-06 22:08:58 -04:00 by yindo · 3 comments
Owner

Originally created by @ilkeramiz on GitHub (Mar 10, 2026).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/188

When using tools like nmap, Gobuster, and nikto during any vulnerability scan, the process constantly shows a "level=error msg="terminal tool failed" error="timeout value is too low, use greater value if you need so: context deadline exceeded: temporary output: " result=tool=terminal" error, causing the flow to pause even when it's on automatic.

Image
Originally created by @ilkeramiz on GitHub (Mar 10, 2026). Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/188 When using tools like nmap, Gobuster, and nikto during any vulnerability scan, the process constantly shows a "level=error msg="terminal tool failed" error="timeout value is too low, use greater value if you need so: context deadline exceeded: temporary output: " result=tool=terminal" error, causing the flow to pause even when it's on automatic. <img width="1632" height="50" alt="Image" src="https://github.com/user-attachments/assets/b46d1b56-2cb7-47d6-abb8-5412bc3595b9" />
yindo closed this issue 2026-06-06 22:08:58 -04:00
Author
Owner

@asdek commented on GitHub (Mar 10, 2026):

hey @ilkeramiz

it's not an error in the product, because LLM can choose this option in the call and this error message notify LLM to increase it for next call

<!-- gh-comment-id:4030585509 --> @asdek commented on GitHub (Mar 10, 2026): hey @ilkeramiz it's not an error in the product, because LLM can choose this option in the call and this error message notify LLM to increase it for next call
Author
Owner

@mason5052 commented on GitHub (Mar 10, 2026):

The terminal timeout symptoms here may be related to the detached context cancellation bug described in #176, where long-running commands inherit the parent context and get canceled prematurely. PR #179 addresses that root cause by isolating the detached command context -- it may resolve or reduce these timeout errors for tools like nmap and gobuster, though there could be other contributing factors as well.

<!-- gh-comment-id:4033306525 --> @mason5052 commented on GitHub (Mar 10, 2026): The terminal timeout symptoms here may be related to the detached context cancellation bug described in #176, where long-running commands inherit the parent context and get canceled prematurely. PR #179 addresses that root cause by isolating the detached command context -- it may resolve or reduce these timeout errors for tools like nmap and gobuster, though there could be other contributing factors as well.
Author
Owner

@asdek commented on GitHub (Mar 19, 2026):

hey @ilkeramiz @mason5052

thanks for the report!

there are actually two scenarios with terminal tool execution:

1. synchronous execution (detach=false)

  • the agent executes a command synchronously and allocates a specific timeout for completion
  • if the command doesn't finish within that timeout, you'll see the error message from your screenshot
  • this is expected behavior - the agent receives this error, learns from it, and on the next call either:
    • increases the timeout value
    • switches to asynchronous mode (detach=true)
    • chooses another approach

2. asynchronous execution (detach=true)

  • this is what @mason5052 fixed in #179
  • previously, there was a bug where detached commands inherited the parent context and got canceled prematurely even with detach=true
  • this has been fixed in the latest version - thanks @mason5052!

bottom line: occasional timeout errors like the ones in your screenshot are normal and part of the agent's learning process. the agent sees the same error message, adapts its strategy. this feedback loop helps the agent optimize its approach to long-running scans.

if you're seeing these errors frequently on the same commands after the agent has had a chance to adjust, that might indicate a different issue. but sporadic timeouts during initial scan attempts are expected behavior.

<!-- gh-comment-id:4093827377 --> @asdek commented on GitHub (Mar 19, 2026): hey @ilkeramiz @mason5052 thanks for the report! there are actually two scenarios with terminal tool execution: **1. synchronous execution (detach=false)** - the agent executes a command synchronously and allocates a specific timeout for completion - if the command doesn't finish within that timeout, you'll see the error message from your screenshot - **this is expected behavior** - the agent receives this error, learns from it, and on the next call either: - increases the timeout value - switches to asynchronous mode (detach=true) - chooses another approach **2. asynchronous execution (detach=true)** - this is what @mason5052 fixed in #179 - previously, there was a bug where detached commands inherited the parent context and got canceled prematurely even with detach=true - this has been fixed in the latest version - thanks @mason5052! **bottom line**: occasional timeout errors like the ones in your screenshot are **normal** and part of the agent's learning process. the agent sees the same error message, adapts its strategy. this feedback loop helps the agent optimize its approach to long-running scans. if you're seeing these errors **frequently** on the same commands after the agent has had a chance to adjust, that might indicate a different issue. but sporadic timeouts during initial scan attempts are expected behavior.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#73