Summary
When the orchestration assistant is the Pi provider, AI-generated workflow invocations may not dispatch if /invoke-workflow is streamed across multiple assistant chunks.
This appears provider-dependent because Pi can emit smaller assistant text deltas than providers like Codex. The same workflow can work when invoked directly with a slash command, or when the orchestration provider emits the full command in one chunk.
Observed Behavior
A user asks for work that should trigger a workflow. The assistant response starts emitting an /invoke-workflow command, but the command body arrives in later chunks.
Example chunk pattern:
chunk 1: /invoke-workflow
chunk 2: some-workflow
chunk 3: --project some-project
The orchestrator detects /invoke-workflow in the first chunk, suppresses further streamed text, but does not keep accumulating enough text to parse the complete command. As a result, the workflow is not dispatched.
Expected Behavior
After detecting an orchestrator command prefix, Archon should suppress command text from the UI but continue accumulating assistant chunks until the provider turn completes. It should then parse the full command and dispatch the workflow.
Why Direct Slash Commands Still Work
Direct user slash commands such as:
/workflow run some-workflow ...
bypass the AI-generated /invoke-workflow parsing path, so they are not affected by assistant chunk boundaries.
Proposed Fix
In both stream and batch orchestration paths:
- Keep accumulating assistant text after command detection.
- Suppress command chunks from the UI.
- Preserve the latest parseable orchestrator command snapshot so later non-command text does not corrupt the parsed command.
- In batch mode, parse raw concatenated assistant text for orchestrator commands instead of using prose formatting separators.
Regression Coverage
Add tests for both stream and batch mode where the command body arrives after /invoke-workflow has already been detected:
/invoke-workflow
some-workflow
--project some-project
These tests should verify that the workflow dispatch path is called and the command text is not shown to the user.
Notes
No secrets, project-specific issue keys, private repository names, customer data, local paths, tokens, or private logs are required to reproduce this. The issue is about provider chunking behavior and orchestrator command parsing.
Summary
When the orchestration assistant is the Pi provider, AI-generated workflow invocations may not dispatch if
/invoke-workflowis streamed across multiple assistant chunks.This appears provider-dependent because Pi can emit smaller assistant text deltas than providers like Codex. The same workflow can work when invoked directly with a slash command, or when the orchestration provider emits the full command in one chunk.
Observed Behavior
A user asks for work that should trigger a workflow. The assistant response starts emitting an
/invoke-workflowcommand, but the command body arrives in later chunks.Example chunk pattern:
The orchestrator detects
/invoke-workflowin the first chunk, suppresses further streamed text, but does not keep accumulating enough text to parse the complete command. As a result, the workflow is not dispatched.Expected Behavior
After detecting an orchestrator command prefix, Archon should suppress command text from the UI but continue accumulating assistant chunks until the provider turn completes. It should then parse the full command and dispatch the workflow.
Why Direct Slash Commands Still Work
Direct user slash commands such as:
bypass the AI-generated
/invoke-workflowparsing path, so they are not affected by assistant chunk boundaries.Proposed Fix
In both stream and batch orchestration paths:
Regression Coverage
Add tests for both stream and batch mode where the command body arrives after
/invoke-workflowhas already been detected:These tests should verify that the workflow dispatch path is called and the command text is not shown to the user.
Notes
No secrets, project-specific issue keys, private repository names, customer data, local paths, tokens, or private logs are required to reproduce this. The issue is about provider chunking behavior and orchestrator command parsing.