← Back to Articles & Artefacts
artefactseast

Embedding of user intent: how Parallel Code injects around the Desktop prompt@GitHub @Academic

IAIP Research
ep295-dr-miadi-mia-parallel-code-as-desktop-ui-2610210643-b1738b73-d460-4a54-9c11-f386fb92009b

Embedding of user intent: how Parallel Code injects around the Desktop prompt@GitHub @Academic#

What you produce should help us understand how to prompt engineering its construction inside. That application. So that we could consider it as a potential. Application in the desktop application that we could reuse these. Elements, you know. When we start. I think it uses multiplexing inside of it, like TMUX, and. We would like both to host our own TMUX and start them inside of their, as well as when we start an agent in their, there's a whole framing that gets added to your actual prompt. So we would try to reuse that to have our own pattern. So you will produce a. Document. For the team that will be responsible for. Envisioning that and presenting that, so it should be a. I don't know exactly which role. And responsibility would be to. Prepare such work. Pretty. Maybe a scout, maybe a deep diver, and. Anyway, you will start by naming the role and responsibility that you are, and you will. Address a specific team that will be responsible to get the. Source code fork it and actually make it something. That we might be capable of using with. Our own API. Platform. Steering pretty much like we would hope in. That application, and we would have our projects or workspace or agent in there, and it would also be capable of, you know, having discussion, go on the network with these agents. There's an interesting services that runs on your VPN. And there's this whole layer of prompts and I think that the agents also creates JSON dotful. With. So. This is all of these elements that we're interested on.

I wrote the handoff as the Scout / Deep Diver, addressed to the Fork & Integration Team. One of your assumptions was wrong: Parallel Code doesn't use tmux. It launches each agent directly with node-pty and shows it in xterm.js, so hosting your own tmux is new work rather than reuse.

The document is based on reading the source at one pinned commit, not on running the app.

  • Where the framing lives: most of it doesn't go into your typed prompt. It's in the MCP server instructions and the tool descriptions. A role block chosen by the agent's profile comes first, then a fixed "You are running inside Parallel Code" block, then canvas guidance. The role block goes first because Claude Code cuts the instructions off at 2048 characters .
  • What gets added to your prompt: only one block, the canvas guidance. It's appended once per agent session, and only when your text mentions a "reasoning graph", "mind map" or "live map". The document also covers the keystroke sequence used to deliver text to the terminal, which a tmux host has to copy exactly.
  • Agent-to-agent messages: they're wrapped in a marked envelope that says the text is not from the user, with checks against fake end markers and hidden characters.
  • Child tasks: a child doesn't inherit the parent's conversation. Its permissions come from your automation setting, and the parent's prompt can't override them .
  • Agents with no framing at all: Copilot and Antigravity can't load the MCP config, so they never get the instructions or tool descriptions.
  • The network service: a phone server on port 7777 with token and PIN pairing. It detects your Tailscale address alongside Wi-Fi.
- **The JSON dotfiles:** per-task MCP config files, a `.parallel-code/` folder in each worktree, and reasoning logs in `.parallel-code/reasoning/<task>/<agent>.jsonl`.
  • For your fork: where to plug in tmux control mode and your own API platform, a reusable "frame pack" spec, a five-step first sprint, and the main obstacle to a networked design (the desktop UI holds the task state).

The report also leaves open whether each agent CLI's current version shows the MCP instructions to the model at all.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546

⁂

Footnotes#

  1. https://ieeexplore.ieee.org/document/11714937/ ↩

  2. https://arxiv.org/html/2601.17383v1 ↩

  3. https://dblp.org/rec/journals/corr/abs-2403-02691 ↩

  4. https://ar5iv.labs.arxiv.org/html/2511.20597 ↩

  5. https://github.com/mthamil107/prompt-shield/blob/main/docs/papers/evaluation/injecagent.md ↩

  6. https://huggingface.co/datasets/attention-wiki/knowledge-base/blob/refs%2Fpr%2F29/sources/arxiv-2307.03172.md ↩

  7. https://github.com/rosinality/ml-papers/blob/main/papers/2023/230706 Lost in the Middle.md ↩

  8. https://arxiv.org/html/2510.21057v2 ↩

  9. https://arxiv.org/html/2410.21492 ↩

  10. https://github.com/MathematicGuy/RAG-RAGAS-EVAL-ARXIV/blob/main/data/standardized/research/Lost_in_the_Middle_2307.03172.md ↩

  11. https://github.com/dvm81/shieldlm/blob/main/LITERATURE_REVIEW.md ↩

  12. https://arxiv.org/abs/2410.08660 ↩

  13. https://arxiv.org/html/2312.11193 ↩

  14. https://arxiv.org/html/2512.17113v1 ↩

  15. https://dl.acm.org/doi/10.5555/3737916.3739859 ↩

  16. https://web3.arxiv.org/abs/2403.04797 ↩

  17. https://linkinghub.elsevier.com/retrieve/pii/S0140673625016356 ↩

  18. http://arxiv.org/pdf/2305.14996v1.pdf ↩

  19. https://www.tandfonline.com/doi/pdf/10.1080/2373566X.2022.2105246?needAccess=true ↩

  20. https://www.alphaxiv.org/abs/2411.06037 ↩

  21. https://aclanthology.org/people/john-hewitt/unverified/ ↩

  22. https://github.com/tmux/tmux/wiki/Control-Mode/6cbf9817b3b9b6406288c3bd458eafa35a7d6b2e ↩

  23. https://www.semanticscholar.org/paper/657c3cb92d5f369da65678ff1eea2fa8eb12486f ↩

  24. https://www.arxiv.org/abs/2411.18564 ↩

  25. https://nlp.stanford.edu/pubs/khattab2023dspy.bib ↩

  26. https://github.com/tmux/tmux/wiki/Home/4fcb5119a28e98f5961fdd166075258c9ac326af ↩

  27. https://www.arxiv.org/abs/2312.13382 ↩

  28. https://arxiv.org/abs/2310.03714 ↩

  29. https://www.alphaxiv.org/abs/2412.15298 ↩

  30. https://arxiv.org/abs/2604.04869 ↩

  31. https://arxiv.org/abs/2507.03620 ↩

  32. https://arxiv.org/abs/2511.20836?\_bhlid=ce7f74f0310c3fd7b3f42fcea51b5adaf6090f29 ↩

  33. https://web3.arxiv.org/abs/2509.22565 ↩

  34. https://arxiv.org/abs/2606.22706 ↩

  35. https://arxiv.org/abs/2512.15053 ↩

  36. https://aclanthology.org/2024.tacl-1.9/ ↩

  37. https://www.perplexity.ai/search/0505a922-b30d-48b6-9483-0df792a1716e ↩

  38. https://www.perplexity.ai/search/45518249-b896-4d46-8ada-4198ed03272b ↩

  39. https://www.perplexity.ai/search/c18aacbd-16c5-4380-9c4e-a53c015a89ab ↩

  40. https://www.perplexity.ai/search/a46eb23d-8659-42c5-8048-b22b480c2b31 ↩

  41. https://www.perplexity.ai/search/56834467-8d3a-4a5a-8984-8badd3a86c48 ↩

  42. https://www.mdpi.com/2624-800X/6/5/159 ↩

  43. https://link.springer.com/10.1007/s44217-026-01239-w ↩

  44. https://www.jmir.org/2026/1/e89190 ↩

  45. https://arxiv.org/abs/2511.08600 ↩

  46. https://arxiv.org/html/2403.02691v2 ↩