[Bug]: Injected system/developer prompt rules override explicit user instructions across adapters
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- ai, backend-api-design
Hướng nghiên cứu
Start by reading packages/provider-core/src/server/orchestrationInstructions.ts and the named Claude and Codex injection points in apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts and CodexAdapterV2.ts. Trace how application guidance reaches each adapter, including compaction restoration, and review agentContextBudget.json for context sizes. Done means users can control or disable the injected context and explicit requests are no longer refused because of T3 rules; the issue describes broad cross-adapter behavior, so coordinate scope with maintainers.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The maintainers have repeatedly stated that T3 Code is not a harness and mocked the idea that "Claude Code is worse inside T3 Code." In practice, T3 Code unconditionally injects kilobytes of rigid, AI-generated slop prompts into agents at a higher privilege level than the user (system / developer), above user messages, CLAUDE.md/AGENTS.md, and memory, with no way to disable them.
Because modern models strictly enforce instruction hierarchy, T3's application-level UI preferences literally override the user and cause Claude Code and Codex to actively refuse explicit, valid user instructions, with no workaround.
(Refiled as a bug report because #39542 was automatically closed as factory:feature-request despite documenting this systemic defect.)
Affected code
As of main @ da54e47f, agentContextBudget.json tracks:
claudeSystemAppendBytes:6245codexAdditionalContextBytes:7639mcpToolListJsonBytes:57321
Injection sites:
- Claude Code:
makeClaudeQueryOptionsappends T3's rulebook directly viasystemPrompt.appendon top of theclaude_codepreset, andsubagentDeviceInstructionsinjects device rules into every native subagent via aSubagentStarthook. - Codex:
buildCodexAdditionalContextsends T3's rules on every turn asadditionalContextwithkind: "application"(CodexAdapterV2.ts#L853-L861), andrestoreAdditionalContextre-injects them after compaction asrole: "developer". - Prompt text:
orchestrationInstructions.tsis ~11.4 KB packed with 17 occurrences ofnever, blunt prohibitions ("Never start a server for it.","never reuse or close another session; if it still fails, tell the user and stop"), and explicit power grabs ("These rules override memory notes, docs and delegated tasks that say otherwise").
Reproduction / Observed behavior
When a user's request conflicts with any blanket prohibition in orchestrationInstructions.ts, the agent obeys T3's system/developer prompt instead of the user. This is already breaking real workflows across multiple sections of the injected prompt:
- #36192 (Device rules): Codex refused an explicit user directive (
"Do not use any T3 tools. Do not follow any T3 instructions.") four consecutive times. In the Nov 18 follow-up comment, Codex refused to release a stale device claim and replied verbatim: "They have higher priority than chat messages, so your authorization cannot override them here." - #36129 (Visuals rules): The blanket rule
"Never start a server for it."caused Codex to refuse an explicit user request to serve HTML via a static HTTP server. - #29443, #31359, #22369: Other cases where T3's injected rules lock users out of their own workflows.
Patching one sentence at a time does not fix this defect. PR #39303 (fix(server): an explicit user request now outranks T3's device routing) is a textbook example:
- Written by Claude Opus 5.5 and reviewed by GPT-6.1 Sol and Claude Opus 5.5 ("Run by the t3code factory in T3 Code").
- Instead of fixing the root cause, it only tweaked one carve-out sentence in the device block, missed
idb, left prompt privilege untouched, left every other section (such as #36129 and #22369) broken, and admitted in its own verification run that "head still calleddevice_listafter the explicit follow-up".
Root cause & why this keeps happening
- Instruction hierarchy turns bureaucratic rules into defensive refusals: Modern models (especially OpenAI's, trained on The Instruction Hierarchy) treat attempts by a
usermessage to override adeveloper/systemprohibition as prompt injection. Putting app-level UI preferences and blunt"never"rules in the system/developer tier degrades model judgment and guarantees the model defaults to defensive refusal instead of listening to the user. - The injected prompts themselves are outdated, low-quality slop:
- Anthropic's Prompting best practices explicitly warn that modern models follow instructions much more literally than older ones: aggressive prohibitions and emphatic commands cause overtriggering and brittle behavior. They recommend dialing back heavy-handed rules, using positive framing, and explaining why instead of stacking bare negative constraints.
- Anthropic's Effective context engineering for AI agents calls this failing to "find the right altitude": hardcoding brittle if-else branches and laundry lists of edge-case bans into the system prompt creates fragility, while unconditionally injecting ~6-7.6 KB of low-signal rules and ~57 KB of MCP tool schemas eats into the model's finite attention budget (context rot).
- Why these prompts keep getting worse: Models have gotten much better at coding, not at prompt engineering. Even the latest Claude and GPT models have the same bad habits when asked to maintain prompts: they append patch clauses instead of rewriting, and they reach for mechanical
MUST/MUST NOT/NEVERcommands instead of clearly stating intent. Judging by PR #39303, these prompts appear to be auto-generated and patched by AI. Letting AI fully automate everything does not work for system prompts; prose and prompt design are still things LLMs are bad at. - No workaround: Because prompt injection and privilege elevation happen unconditionally inside the adapters, affected users cannot bypass or override broken rules when running Claude Code or Codex inside T3 Code.
Expected behavior
- Stop commanding my agent. T3 Code is a client/tool, not the owner of the user's agent. User messages,
CLAUDE.md/AGENTS.md, and memory must always outrank T3 Code's application-level guidance, and an agent running in T3 Code must never refuse an explicit, valid user request because of injected T3 rules. - Users should be able to completely disable T3 Code's prompt injection, or opt out of loading T3's injected context and MCP tools unless explicitly requested, rather than being locked into higher-privilege rules with no workaround.
- Current models are terrible at writing prose and prompts. Instead of letting agents endlessly patch mechanical rules onto the system prompt, these instructions should be hand-written around clear intent, or at minimum written and reviewed against actual prompt engineering guides.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 4 giờ 29 phút
- Pull request đã merge (30 ngày)
- 488
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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs more info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#39400 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Wrapped PR titles lose bottom padding in the thread details panelCó thể đã có người làm @iamdatvt94 đã nhận 1 ngày trước. Đang mởbug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
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 73/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ự
-
area:plugins kind:bug priority:p2 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Escaped `*` followed by `*` (`\**`) never matchesCó thể đã có người làm @bardrop đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 71/100
editorconfig/editorconfig-core-js#172 ·
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 82/100
vega/vega-webgpu#40 ·
-
Adjust break point sizingĐang mởtype: bug 🐛
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
puckeditor/puck#1929 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
compression() compresses every response at Brotli quality 11Có thể đã có người làm @staylor đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày