mirror of
https://github.com/NikkeTryHard/zerogravity.git
synced 2026-04-25 15:15:59 +03:00
[GH-ISSUE #51] v1.3.1: MITM replaces system prompt with dummy, breaking custom personas/context #43
Labels
No labels
bug
enhancement
enhancement
notice
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/zerogravity#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @terryops on GitHub (Feb 22, 2026).
Original GitHub issue: https://github.com/NikkeTryHard/zerogravity/issues/51
Problem
After upgrading from v1.2.x to v1.3.1, the MITM modify step replaces the original system prompt content with a "dummy prompt" in the
USER_REQUESTwrapper. This strips all custom context injected by the API client (persona definitions, workspace paths, user preferences, tool instructions, etc.).Evidence from logs
The original system prompt was 132,984 chars of custom context (persona, workspace config, user preferences, memory files). After MITM modification, this was replaced with a generic dummy prompt.
Impact
/home/user/instead of the actual workspace)Reproduction
Expected behavior
The original system prompt / USER_REQUEST content from the client should be preserved (or at least an option to preserve it). The MITM layer can still do its other modifications (tool injection, thinking config, etc.) without replacing the user's custom context.
Environment
ghcr.io/nikketryhard/zerogravity:latest)/v1/chat/completionsendpoint@DarKWinGTM commented on GitHub (Feb 22, 2026):
Maybe we need to attach context (Multi source) from dumb and from custom user + do not cut content from another source of context.
@NikkeTryHard commented on GitHub (Feb 22, 2026):
on it
@terryops commented on GitHub (Feb 22, 2026):
Workaround: System-prompt-to-user proxy
We found a workaround by placing a small HTTP proxy between our API client and ZeroGravity. The proxy moves the
systemmessage content into the firstusermessage (wrapped in<system_context>tags) before forwarding to ZG.Since ZG preserves the
USER_REQUESTwrapper content but replaces the system prompt, embedding our context in the user message ensures it survives the MITM modification.Verification
Before proxy (system prompt stripped):
→ Model only saw the bare user message, lost all persona/workspace context
After proxy (system prompt injected into user message):
→ Model saw the full 154k chars of context and correctly followed persona instructions, used correct file paths, etc.
Proxy code (Node.js)
Then point your API client's baseUrl from
http://localhost:8741/v1tohttp://localhost:8740/v1.Downsides
saved_pct=-453, i.e. 4.5x larger) since the system prompt is now duplicated in the user messageA native option in ZG to preserve the original system prompt / USER_REQUEST content would be the ideal fix.
@NikkeTryHard commented on GitHub (Feb 22, 2026):
should be fixed in the latest version v1.3.2 please retest