[Bug]: Pi turn-start prompt lacks streamingBehavior — pi 1.0.x rejects prompts while an agent run is active
Maintainer thường phản hồi trong vòng 1 ngày
@StiensWout đang làm issue này rồi.
Từ ngày 12/10/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu trong apps/server/src/orchestration-v2/Adapters/PiAdapterV2.ts, tại prompt bắt đầu lượt quanh các dòng 2358-2362, và so sánh nó với đường dẫn steer quanh dòng 2444 cùng comment streamingBehavior của nó. Đảm bảo request bắt đầu lượt xử lý một lần chạy Pi đang hoạt động, sau đó xác minh rằng thread bị ảnh hưởng khởi động thành công trong khi công việc do extension điều khiển đang diễn ra.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Area: apps/server
Steps to reproduce
- Install pi ≥ 1.0.0 (observed on 1.0.0 and 1.0.1;
npm i -g @earendil-works/pi-coding-agentor bun global) and enable the Pi provider. - Have a pi session whose extension state triggers a run on resume — e.g. a pi-loop extension iteration waiting on a monitor event, or any pending extension continuation. (Observed: session last ended mid-run, so the resumed session re-fires work immediately after
switch_session.) - Open a T3 thread bound to that session and send a message.
T3's turn-start prompt races the extension-driven run:
→ {"type":"switch_session","sessionPath":"…/session.jsonl","id":"t3-0"}
→ {"type":"get_commands","id":"t3-1"}
→ {"type":"get_state","id":"t3-2"}
→ {"type":"get_available_models","id":"t3-3"}
→ {"type":"get_entries","id":"t3-4"}
→ {"type":"set_model",…,"id":"t3-5"}
→ {"type":"set_session_name",…,"id":"t3-6"}
→ {"type":"prompt","message":"Context handoff (delta_since_target_last_seen):…"}
← {"type":"response","command":"prompt","success":false,"error":"Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message."}
Expected behavior
The turn starts. Since pi 1.0.x, AgentSession.prompt() rejects a bare prompt while a run is active — agent-session.ts:1965-1970 at tag v1.0.1:
// If streaming, queue via steer() or followUp() based on option
if (this.isStreaming) {
if (!options?.streamingBehavior) {
throw new Error(
"Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.",
);
}
So the turn-start prompt must either pass streamingBehavior (pi's steer semantics queue it atomically during an active run) or T3 should check get_state and abort the active run before prompting.
Actual behavior
The prompt is rejected and the user sees:
Provider error: Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.
The turn never starts; the session is left in an error state. Every retry while an extension-driven run is in flight bounces the same way, so the thread is effectively unusable.
Impact
Blocks work completely (for the affected thread). Workaround exists but is costly — see below.
Version or commit
0.0.46-nightly.20261003.2632 (f391794a35c6). Defect present at current main (ce90eec1): turn-start sends a bare prompt at apps/server/src/orchestration-v2/Adapters/PiAdapterV2.ts:2358-2362 while the steer path (line 2444) already passes streamingBehavior: "steer" — its own comment (line 2421) documents pi's queue-or-run semantics:
Prompt with streamingBehavior steer is atomic on Pi's side: it queues during an active run and starts a new run if settlement won the race.
Environment
macOS 27.0.1 (arm64), T3 Code desktop (Nightly), pi @earendil-works/pi-coding-agent 1.0.1 (bun global install; behavior identical on 1.0.0), Node v26.9.0.
Related
#13507 / #13839 cover extension-driven session rewinds and their ref/rollback reconciliation — a different mechanism. This report is about the prompt contract itself: pi 1.0.x made bare prompt throw while a run is active, and T3's turn-start path (tested against pi 0.8x, cf. #13839's verification against pi 0.87.1) hasn't caught up. Both are part of the same theme: extensions drive pi sessions in ways the adapter's request paths don't fully anticipate.
Logs or stack traces
ProviderAdapterEventStreamError: Failed while streaming pi provider session provider-session:provider-instance:pi:thread:…:… events.
at orchestrationV2.providerTurnStart.start (apps/server/dist/binCli-D9mHsJrM.mjs:228797)
[cause]: Error: Cause([Fail(PiRpcError: Pi RPC read failed: pi process exited with code 0.)])
RPC capture (tee on pi stdin/stdout) of the rejected exchange and the extension-driven runs that follow — full transcript available on request. Redacted: session paths truncated; no secrets in the capture.
Workaround
Setting the Pi provider's Launch arguments to --no-extensions stops extension-discovery extensions (pi-lens, pi-loop, …) from loading in T3 sessions — T3's own --extension still loads — which removes the busy-at-load races. Cost: pi-lens features are unavailable in T3 sessions. Alternatively wait for extension-driven runs to settle before prompting.
Minor side note
A bare 1.0.1 (version string) line appears on pi's stdout in RPC mode — most likely pi's own version/update-check output landing on the protocol channel. T3 drops non-JSON lines so it's harmless, but raw prints on the RPC channel would be worth avoiding.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 2 giờ 58 phút
- Pull request đã merge (30 ngày)
- 480
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pingdotgg/t3code
-
accepted bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
pingdotgg/t3code#20931 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#20128 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: T3_CODE_ORCHESTRATION_INSTRUCTIONS has no carve-out for user- or repo-mandated CLI review workflows (unlike T3_CODE_BROWSER_TOOL_INSTRUCTIONS)Có thể đã có người làm @nivethass15102007-tech đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pingdotgg/t3code#19908 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accepted bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pingdotgg/t3code#19536 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
TomerAberbach/profiler-md#733 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
brentspine/brents-toasts#143 ·
-
🐛 bug 🗺️ DB Models & Ops
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
LibreChat-AI/LibreChat#17214 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Wavvon/Wavvon-clients#136 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
umami-software/umami#4637 ·
Maintainer thường phản hồi trong vòng 3 ngày