<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: a13418414529</title>
    <description>The latest articles on DEV Community by a13418414529 (@a13418414529).</description>
    <link>https://dev.to/a13418414529</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4092655%2Fd0822168-e949-416d-82c5-6e861a2845ba.png</url>
      <title>DEV Community: a13418414529</title>
      <link>https://dev.to/a13418414529</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/a13418414529"/>
    <language>en</language>
    <item>
      <title>Running DeepSeek Harness on an Android Phone: 5 Gotchas the Official Docs Never Mention</title>
      <dc:creator>a13418414529</dc:creator>
      <pubDate>Mon, 24 Aug 2026 16:21:08 +0000</pubDate>
      <link>https://dev.to/a13418414529/running-deepseek-harness-on-an-android-phone-5-gotchas-the-official-docs-never-mention-1o9m</link>
      <guid>https://dev.to/a13418414529/running-deepseek-harness-on-an-android-phone-5-gotchas-the-official-docs-never-mention-1o9m</guid>
      <description>&lt;h1&gt;
  
  
  Running DeepSeek Harness (DSH) on an Android Phone: 5 Gotchas the Official Docs Never Mention
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Everyone writes "how to install it." I write "where it dies after install, and how to save it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;DeepSeek Harness (DSH) officially assumes you're running on "a proper Linux server or desktop." I stubbornly decided to run it on an &lt;strong&gt;Android phone&lt;/strong&gt; as a pocket terminal, and ran straight into a pile of pitfalls that &lt;strong&gt;the official docs never mention and Google can't find&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Below are the 5 gotchas, each with the root cause and the fix, documented exactly as I hit them. If you're also fighting DSH inside Android / Termux / proot, this will save you half a day.&lt;/p&gt;




