Skip to content

SessionStart hook的输出(additionalContext / systemMessage)无法注入到上下文 #4111

@SYZhang0805

Description

@SYZhang0805

What happened?

你好,我们是阿里内部的团队,在使用过程中发现SessionStart hook的输出(additionalContext / systemMessage)无法注入到上下文。
似乎原因在于

debugLogger.debug('SessionStart event completed successfully');

中只输出了一行debug日志,没有调用getAdditionalContext(),无法将SessionStart hook的输出结果注入到上下文。

What did you expect to happen?

SessionStart hook 输出的 additionalContext 内容应注入到对话上下文中,并对 AI 模型可见

Client information

Qwen Code 0.15.11 (782403d) │
│ 运行环境 Node.js v20.20.2 / npm 10.8.2 │
│ 操作系统 darwin arm64 (25.4.0) │

Actual Behavior

钩子执行成功
JSON 输出有效
additionalContext未注入上下文

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions