[GH-ISSUE #48] [Bug]: Stop Button Does Not Interrupt Flow During LLM Conversation #27

Closed
opened 2026-06-06 22:08:05 -04:00 by yindo · 1 comment
Owner

Originally created by @VictoryLN on GitHub (Jun 30, 2025).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/48

Originally assigned to: @asdek on GitHub.

Affected Component

Other (please specify in the description)

Describe the bug

Clicking the "Stop" button in the PentAGI frontend does not actually interrupt the flow. Based on my testing, when the flow reaches a step involving an LLM conversation (such as custom-generation-ex, though I am not completely sure), the stop action does not take effect. The flow continues to wait for the LLM response and cannot be interrupted or redirected to user input.

Steps to Reproduce

  1. Start PentAGI and run a flow that includes an LLM conversation step (e.g., custom-generation-ex).
  2. When the flow is waiting for the LLM response, click the "Stop" button.
  3. The UI shows "PentAGI is working... Click Stop to interrupt", but the flow does not actually stop and continues waiting for the LLM.

System Configuration

PentAGI Version:

vxcontrol/pentagi:0.3.0

Deployment Type:

  • Docker Compose
  • Custom Deployment

Environment:

  • Docker Version: Docker version 27.1.1, build 6312585
  • Docker Compose Version: Docker Compose version v2.29.1-desktop.1
  • Host OS: Windows 11
  • Available Resources:
    • RAM: 48G
    • CPU: 20C
    • Disk Space: 90G

Enabled Features:

  • Langfuse Analytics
  • Grafana Monitoring
  • Custom LLM Server

Active Integrations:

  • LLM Provider: Custom
  • Search Systems: google

ENV

# PentAGI Environment Variables

CORS_ORIGINS=http://localhost:*,https://localhost:*

COOKIE_SIGNING_SALT=salt # change this to improve security

# Allow to interact with user while executing tasks
ASK_USER=

## LLM Providers
OPEN_AI_KEY=
OPEN_AI_SERVER_URL=

ANTHROPIC_API_KEY=
ANTHROPIC_SERVER_URL=https://api.anthropic.com/v1

## Custom LLM provider
LLM_SERVER_URL=https://api.deepseek.com/v1
LLM_SERVER_KEY=sk-xxxxxxx
LLM_SERVER_MODEL=deepseek-reasoner
LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/deepseek.provider.yml

## Embedding
EMBEDDING_URL=http://host.docker.internal:11434
EMBEDDING_KEY=
EMBEDDING_MODEL=nomic-embed-text
EMBEDDING_PROVIDER=ollama
EMBEDDING_BATCH_SIZE=
EMBEDDING_STRIP_NEW_LINES= 

## HTTP proxy to use it in isolation environment
PROXY_URL=

## Scraper URLs and settings
SCRAPER_PUBLIC_URL=
SCRAPER_PRIVATE_URL=https://someuser:somepass@scraper/
LOCAL_SCRAPER_USERNAME=someuser
LOCAL_SCRAPER_PASSWORD=somepass
LOCAL_SCRAPER_MAX_CONCURRENT_SESSIONS=10

## Web server settings
PUBLIC_URL=https://localhost:8443
STATIC_DIR=
STATIC_URL=
SERVER_PORT=8443
SERVER_HOST=0.0.0.0
SERVER_SSL_CRT=
SERVER_SSL_KEY=
SERVER_USE_SSL=true

## OAuth google
OAUTH_GOOGLE_CLIENT_ID=
OAUTH_GOOGLE_CLIENT_SECRET=

## OAuth github
OAUTH_GITHUB_CLIENT_ID=
OAUTH_GITHUB_CENT_SECRET=

## Google search engine API
GOOGLE_API_KEY=[Google API Key]
GOOGLE_CX_KEY=[Google CX Key]

## Traversaal search engine API
TRAVERSAAL_API_KEY=

## Tavily search engine API
TAVILY_API_KEY=

## Perplexity search engine API
PERPLEXITY_API_KEY=
PERPLEXITY_MODEL=
PERPLEXITY_CONTEXT_SIZE=

## Langfuse observability settings
LANGFUSE_BASE_URL=http://langfuse-web:3000
LANGFUSE_PROJECT_ID=cm47619l0000872mcd2dlbqwb
LANGFUSE_PUBLIC_KEY=pk-lf-00001000-0000-0000-0000-000000000000
LANGFUSE_SECRET_KEY=sk-lf-00004000-0000-0000-0000-000000000000

## OpenTelemetry observability settings
OTEL_HOST=otelcol:8148

## Docker client settings to run primary terminal container
DOCKER_HOST=unix:///var/run/docker.sock
DOCKER_TLS_VERIFY=
DOCKER_CERT_PATH=

## Docker settings inside primary terminal container
DOCKER_INSIDE=true # enable to use docker socket
DOCKER_NET_ADMIN=true # enable to use net_admin capability
DOCKER_SOCKET=/var/run/docker.sock # path on host machine
DOCKER_NETWORK=pentagi-network # must be exist
DOCKER_PUBLIC_IP=0.0.0.0 # public ip of host machine
DOCKER_WORK_DIR=/pentools
DOCKER_DEFAULT_IMAGE=pentagi-kali

# Postgres (pgvector) settings
PENTAGI_POSTGRES_USER=postgres
PENTAGI_POSTGRES_PASSWORD=postgres # change this to improve security
PENTAGI_POSTGRES_DB=pentagidb


# Langfuse Environment Variables

## Langfuse Postgres
LANGFUSE_POSTGRES_USER=postgres
LANGFUSE_POSTGRES_PASSWORD=postgres # change this to improve security
LANGFUSE_POSTGRES_DB=langfuse
LANGFUSE_POSTGRES_VERSION=16

## Langfuse Clickhouse
LANGFUSE_CLICKHOUSE_USER=clickhouse
LANGFUSE_CLICKHOUSE_PASSWORD=clickhouse # change this to improve security
LANGFUSE_CLICKHOUSE_URL=http://langfuse-clickhouse:8123
LANGFUSE_CLICKHOUSE_MIGRATION_URL=clickhouse://langfuse-clickhouse:9000
LANGFUSE_CLICKHOUSE_CLUSTER_ENABLED=false

## Langfuse S3
LANGFUSE_S3_BUCKET=langfuse
LANGFUSE_S3_REGION=auto
LANGFUSE_S3_ACCESS_KEY_ID=accesskey # change this to improve security
LANGFUSE_S3_SECRET_ACCESS_KEY=secretkey # change this to improve security
LANGFUSE_S3_ENDPOINT=http://langfuse-minio:9000
LANGFUSE_S3_FORCE_PATH_STYLE=true
LANGFUSE_S3_EVENT_UPLOAD_PREFIX=events/
LANGFUSE_S3_MEDIA_UPLOAD_PREFIX=media/

## Langfuse Redis
LANGFUSE_REDIS_HOST=langfuse-redis
LANGFUSE_REDIS_PORT=6379
LANGFUSE_REDIS_AUTH=redispassword # change this to improve security

## Langfuse web app security settings
LANGFUSE_SALT=salt # change this to improve security
LANGFUSE_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000 # change this to improve security

## Langfuse web app nextauth settings
LANGFUSE_NEXTAUTH_URL=http://localhost:4000
LANGFUSE_NEXTAUTH_SECRET=secret # change this to improve security

## Langfuse extra settings
LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=true
LANGFUSE_TELEMETRY_ENABLED=false
LANGFUSE_LOG_LEVEL=info

## Langfuse init settings
LANGFUSE_INIT_ORG_ID=ocm47619l0000872mcd2dlbqwb
LANGFUSE_INIT_ORG_NAME=PentAGI Org
LANGFUSE_INIT_PROJECT_ID=cm47619l0000872mcd2dlbqwb
LANGFUSE_INIT_PROJECT_NAME=PentAGI
LANGFUSE_INIT_PROJECT_PUBLIC_KEY=pk-lf-00001000-0000-0000-0000-000000000000 # change this to improve security
LANGFUSE_INIT_PROJECT_SECRET_KEY=sk-lf-00004000-0000-0000-0000-000000000000 # change this to improve security
LANGFUSE_INIT_USER_EMAIL=admin@pentagi.com
LANGFUSE_INIT_USER_NAME=admin
LANGFUSE_INIT_USER_PASSWORD=password # change this to improve security

## Langfuse SDK sync settings
LANGFUSE_SDK_CI_SYNC_PROCESSING_ENABLED=false
LANGFUSE_READ_FROM_POSTGRES_ONLY=false
LANGFUSE_READ_FROM_CLICKHOUSE_ONLY=true
LANGFUSE_RETURN_FROM_CLICKHOUSE=true

## Langfuse license settings
LANGFUSE_EE_LICENSE_KEY=

## Langfuse OpenTelemetry settings
LANGFUSE_OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4318
LANGFUSE_OTEL_SERVICE_NAME=

## Langfuse custom oauth2 settings
LANGFUSE_AUTH_CUSTOM_CLIENT_ID=
LANGFUSE_AUTH_CUSTOM_CLIENT_SECRET=
LANGFUSE_AUTH_CUSTOM_ISSUER=
LANGFUSE_AUTH_CUSTOM_NAME=PentAGI
LANGFUSE_AUTH_CUSTOM_SCOPE=openid email profile
LANGFUSE_AUTH_CUSTOM_CLIENT_AUTH_METHOD=client_secret_post
LANGFUSE_AUTH_CUSTOM_ALLOW_ACCOUNT_LINKING=true

## Langfuse auth settings
LANGFUSE_AUTH_DISABLE_SIGNUP=false # disable signup if PentAGI OAuth2 is used
LANGFUSE_AUTH_SESSION_MAX_AGE=240

## Langfuse allowed organization creators
LANGFUSE_ALLOWED_ORGANIZATION_CREATORS=admin@pentagi.com

## Langfuse default settings for new users
LANGFUSE_DEFAULT_ORG_ID=ocm47619l0000872mcd2dlbqwb
LANGFUSE_DEFAULT_PROJECT_ID=cm47619l0000872mcd2dlbqwb
LANGFUSE_DEFAULT_ORG_ROLE=VIEWER
LANGFUSE_DEFAULT_PROJECT_ROLE=VIEWER

## Duckduckgo settings
DUCKDUCKGO_ENABLED=false

Logs and Artifacts

Pentagi logs

2025-07-01 01:05:19 pentagi              | time="2025-06-30T17:05:19Z" level=info msg="flow created in DB" flow_id=15 provider=custom user_id=1
2025-07-01 01:05:36 pentagi              | time="2025-06-30T17:05:36Z" level=info msg="spawning container" flow_id=15 host_dir=/pentools/flow-15 image=vxcontrol/kali-linux name=pentagi-terminal-15 type=primary work_dir=/opt/pentagi/data/flow-15
2025-07-01 01:05:36 pentagi              | time="2025-06-30T17:05:36Z" level=info msg="creating container" flow_id=15 host_dir=/pentools/flow-15 image=vxcontrol/kali-linux name=pentagi-terminal-15 type=primary work_dir=/opt/pentagi/data/flow-15
2025-07-01 01:05:36 pentagi              | time="2025-06-30T17:05:36Z" level=info msg="container created" flow_id=15 host_dir=/pentools/flow-15 image=vxcontrol/kali-linux local_id=ae460642f2bee8bb97873c481ce7cfefa106a12bf86f45dbd58d1f425dab1249 name=pentagi-terminal-15 type=primary work_dir=/opt/pentagi/data/flow-15
2025-07-01 01:05:36 pentagi              | time="2025-06-30T17:05:36Z" level=info msg="container started" flow_id=15 host_dir=/pentools/flow-15 image=vxcontrol/kali-linux local_id=ae460642f2bee8bb97873c481ce7cfefa106a12bf86f45dbd58d1f425dab1249 name=pentagi-terminal-15 type=primary work_dir=/opt/pentagi/data/flow-15
2025-07-01 01:05:37 pentagi              | [GIN] 2025/06/30 - 17:05:37 | 200 | 18.887338033s |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:05:37 pentagi              | time="2025-06-30T17:05:37Z" level=info msg="SELECT * FROM \"users\"  WHERE (id = '1') LIMIT 1" component=pentagi-gorm duration="553.025µs" rows_returned=1 src="pentagi/pkg/server/services/auth.go:744" type=sql values="[1]"
2025-07-01 01:05:37 pentagi              | time="2025-06-30T17:05:37Z" level=info msg="SELECT * FROM \"roles\"  WHERE (\"id\" = '1')" component=pentagi-gorm duration="321.714µs" rows_returned=1 src="pentagi/pkg/server/services/auth.go:744" type=sql values="[1]"
2025-07-01 01:05:37 pentagi              | time="2025-06-30T17:05:37Z" level=info msg="SELECT name FROM \"privileges\"  WHERE (role_id = '1')" component=pentagi-gorm duration="332.216µs" rows_returned=0 src="pentagi/pkg/server/services/auth.go:753" type=sql values="[1]"
2025-07-01 01:05:37 pentagi              | [GIN] 2025/06/30 - 17:05:37 | 200 |    1.604573ms |      172.20.0.1 | GET      "/api/v1/info?refresh_cookie=true"
2025-07-01 01:05:37 pentagi              | [GIN] 2025/06/30 - 17:05:37 | 200 |     157.007µs |      172.20.0.1 | GET      "/favicon/favicon.ico"
2025-07-01 01:05:38 pentagi              | [GIN] 2025/06/30 - 17:05:38 | 200 |   13.708321ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:05:38 pentagi              | [GIN] 2025/06/30 - 17:05:38 | 200 |   15.306293ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:06:38 pentagi              | [GIN] 2025/06/30 - 17:06:38 | 200 |      75.703µs |      172.20.0.1 | GET      "/chat/new"
2025-07-01 01:06:38 pentagi              | [GIN] 2025/06/30 - 17:06:38 | 200 |     301.711µs |      172.20.0.1 | GET      "/assets/index-CW2ehe2a.css"
2025-07-01 01:06:38 pentagi              | [GIN] 2025/06/30 - 17:06:38 | 200 |    5.042987ms |      172.20.0.1 | GET      "/assets/index-Cp0hylTo.js"
2025-07-01 01:06:38 pentagi              | time="2025-06-30T17:06:38Z" level=info msg="SELECT * FROM \"users\"  WHERE (id = '1') LIMIT 1" component=pentagi-gorm duration="411.816µs" rows_returned=1 src="pentagi/pkg/server/services/auth.go:744" type=sql values="[1]"
2025-07-01 01:06:38 pentagi              | time="2025-06-30T17:06:38Z" level=info msg="SELECT * FROM \"roles\"  WHERE (\"id\" = '1')" component=pentagi-gorm duration="255.409µs" rows_returned=1 src="pentagi/pkg/server/services/auth.go:744" type=sql values="[1]"
2025-07-01 01:06:38 pentagi              | [GIN] 2025/06/30 - 17:06:38 | 200 |    1.332149ms |      172.20.0.1 | GET      "/api/v1/info?refresh_cookie=true"
2025-07-01 01:06:38 pentagi              | time="2025-06-30T17:06:38Z" level=info msg="SELECT name FROM \"privileges\"  WHERE (role_id = '1')" component=pentagi-gorm duration="292.611µs" rows_returned=0 src="pentagi/pkg/server/services/auth.go:753" type=sql values="[1]"
2025-07-01 01:06:38 pentagi              | [GIN] 2025/06/30 - 17:06:38 | 200 |     244.009µs |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:06:38 pentagi              | [GIN] 2025/06/30 - 17:06:38 | 200 |    4.460065ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:11:05 pentagi              | 2025/06/30 17:11:05 Trying to get content from http://host.docker.internal:7860
2025-07-01 01:12:33 pentagi              | 2025/06/30 17:12:33 Trying to get content from http://host.docker.internal:7860/assets/index-hNpyfBay.js
2025-07-01 01:12:36 pentagi              | time="2025-06-30T17:12:36Z" level=error msg="browser tool failed" error="failed to fetch screenshot by url 'http://host.docker.internal:7860/assets/index-hNpyfBay.js': unexpected resp code for scraper 'https://someuser:somepass@scraper/screenshot?fullPage=true&url=http%3A%2F%2Fhost.docker.internal%3A7860%2Fassets%2Findex-hNpyfBay.js': 500" result= screen= tool=browser url="http://host.docker.internal:7860/assets/index-hNpyfBay.js"
2025-07-01 01:18:30 pentagi              | 2025/06/30 17:18:30 http: TLS handshake error from 172.20.0.1:58136: remote error: tls: unknown certificate
2025-07-01 01:18:30 pentagi              | 2025/06/30 17:18:30 http: TLS handshake error from 172.20.0.1:58146: remote error: tls: unknown certificate
2025-07-01 01:18:30 pentagi              | time="2025-06-30T17:18:30Z" level=error msg="failed to call agent chain" agent=custom error="context canceled while waiting for retry: context canceled" flow_id=15 msg_chain_id=984 subtask_id="<nil>" task_id=0xc00262f5f8
2025-07-01 01:18:30 pentagi              | time="2025-06-30T17:18:30Z" level=error msg="failed to perform subtasks refiner" error="failed to get subtasks refiner result: context canceled while waiting for retry: context canceled"
2025-07-01 01:18:30 pentagi              | time="2025-06-30T17:18:30Z" level=info msg="user input processed" component=worker flow_id=15 input="我本机上搭建了一个漏洞靶场环境,地址是host.docker.internal:7860,请对他进行渗透测试,拿取主机权限。提示,目标是一个开源软件,并且未显示版本号,你需要查找公开的poc。" task_complete=false task_id=12 task_title="Docker漏洞靶场渗透测试获取主机权限" task_waiting=false trace_id=4878ec71-0617-407a-8539-eb98bb11a6a1 user_id=1
2025-07-01 01:18:30 pentagi              | [GIN] 2025/06/30 - 17:18:30 | 200 |    1.312957ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:32 pentagi              | [GIN] 2025/06/30 - 17:18:32 | 200 |     1.40216ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:48 pentagi              | [GIN] 2025/06/30 - 17:18:48 | 200 |    1.338558ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:48 pentagi              | [GIN] 2025/06/30 - 17:18:48 | 200 |    1.821478ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:49 pentagi              | [GIN] 2025/06/30 - 17:18:49 | 200 |    1.463062ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:49 pentagi              | [GIN] 2025/06/30 - 17:18:49 | 200 |    1.501665ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:49 pentagi              | [GIN] 2025/06/30 - 17:18:49 | 200 |    1.646971ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:49 pentagi              | [GIN] 2025/06/30 - 17:18:49 | 200 |     916.739µs |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:49 pentagi              | [GIN] 2025/06/30 - 17:18:49 | 200 |     876.938µs |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:50 pentagi              | [GIN] 2025/06/30 - 17:18:50 | 200 |    1.023643ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:50 pentagi              | [GIN] 2025/06/30 - 17:18:50 | 200 |    1.200751ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:50 pentagi              | [GIN] 2025/06/30 - 17:18:50 | 200 |    1.941383ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:50 pentagi              | [GIN] 2025/06/30 - 17:18:50 | 200 |    1.141749ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:51 pentagi              | [GIN] 2025/06/30 - 17:18:51 | 200 |    1.254054ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:51 pentagi              | [GIN] 2025/06/30 - 17:18:51 | 200 |    1.613268ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:59 pentagi              | [GIN] 2025/06/30 - 17:18:59 | 200 |    1.441757ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:59 pentagi              | [GIN] 2025/06/30 - 17:18:59 | 200 |    1.875675ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:59 pentagi              | [GIN] 2025/06/30 - 17:18:59 | 200 |    1.348754ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:18:59 pentagi              | [GIN] 2025/06/30 - 17:18:59 | 200 |    1.342653ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:19:00 pentagi              | [GIN] 2025/06/30 - 17:19:00 | 200 |    1.227949ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:19:19 pentagi              | [GIN] 2025/06/30 - 17:19:19 | 200 |    1.011043ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:19:19 pentagi              | [GIN] 2025/06/30 - 17:19:19 | 200 |    1.087447ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:19:19 pentagi              | [GIN] 2025/06/30 - 17:19:19 | 200 |    1.264654ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:19:19 pentagi              | [GIN] 2025/06/30 - 17:19:19 | 200 |     971.242µs |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:19:31 pentagi              | [GIN] 2025/06/30 - 17:19:31 | 200 |    1.538655ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:19:31 pentagi              | [GIN] 2025/06/30 - 17:19:31 | 200 |     949.535µs |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:19:31 pentagi              | [GIN] 2025/06/30 - 17:19:31 | 200 |    1.451952ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:22:27 pentagi              | [GIN] 2025/06/30 - 17:22:27 | 200 |     1.23445ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:22:27 pentagi              | [GIN] 2025/06/30 - 17:22:27 | 200 |    1.187748ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:22:27 pentagi              | [GIN] 2025/06/30 - 17:22:27 | 200 |    1.276351ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:22:28 pentagi              | [GIN] 2025/06/30 - 17:22:28 | 200 |    1.093045ms |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:22:28 pentagi              | [GIN] 2025/06/30 - 17:22:28 | 200 |     919.837µs |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:22:28 pentagi              | [GIN] 2025/06/30 - 17:22:28 | 200 |     910.237µs |      172.20.0.1 | POST     "/api/v1/graphql"
2025-07-01 01:41:50 pentagi              | 2025/06/30 17:41:50 http: TLS handshake error from 172.20.0.1:59854: remote error: tls: unknown certificate
2025-07-01 01:41:50 pentagi              | 2025/06/30 17:41:50 http: TLS handshake error from 172.20.0.1:59868: remote error: tls: unknown certificate
2025-07-01 01:41:50 pentagi              | [GIN] 2025/06/30 - 17:41:50 | 200 |     994.439µs |      172.20.0.1 | POST     "/api/v1/graphql"

Grafana dashboard

Image

Image

Image

Screenshots or Recordings

Image

Image

Verification

  • I have checked that this issue hasn't been already reported
  • I have provided all relevant configuration files (with sensitive data removed)
  • I have included relevant logs and error messages
  • I am running the latest version of PentAGI
Originally created by @VictoryLN on GitHub (Jun 30, 2025). Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/48 Originally assigned to: @asdek on GitHub. ### Affected Component Other (please specify in the description) ### Describe the bug Clicking the "Stop" button in the PentAGI frontend does not actually interrupt the flow. Based on my testing, when the flow reaches a step involving an LLM conversation (such as custom-generation-ex, though I am not completely sure), the stop action does not take effect. The flow continues to wait for the LLM response and cannot be interrupted or redirected to user input. ### Steps to Reproduce 1. Start PentAGI and run a flow that includes an LLM conversation step (e.g., custom-generation-ex). 2. When the flow is waiting for the LLM response, click the "Stop" button. 3. The UI shows "PentAGI is working... Click Stop to interrupt", but the flow does not actually stop and continues waiting for the LLM. ### System Configuration ## PentAGI Version: vxcontrol/pentagi:0.3.0 ## Deployment Type: - [x] Docker Compose - [ ] Custom Deployment ## Environment: - Docker Version: Docker version 27.1.1, build 6312585 - Docker Compose Version: Docker Compose version v2.29.1-desktop.1 - Host OS: Windows 11 - Available Resources: - RAM: 48G - CPU: 20C - Disk Space: 90G ## Enabled Features: - [x] Langfuse Analytics - [x] Grafana Monitoring - [x] Custom LLM Server ## Active Integrations: - LLM Provider: Custom - Search Systems: google ## ENV ``` # PentAGI Environment Variables CORS_ORIGINS=http://localhost:*,https://localhost:* COOKIE_SIGNING_SALT=salt # change this to improve security # Allow to interact with user while executing tasks ASK_USER= ## LLM Providers OPEN_AI_KEY= OPEN_AI_SERVER_URL= ANTHROPIC_API_KEY= ANTHROPIC_SERVER_URL=https://api.anthropic.com/v1 ## Custom LLM provider LLM_SERVER_URL=https://api.deepseek.com/v1 LLM_SERVER_KEY=sk-xxxxxxx LLM_SERVER_MODEL=deepseek-reasoner LLM_SERVER_CONFIG_PATH=/opt/pentagi/conf/deepseek.provider.yml ## Embedding EMBEDDING_URL=http://host.docker.internal:11434 EMBEDDING_KEY= EMBEDDING_MODEL=nomic-embed-text EMBEDDING_PROVIDER=ollama EMBEDDING_BATCH_SIZE= EMBEDDING_STRIP_NEW_LINES= ## HTTP proxy to use it in isolation environment PROXY_URL= ## Scraper URLs and settings SCRAPER_PUBLIC_URL= SCRAPER_PRIVATE_URL=https://someuser:somepass@scraper/ LOCAL_SCRAPER_USERNAME=someuser LOCAL_SCRAPER_PASSWORD=somepass LOCAL_SCRAPER_MAX_CONCURRENT_SESSIONS=10 ## Web server settings PUBLIC_URL=https://localhost:8443 STATIC_DIR= STATIC_URL= SERVER_PORT=8443 SERVER_HOST=0.0.0.0 SERVER_SSL_CRT= SERVER_SSL_KEY= SERVER_USE_SSL=true ## OAuth google OAUTH_GOOGLE_CLIENT_ID= OAUTH_GOOGLE_CLIENT_SECRET= ## OAuth github OAUTH_GITHUB_CLIENT_ID= OAUTH_GITHUB_CENT_SECRET= ## Google search engine API GOOGLE_API_KEY=[Google API Key] GOOGLE_CX_KEY=[Google CX Key] ## Traversaal search engine API TRAVERSAAL_API_KEY= ## Tavily search engine API TAVILY_API_KEY= ## Perplexity search engine API PERPLEXITY_API_KEY= PERPLEXITY_MODEL= PERPLEXITY_CONTEXT_SIZE= ## Langfuse observability settings LANGFUSE_BASE_URL=http://langfuse-web:3000 LANGFUSE_PROJECT_ID=cm47619l0000872mcd2dlbqwb LANGFUSE_PUBLIC_KEY=pk-lf-00001000-0000-0000-0000-000000000000 LANGFUSE_SECRET_KEY=sk-lf-00004000-0000-0000-0000-000000000000 ## OpenTelemetry observability settings OTEL_HOST=otelcol:8148 ## Docker client settings to run primary terminal container DOCKER_HOST=unix:///var/run/docker.sock DOCKER_TLS_VERIFY= DOCKER_CERT_PATH= ## Docker settings inside primary terminal container DOCKER_INSIDE=true # enable to use docker socket DOCKER_NET_ADMIN=true # enable to use net_admin capability DOCKER_SOCKET=/var/run/docker.sock # path on host machine DOCKER_NETWORK=pentagi-network # must be exist DOCKER_PUBLIC_IP=0.0.0.0 # public ip of host machine DOCKER_WORK_DIR=/pentools DOCKER_DEFAULT_IMAGE=pentagi-kali # Postgres (pgvector) settings PENTAGI_POSTGRES_USER=postgres PENTAGI_POSTGRES_PASSWORD=postgres # change this to improve security PENTAGI_POSTGRES_DB=pentagidb # Langfuse Environment Variables ## Langfuse Postgres LANGFUSE_POSTGRES_USER=postgres LANGFUSE_POSTGRES_PASSWORD=postgres # change this to improve security LANGFUSE_POSTGRES_DB=langfuse LANGFUSE_POSTGRES_VERSION=16 ## Langfuse Clickhouse LANGFUSE_CLICKHOUSE_USER=clickhouse LANGFUSE_CLICKHOUSE_PASSWORD=clickhouse # change this to improve security LANGFUSE_CLICKHOUSE_URL=http://langfuse-clickhouse:8123 LANGFUSE_CLICKHOUSE_MIGRATION_URL=clickhouse://langfuse-clickhouse:9000 LANGFUSE_CLICKHOUSE_CLUSTER_ENABLED=false ## Langfuse S3 LANGFUSE_S3_BUCKET=langfuse LANGFUSE_S3_REGION=auto LANGFUSE_S3_ACCESS_KEY_ID=accesskey # change this to improve security LANGFUSE_S3_SECRET_ACCESS_KEY=secretkey # change this to improve security LANGFUSE_S3_ENDPOINT=http://langfuse-minio:9000 LANGFUSE_S3_FORCE_PATH_STYLE=true LANGFUSE_S3_EVENT_UPLOAD_PREFIX=events/ LANGFUSE_S3_MEDIA_UPLOAD_PREFIX=media/ ## Langfuse Redis LANGFUSE_REDIS_HOST=langfuse-redis LANGFUSE_REDIS_PORT=6379 LANGFUSE_REDIS_AUTH=redispassword # change this to improve security ## Langfuse web app security settings LANGFUSE_SALT=salt # change this to improve security LANGFUSE_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000 # change this to improve security ## Langfuse web app nextauth settings LANGFUSE_NEXTAUTH_URL=http://localhost:4000 LANGFUSE_NEXTAUTH_SECRET=secret # change this to improve security ## Langfuse extra settings LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=true LANGFUSE_TELEMETRY_ENABLED=false LANGFUSE_LOG_LEVEL=info ## Langfuse init settings LANGFUSE_INIT_ORG_ID=ocm47619l0000872mcd2dlbqwb LANGFUSE_INIT_ORG_NAME=PentAGI Org LANGFUSE_INIT_PROJECT_ID=cm47619l0000872mcd2dlbqwb LANGFUSE_INIT_PROJECT_NAME=PentAGI LANGFUSE_INIT_PROJECT_PUBLIC_KEY=pk-lf-00001000-0000-0000-0000-000000000000 # change this to improve security LANGFUSE_INIT_PROJECT_SECRET_KEY=sk-lf-00004000-0000-0000-0000-000000000000 # change this to improve security LANGFUSE_INIT_USER_EMAIL=admin@pentagi.com LANGFUSE_INIT_USER_NAME=admin LANGFUSE_INIT_USER_PASSWORD=password # change this to improve security ## Langfuse SDK sync settings LANGFUSE_SDK_CI_SYNC_PROCESSING_ENABLED=false LANGFUSE_READ_FROM_POSTGRES_ONLY=false LANGFUSE_READ_FROM_CLICKHOUSE_ONLY=true LANGFUSE_RETURN_FROM_CLICKHOUSE=true ## Langfuse license settings LANGFUSE_EE_LICENSE_KEY= ## Langfuse OpenTelemetry settings LANGFUSE_OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4318 LANGFUSE_OTEL_SERVICE_NAME= ## Langfuse custom oauth2 settings LANGFUSE_AUTH_CUSTOM_CLIENT_ID= LANGFUSE_AUTH_CUSTOM_CLIENT_SECRET= LANGFUSE_AUTH_CUSTOM_ISSUER= LANGFUSE_AUTH_CUSTOM_NAME=PentAGI LANGFUSE_AUTH_CUSTOM_SCOPE=openid email profile LANGFUSE_AUTH_CUSTOM_CLIENT_AUTH_METHOD=client_secret_post LANGFUSE_AUTH_CUSTOM_ALLOW_ACCOUNT_LINKING=true ## Langfuse auth settings LANGFUSE_AUTH_DISABLE_SIGNUP=false # disable signup if PentAGI OAuth2 is used LANGFUSE_AUTH_SESSION_MAX_AGE=240 ## Langfuse allowed organization creators LANGFUSE_ALLOWED_ORGANIZATION_CREATORS=admin@pentagi.com ## Langfuse default settings for new users LANGFUSE_DEFAULT_ORG_ID=ocm47619l0000872mcd2dlbqwb LANGFUSE_DEFAULT_PROJECT_ID=cm47619l0000872mcd2dlbqwb LANGFUSE_DEFAULT_ORG_ROLE=VIEWER LANGFUSE_DEFAULT_PROJECT_ROLE=VIEWER ## Duckduckgo settings DUCKDUCKGO_ENABLED=false ``` ### Logs and Artifacts Pentagi logs ``` 2025-07-01 01:05:19 pentagi | time="2025-06-30T17:05:19Z" level=info msg="flow created in DB" flow_id=15 provider=custom user_id=1 2025-07-01 01:05:36 pentagi | time="2025-06-30T17:05:36Z" level=info msg="spawning container" flow_id=15 host_dir=/pentools/flow-15 image=vxcontrol/kali-linux name=pentagi-terminal-15 type=primary work_dir=/opt/pentagi/data/flow-15 2025-07-01 01:05:36 pentagi | time="2025-06-30T17:05:36Z" level=info msg="creating container" flow_id=15 host_dir=/pentools/flow-15 image=vxcontrol/kali-linux name=pentagi-terminal-15 type=primary work_dir=/opt/pentagi/data/flow-15 2025-07-01 01:05:36 pentagi | time="2025-06-30T17:05:36Z" level=info msg="container created" flow_id=15 host_dir=/pentools/flow-15 image=vxcontrol/kali-linux local_id=ae460642f2bee8bb97873c481ce7cfefa106a12bf86f45dbd58d1f425dab1249 name=pentagi-terminal-15 type=primary work_dir=/opt/pentagi/data/flow-15 2025-07-01 01:05:36 pentagi | time="2025-06-30T17:05:36Z" level=info msg="container started" flow_id=15 host_dir=/pentools/flow-15 image=vxcontrol/kali-linux local_id=ae460642f2bee8bb97873c481ce7cfefa106a12bf86f45dbd58d1f425dab1249 name=pentagi-terminal-15 type=primary work_dir=/opt/pentagi/data/flow-15 2025-07-01 01:05:37 pentagi | [GIN] 2025/06/30 - 17:05:37 | 200 | 18.887338033s | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:05:37 pentagi | time="2025-06-30T17:05:37Z" level=info msg="SELECT * FROM \"users\" WHERE (id = '1') LIMIT 1" component=pentagi-gorm duration="553.025µs" rows_returned=1 src="pentagi/pkg/server/services/auth.go:744" type=sql values="[1]" 2025-07-01 01:05:37 pentagi | time="2025-06-30T17:05:37Z" level=info msg="SELECT * FROM \"roles\" WHERE (\"id\" = '1')" component=pentagi-gorm duration="321.714µs" rows_returned=1 src="pentagi/pkg/server/services/auth.go:744" type=sql values="[1]" 2025-07-01 01:05:37 pentagi | time="2025-06-30T17:05:37Z" level=info msg="SELECT name FROM \"privileges\" WHERE (role_id = '1')" component=pentagi-gorm duration="332.216µs" rows_returned=0 src="pentagi/pkg/server/services/auth.go:753" type=sql values="[1]" 2025-07-01 01:05:37 pentagi | [GIN] 2025/06/30 - 17:05:37 | 200 | 1.604573ms | 172.20.0.1 | GET "/api/v1/info?refresh_cookie=true" 2025-07-01 01:05:37 pentagi | [GIN] 2025/06/30 - 17:05:37 | 200 | 157.007µs | 172.20.0.1 | GET "/favicon/favicon.ico" 2025-07-01 01:05:38 pentagi | [GIN] 2025/06/30 - 17:05:38 | 200 | 13.708321ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:05:38 pentagi | [GIN] 2025/06/30 - 17:05:38 | 200 | 15.306293ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:06:38 pentagi | [GIN] 2025/06/30 - 17:06:38 | 200 | 75.703µs | 172.20.0.1 | GET "/chat/new" 2025-07-01 01:06:38 pentagi | [GIN] 2025/06/30 - 17:06:38 | 200 | 301.711µs | 172.20.0.1 | GET "/assets/index-CW2ehe2a.css" 2025-07-01 01:06:38 pentagi | [GIN] 2025/06/30 - 17:06:38 | 200 | 5.042987ms | 172.20.0.1 | GET "/assets/index-Cp0hylTo.js" 2025-07-01 01:06:38 pentagi | time="2025-06-30T17:06:38Z" level=info msg="SELECT * FROM \"users\" WHERE (id = '1') LIMIT 1" component=pentagi-gorm duration="411.816µs" rows_returned=1 src="pentagi/pkg/server/services/auth.go:744" type=sql values="[1]" 2025-07-01 01:06:38 pentagi | time="2025-06-30T17:06:38Z" level=info msg="SELECT * FROM \"roles\" WHERE (\"id\" = '1')" component=pentagi-gorm duration="255.409µs" rows_returned=1 src="pentagi/pkg/server/services/auth.go:744" type=sql values="[1]" 2025-07-01 01:06:38 pentagi | [GIN] 2025/06/30 - 17:06:38 | 200 | 1.332149ms | 172.20.0.1 | GET "/api/v1/info?refresh_cookie=true" 2025-07-01 01:06:38 pentagi | time="2025-06-30T17:06:38Z" level=info msg="SELECT name FROM \"privileges\" WHERE (role_id = '1')" component=pentagi-gorm duration="292.611µs" rows_returned=0 src="pentagi/pkg/server/services/auth.go:753" type=sql values="[1]" 2025-07-01 01:06:38 pentagi | [GIN] 2025/06/30 - 17:06:38 | 200 | 244.009µs | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:06:38 pentagi | [GIN] 2025/06/30 - 17:06:38 | 200 | 4.460065ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:11:05 pentagi | 2025/06/30 17:11:05 Trying to get content from http://host.docker.internal:7860 2025-07-01 01:12:33 pentagi | 2025/06/30 17:12:33 Trying to get content from http://host.docker.internal:7860/assets/index-hNpyfBay.js 2025-07-01 01:12:36 pentagi | time="2025-06-30T17:12:36Z" level=error msg="browser tool failed" error="failed to fetch screenshot by url 'http://host.docker.internal:7860/assets/index-hNpyfBay.js': unexpected resp code for scraper 'https://someuser:somepass@scraper/screenshot?fullPage=true&url=http%3A%2F%2Fhost.docker.internal%3A7860%2Fassets%2Findex-hNpyfBay.js': 500" result= screen= tool=browser url="http://host.docker.internal:7860/assets/index-hNpyfBay.js" 2025-07-01 01:18:30 pentagi | 2025/06/30 17:18:30 http: TLS handshake error from 172.20.0.1:58136: remote error: tls: unknown certificate 2025-07-01 01:18:30 pentagi | 2025/06/30 17:18:30 http: TLS handshake error from 172.20.0.1:58146: remote error: tls: unknown certificate 2025-07-01 01:18:30 pentagi | time="2025-06-30T17:18:30Z" level=error msg="failed to call agent chain" agent=custom error="context canceled while waiting for retry: context canceled" flow_id=15 msg_chain_id=984 subtask_id="<nil>" task_id=0xc00262f5f8 2025-07-01 01:18:30 pentagi | time="2025-06-30T17:18:30Z" level=error msg="failed to perform subtasks refiner" error="failed to get subtasks refiner result: context canceled while waiting for retry: context canceled" 2025-07-01 01:18:30 pentagi | time="2025-06-30T17:18:30Z" level=info msg="user input processed" component=worker flow_id=15 input="我本机上搭建了一个漏洞靶场环境,地址是host.docker.internal:7860,请对他进行渗透测试,拿取主机权限。提示,目标是一个开源软件,并且未显示版本号,你需要查找公开的poc。" task_complete=false task_id=12 task_title="Docker漏洞靶场渗透测试获取主机权限" task_waiting=false trace_id=4878ec71-0617-407a-8539-eb98bb11a6a1 user_id=1 2025-07-01 01:18:30 pentagi | [GIN] 2025/06/30 - 17:18:30 | 200 | 1.312957ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:32 pentagi | [GIN] 2025/06/30 - 17:18:32 | 200 | 1.40216ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:48 pentagi | [GIN] 2025/06/30 - 17:18:48 | 200 | 1.338558ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:48 pentagi | [GIN] 2025/06/30 - 17:18:48 | 200 | 1.821478ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:49 pentagi | [GIN] 2025/06/30 - 17:18:49 | 200 | 1.463062ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:49 pentagi | [GIN] 2025/06/30 - 17:18:49 | 200 | 1.501665ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:49 pentagi | [GIN] 2025/06/30 - 17:18:49 | 200 | 1.646971ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:49 pentagi | [GIN] 2025/06/30 - 17:18:49 | 200 | 916.739µs | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:49 pentagi | [GIN] 2025/06/30 - 17:18:49 | 200 | 876.938µs | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:50 pentagi | [GIN] 2025/06/30 - 17:18:50 | 200 | 1.023643ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:50 pentagi | [GIN] 2025/06/30 - 17:18:50 | 200 | 1.200751ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:50 pentagi | [GIN] 2025/06/30 - 17:18:50 | 200 | 1.941383ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:50 pentagi | [GIN] 2025/06/30 - 17:18:50 | 200 | 1.141749ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:51 pentagi | [GIN] 2025/06/30 - 17:18:51 | 200 | 1.254054ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:51 pentagi | [GIN] 2025/06/30 - 17:18:51 | 200 | 1.613268ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:59 pentagi | [GIN] 2025/06/30 - 17:18:59 | 200 | 1.441757ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:59 pentagi | [GIN] 2025/06/30 - 17:18:59 | 200 | 1.875675ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:59 pentagi | [GIN] 2025/06/30 - 17:18:59 | 200 | 1.348754ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:18:59 pentagi | [GIN] 2025/06/30 - 17:18:59 | 200 | 1.342653ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:19:00 pentagi | [GIN] 2025/06/30 - 17:19:00 | 200 | 1.227949ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:19:19 pentagi | [GIN] 2025/06/30 - 17:19:19 | 200 | 1.011043ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:19:19 pentagi | [GIN] 2025/06/30 - 17:19:19 | 200 | 1.087447ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:19:19 pentagi | [GIN] 2025/06/30 - 17:19:19 | 200 | 1.264654ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:19:19 pentagi | [GIN] 2025/06/30 - 17:19:19 | 200 | 971.242µs | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:19:31 pentagi | [GIN] 2025/06/30 - 17:19:31 | 200 | 1.538655ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:19:31 pentagi | [GIN] 2025/06/30 - 17:19:31 | 200 | 949.535µs | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:19:31 pentagi | [GIN] 2025/06/30 - 17:19:31 | 200 | 1.451952ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:22:27 pentagi | [GIN] 2025/06/30 - 17:22:27 | 200 | 1.23445ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:22:27 pentagi | [GIN] 2025/06/30 - 17:22:27 | 200 | 1.187748ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:22:27 pentagi | [GIN] 2025/06/30 - 17:22:27 | 200 | 1.276351ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:22:28 pentagi | [GIN] 2025/06/30 - 17:22:28 | 200 | 1.093045ms | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:22:28 pentagi | [GIN] 2025/06/30 - 17:22:28 | 200 | 919.837µs | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:22:28 pentagi | [GIN] 2025/06/30 - 17:22:28 | 200 | 910.237µs | 172.20.0.1 | POST "/api/v1/graphql" 2025-07-01 01:41:50 pentagi | 2025/06/30 17:41:50 http: TLS handshake error from 172.20.0.1:59854: remote error: tls: unknown certificate 2025-07-01 01:41:50 pentagi | 2025/06/30 17:41:50 http: TLS handshake error from 172.20.0.1:59868: remote error: tls: unknown certificate 2025-07-01 01:41:50 pentagi | [GIN] 2025/06/30 - 17:41:50 | 200 | 994.439µs | 172.20.0.1 | POST "/api/v1/graphql" ``` Grafana dashboard ![Image](https://github.com/user-attachments/assets/d43aadad-2368-41af-b293-c5de3637f8be) ![Image](https://github.com/user-attachments/assets/88d5bb13-30d5-4053-93a0-8a7c5a356abe) ![Image](https://github.com/user-attachments/assets/5a838317-749f-4f1b-b0ed-bf3decd157d4) ### Screenshots or Recordings ![Image](https://github.com/user-attachments/assets/9f4e4cde-2585-4cbc-b234-c0bdadfe5b54) ![Image](https://github.com/user-attachments/assets/9cdd7f7f-ff9f-4685-a92b-2e76537c2c29) ### Verification - [x] I have checked that this issue hasn't been already reported - [x] I have provided all relevant configuration files (with sensitive data removed) - [x] I have included relevant logs and error messages - [ ] I am running the latest version of PentAGI
yindo added the bug label 2026-06-06 22:08:05 -04:00
yindo closed this issue 2026-06-06 22:08:05 -04:00
Author
Owner

@asdek commented on GitHub (Jul 1, 2025):

Hey @VictoryLN

Thanks for such a detailed bug report!

Here's what I can see:

  1. Your flow reached the Refine step where the "refiner" agent was planning new subtasks and closing unused ones.

  2. While this was happening, you tried to stop execution, and it was correctly handled in the backend with the error message context canceled:

time="2025-06-30T17:18:30Z" level=error msg="failed to call agent chain" agent=custom error="context canceled while waiting for retry: context canceled" flow_id=15 msg_chain_id=984 subtask_id="<nil>" task_id=0xc00262f5f8
  1. The refiner was also stopped:
time="2025-06-30T17:18:30Z" level=error msg="failed to perform subtasks refiner" error="failed to get subtasks refiner result: context canceled while waiting for retry: context canceled"
  1. The most interesting part is this line:
time="2025-06-30T17:18:30Z" level=info msg="user input processed" component=worker flow_id=15 input="******" task_complete=false task_id=12 task_title="******" task_waiting=false trace_id=4878ec71-0617-407a-8539-eb98bb11a6a1 user_id=1

This happened here and this context was returned without an error...

This is a corner case with undefined behavior because we don't know whether the refiner completed its work or not:
https://github.com/vxcontrol/pentagi/blob/master/backend/pkg/controller/task.go#L304

For regular cases, this is handled by this code:

I've made some small changes to address this case, but it might break after popping the subtask in the next iteration:
https://github.com/vxcontrol/pentagi/commit/e88b9235554c05f7ac4739aec69980f6901265b4

Please let me know if this doesn't completely solve your situation. I'm keeping this issue open while you check the results.

<!-- gh-comment-id:3024470254 --> @asdek commented on GitHub (Jul 1, 2025): Hey @VictoryLN Thanks for such a detailed bug report! Here's what I can see: 1. Your flow reached the Refine step where the "refiner" agent was planning new subtasks and closing unused ones. 2. While this was happening, you tried to stop execution, and it was correctly handled in the backend with the error message `context canceled`: ``` time="2025-06-30T17:18:30Z" level=error msg="failed to call agent chain" agent=custom error="context canceled while waiting for retry: context canceled" flow_id=15 msg_chain_id=984 subtask_id="<nil>" task_id=0xc00262f5f8 ``` 3. The refiner was also stopped: ``` time="2025-06-30T17:18:30Z" level=error msg="failed to perform subtasks refiner" error="failed to get subtasks refiner result: context canceled while waiting for retry: context canceled" ``` 4. The most interesting part is this line: ``` time="2025-06-30T17:18:30Z" level=info msg="user input processed" component=worker flow_id=15 input="******" task_complete=false task_id=12 task_title="******" task_waiting=false trace_id=4878ec71-0617-407a-8539-eb98bb11a6a1 user_id=1 ``` This happened [here](https://github.com/vxcontrol/pentagi/blob/master/backend/pkg/controller/flow.go#L714) and this context was returned without an error... This is a corner case with undefined behavior because we don't know whether the refiner completed its work or not: https://github.com/vxcontrol/pentagi/blob/master/backend/pkg/controller/task.go#L304 For regular cases, this is handled by this code: - https://github.com/vxcontrol/pentagi/blob/master/backend/pkg/controller/task.go#L295 - https://github.com/vxcontrol/pentagi/blob/master/backend/pkg/controller/subtask.go#L295-L303 I've made some small changes to address this case, but it might break after popping the subtask in the next iteration: https://github.com/vxcontrol/pentagi/commit/e88b9235554c05f7ac4739aec69980f6901265b4 Please let me know if this doesn't completely solve your situation. I'm keeping this issue open while you check the results.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#27