Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]:托管会话自动生成的 agentId 包含冒号,正则校验失败导致会话无法执行

Open Beginner friendly
#3,705 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Lyin-OTTF is already working on this.

Since Oct 21, 2026.

  • #3709 by @Lyin-OTTF — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker-compose, java

Research direction

Start by locating the agentId validation and the managed session code that assembles IDs with the namespace prefix; the issue does not name files or tests. Reproduce with the managed runtime and trace the reported validation failure. Done means the generated ID passes validation and the managed session can execute successfully.

Written by the indexing model from the issue text.

Description

bug

描述 Bug
在 AgentScope-Java Service 2.1.0-BETA1 版本中,使用平台托管会话(managed session)运行智能体时,系统自动拼接生成的 agentId 带有冒号 :,和校验正则规则冲突,会话执行直接失败。
托管运行时组装的 agentId 会带上命名空间前缀,格式类似 dpa-namespace:default:xxx,但是校验正则仅允许 [A-Za-z0-9._-]+,不支持冒号。

复现步骤

  1. 使用 docker compose 部署 agentscope-service 2.1.0-BETA1
  2. 在网页控制台创建智能体(当前界面仅有 managed runtime 这一种选项)
  3. 新建会话并发送消息,触发智能体执行
  4. 查看 service-dataplane 容器日志,出现报错,会话无法继续运行

预期行为
二选一修复即可:

  1. 组装用于校验的 agentId 时,去掉带冒号的命名空间前缀;
  2. 修改校验正则,支持冒号字符,正则调整为 [A-Za-z0-9._:-]+。

错误信息

Managed session turn failed: sessionId=sess_62a374ad4da7, error=Invalid agentId 'dpa-namespace:default:default-92145f4c-2392-448d-b506-2ac9a13e13f0-sess_62a374ad4da7': must match [A-Za-z0-9._-]+, not be all dots, and be at most 255 characters

环境信息

  • AgentScope-Java 版本:2.1.0-BETA1
  • Java 版本:21
  • 操作系统:macOS
  • 部署方式:Docker Compose,自行编译打包 service-dataplane 镜像
  • 模型后端:Ollama(OpenAI 兼容接口)
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
2d 4h
Merged PRs (30d)
139

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from agentscope-ai/agentscope-java

All issues in agentscope-ai/agentscope-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.