[Bug] Bare `transition to` after a reasoning action's `set` lines is silently dropped (no handoff, no diagnostic)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 69/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
Start in packages/compiler/src/nodes/compile-tool.ts, especially compileConditionalBody, then compare how the compiler handles a top-level post-action TransitionStatement with one inside an if. Use the reproduction through compile(parseSource(...)) from packages/compiler/test/test-utils.ts and check diagnostics and the compiled handoff fields. Done when the transition is compiled as a handoff or an unsupported top-level transition produces a diagnostic.
索引モデルが issue の本文から書いたものです。
説明
Description
A transition to @subagent.X written directly in a reasoning action's post-action block (after with / set lines) compiles with no diagnostics but emits no handoff. The same transition wrapped in an if is compiled correctly. Authors get a script that validates cleanly and then never performs the transition at runtime.
From reading packages/compiler/src/nodes/compile-tool.ts, TransitionStatement appears to be handled only inside conditional bodies (compileConditionalBody), with no handler or warning for a top-level transition in the post-action block.
Found while fixing trailheadapps/agent-script-recipes#107, where the "Bidirectional Navigation" recipe never returned from the specialist subagent.
Steps to Reproduce
Compile this with @agentscript/compiler (the repro below is a throwaway vitest file using compile(parseSource(...)) from packages/compiler/test/test-utils.ts):
config:
developer_name: "Repro"
agent_label: "Repro"
agent_type: "AgentforceEmployeeAgent"
description: "repro"
variables:
result: mutable string = ""
start_agent router:
description: "router"
reasoning:
instructions: ->
| route
actions:
go: @utils.transition to @subagent.specialist
subagent hub:
description: "hub"
reasoning:
instructions: ->
| hub
subagent specialist:
description: "specialist"
actions:
analyze:
description: "analyze"
inputs:
q: string
description: "q"
is_required: True
outputs:
out: string
description: "out"
target: "flow://Analyze"
reasoning:
instructions: ->
| specialist
actions:
run_analyze: @actions.analyze
with q="x"
set @variables.result = @outputs.out
transition to @subagent.hub
Expected Behavior
Either the transition compiles to a handoff (as it does inside an if), or the compiler reports a diagnostic that a top-level transition to is not supported in a post-action block.
Actual Behavior
| Post-action block | diagnostics | post_tool_call |
after_all_tool_calls |
hub referenced in node |
|---|---|---|---|---|
transition to @subagent.hub |
[] |
absent | absent | no |
if @outputs.out: then transition to @subagent.hub |
[] |
present | present | yes |
The compiled specialist tool carries only the set state updates. The hosted Agent API compile endpoint (/einstein/ai-agent/v1.1/authoring/scripts) returns the same shape, and in a live preview the agent stayed in the specialist subagent after the action ran.
Environment
- Node.js version: 22.22.3
- pnpm version: 10.34.6
- OS: macOS (Darwin 25.6.0)
- Package & version: @agentscript/compiler 3.26.1 (repo commit
ace15eb, built from source)
Additional context
- Related docs gap: examples in downstream recipe repos show a bare post-action
transition toas valid, so authors reasonably write it. - Separate from this issue: even the
if-guarded form, which compiles correctly, did not perform the handoff in one live hosted preview. That looks like a runtime question, not a compiler one, and is not part of this report. - Workaround that works at runtime: move the transition to the subagent's
after_reasoningblock, guarded on a stored variable.
- 主要言語
- TypeScript
- スター
- 274
- フォーク
- 56
- 平均マージ
- 12時間 18分
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
salesforce/agentscript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
salesforce/agentscript#103 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
salesforce/agentscript#102 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
salesforce/agentscript#101 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
salesforce/agentscript#85 ·
メンテナーはふだん 1 日以内に返信
-
README Quick Start fails on macOS: Node 26 incompatibility and missing tree-sitter CLI prerequisite再び着手できるかも @dsorajisto が 171 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 半日 初心者へのやさしさ 75/100
salesforce/agentscript#33 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
salesforce/agentscript の issue をすべて見る
似ている issue
-
area:cli bug P4
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug from-studio
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
esengine/DeepSeek-Reasonix#14868 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
linxiv-dev/linXiv#384 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信