&lt;h2&gt;
  
  
  Gotcha 1: FUSE doesn't support hard links, so session persistence just dies
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Symptom&lt;/strong&gt;: Start a session in a proot-mounted directory, and the very first "save session to disk" throws an error. The session never gets written.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Root cause&lt;/strong&gt;: Android's &lt;code&gt;/sdcard&lt;/code&gt; runs on the &lt;strong&gt;FUSE filesystem&lt;/strong&gt;, and FUSE &lt;strong&gt;does not support the hard-link syscall &lt;code&gt;link()&lt;/code&gt;&lt;/strong&gt;. DSH's session-persistence code uses &lt;code&gt;link()&lt;/code&gt; to do an "atomic write" (write a temp file, then &lt;code&gt;link()&lt;/code&gt; it into the final name — the classic Linux atomic-write trick). It works fine on a normal ext4, but hits FUSE and dies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Replace all &lt;code&gt;link()&lt;/code&gt; calls in the persistence logic with &lt;code&gt;rename()&lt;/code&gt;. &lt;code&gt;rename()&lt;/code&gt; is supported on FUSE and gives the same "atomic replace" semantics:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;link&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;tmpfile, finalfile&lt;span class="o"&gt;)&lt;/span&gt;   &lt;span class="c"&gt;# ❌ fails on FUSE&lt;/span&gt;
rename&lt;span class="o"&gt;(&lt;/span&gt;tmpfile, finalfile&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="c"&gt;# ✅ works on FUSE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where exactly: the module in DSH's source that handles "session persistence" — &lt;code&gt;grep 'link('&lt;/code&gt; will find it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Gotcha 2: &lt;code&gt;dsh web&lt;/code&gt; appears to hang — because &lt;code&gt;DSH_HOME&lt;/code&gt; isn't set
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Symptom&lt;/strong&gt;: After starting &lt;code&gt;dsh web&lt;/code&gt;, the process seems "up", but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the UI just sits there, looks unresponsive&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ss&lt;/code&gt; / &lt;code&gt;netstat&lt;/code&gt; can't find any listening port, so you think it never started&lt;/li&gt;
&lt;li&gt;but &lt;code&gt;curl&lt;/code&gt; says it's &lt;strong&gt;actually reachable&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Root cause&lt;/strong&gt;: DSH's web mode reads/writes the directory pointed to by &lt;code&gt;DSH_HOME&lt;/code&gt; on startup. If that env var is &lt;strong&gt;not set&lt;/strong&gt;, it spins in circles on a non-existent default path — a "started but not fully started" zombie state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Explicitly export &lt;code&gt;DSH_HOME&lt;/code&gt; before starting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;DSH_HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/data/data/com.termux/files/home/.dsh
dsh web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set it, and the port listens properly and the UI responds normally.&lt;/p&gt;




&lt;h2&gt;
  
  
  Gotcha 3: three CLI behavior traps that will make you question your sanity
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;3.1 &lt;code&gt;dsh --help&lt;/code&gt; blocks&lt;/strong&gt;: it should dump help text instantly, but on some versions it &lt;strong&gt;hangs and never returns&lt;/strong&gt;. When that happens, just &lt;code&gt;Ctrl+C&lt;/code&gt; or read the README — don't wait for it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.2 headless mode has no continuous conversation&lt;/strong&gt;: the headless (no-UI) mode is &lt;strong&gt;not&lt;/strong&gt; a one-question-one-answer REPL you can keep chatting in. Every turn has to be kicked off fresh; to get continuous conversation you need an external wrapper script holding the context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.3 &lt;code&gt;--resume&lt;/code&gt; is position-sensitive&lt;/strong&gt;: put it in the wrong place (before vs after the subcommand) and it either silently does nothing or throws. The correct form:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dsh &amp;lt;subcommand&amp;gt; &lt;span class="nt"&gt;--resume&lt;/span&gt; &amp;lt;session_id&amp;gt;   &lt;span class="c"&gt;# ✅ trailing, right after the subcommand&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Gotcha 4: web mode is basically a dead end on a phone — go CLI
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Symptom&lt;/strong&gt;: &lt;code&gt;sharp&lt;/code&gt; (the image library the web mode depends on) is software-hobbled here, and performance is &lt;strong&gt;terrible&lt;/strong&gt; — the page freezes constantly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;: Inside a &lt;strong&gt;non-native environment&lt;/strong&gt; like Android / proot, DSH's web mode (which leans on native Node modules + image processing) is a dead end. &lt;strong&gt;Drop web, go CLI&lt;/strong&gt; — that's the correct way on a phone:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;lightweight, no image processing needed&lt;/li&gt;
&lt;li&gt;can be scripted and combined with voice input&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Gotcha 5: don't use AI text-to-image for diagrams — Chinese text WILL come out garbled
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Symptom&lt;/strong&gt;: I wanted an infographic for this article, so I generated one with an AI image model (SiliconFlow / Zhipu, etc.). The image came out, but &lt;strong&gt;all the Chinese text was a garbled mess&lt;/strong&gt;, unreadable even by OCR.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Root cause&lt;/strong&gt;: AI image models essentially "paint" glyphs pixel by pixel. For complex scripts like Chinese, both recognition and generation are unreliable — the hanzi they paint are almost always near-miss garbage. This is a universal weakness of all AI image models, not any one vendor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Render your diagrams with code instead — &lt;strong&gt;write the text in HTML/CSS or SVG, then render to PNG&lt;/strong&gt;. Text is 100% accurate and never garbled. It's also the most professional way to illustrate a technical article.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Side note: DSH's CLI also has &lt;strong&gt;no &lt;code&gt;plugin&lt;/code&gt; subcommand&lt;/strong&gt; — don't try to drive it like the plugin framework.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Root cause (one line)&lt;/th&gt;
&lt;th&gt;Fix (one line)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;FUSE doesn't support &lt;code&gt;link()&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;switch to &lt;code&gt;rename()&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;DSH_HOME&lt;/code&gt; unset → web hangs&lt;/td&gt;
&lt;td&gt;&lt;code&gt;export DSH_HOME=...&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;three CLI traps&lt;/td&gt;
&lt;td&gt;wrapper script for headless, mind arg order&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;web is hopeless on a phone&lt;/td&gt;
&lt;td&gt;go CLI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;AI image gen garbles Chinese&lt;/td&gt;
&lt;td&gt;render via HTML/SVG&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;📌 Full article + more command examples, plus the SVG source: &lt;strong&gt;github.com/a13418414529/dsh-android-guide&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8ypa96wmfpu9b1g48t9o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8ypa96wmfpu9b1g48t9o.png" alt=" " width="800" height="1429"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>deepseek</category>
      <category>android</category>
      <category>deepseekharness</category>
      <category>termux</category>
    </item>
  </channel>
</rss>
