hermes - 💡(How to fix) Fix [Feature]: on Termux: make hermes update reuse pip cache before rebuilding Python dependencies [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#16826Fetched 2026-04-29 06:38:49
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×2

On Termux, hermes update appears to reinstall Python dependencies on every run, even when nothing relevant changed. I would prefer pip to reuse existing cache/wheels first, instead of triggering repeated source builds for packages that were already built successfully before. On my device this can take about an hour, so the downtime is noticeable.

Error Message

hermes update runs the Python dependency install path unconditionally, so the logs often show repeated build / build wheel work.

Root Cause

On Termux, hermes update appears to reinstall Python dependencies on every run, even when nothing relevant changed. I would prefer pip to reuse existing cache/wheels first, instead of triggering repeated source builds for packages that were already built successfully before. On my device this can take about an hour, so the downtime is noticeable.

RAW_BUFFERClick to expand / collapse

Problem or Use Case

Termux: make hermes update reuse pip cache before rebuilding Python dependencies

Summary

On Termux, hermes update appears to reinstall Python dependencies on every run, even when nothing relevant changed. I would prefer pip to reuse existing cache/wheels first, instead of triggering repeated source builds for packages that were already built successfully before. On my device this can take about an hour, so the downtime is noticeable.

Why this is a problem

Termux often has fewer prebuilt wheels than desktop platforms, so source builds are expected when Hermes dependencies change or when Python/ABI changes after pkg upgrade. But when none of those changed, rebuilding everything again is unnecessarily expensive and slow.

Observed behavior

hermes update runs the Python dependency install path unconditionally, so the logs often show repeated build / build wheel work.

Expected behavior

If the dependency set and environment have not changed, I would prefer hermes update to let pip reuse existing cache/wheels first instead of forcing a fresh rebuild.

Likely source of the behavior

The update flow in hermes_cli/main.py re-runs Python dependency installation during hermes update, which means pip does not get a chance to reuse what is already available locally.

Environment

  • Hermes Agent on Termux / Android
  • Python dependencies installed via pip install -e '.[termux]' -c constraints-termux.txt

Impact

This makes hermes update much slower than it needs to be on Android devices and wastes CPU/battery on repeated rebuilds of unchanged dependencies.

Proposed Solution

Suggested fix

Let pip try cache/wheel reuse first and only rebuild when it actually needs to. If a guard is needed, a lightweight stamp based on pyproject.toml, constraints-termux.txt, and the current Python version would be enough.

If Hermes does need to run a build path on Termux, it would also help to set ANDROID_API_LEVEL automatically from getprop ro.build.version.sdk in both hermes update and install flows, so users who forget to export it are still covered. The manual install docs already mention this, but having the CLI set it would reduce avoidable setup failures. If the value cannot be determined, failing fast with a clear error would also be fine.

Alternatives Considered

No response

Feature Type

Developer experience (tests, docs, CI)

Scope

Medium (few files, < 300 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

extent analysis

TL;DR

Modify the hermes update flow to allow pip to reuse existing cache and wheels before rebuilding Python dependencies.

Guidance

  • Review the hermes_cli/main.py file to understand how the update flow is currently implemented and identify where the Python dependency installation is being re-run.
  • Consider adding a check to see if the dependency set and environment have changed before re-running the installation, and use this check to determine whether to reuse existing cache and wheels or rebuild.
  • Implement a lightweight stamp based on pyproject.toml, constraints-termux.txt, and the current Python version to guard against unnecessary rebuilds.
  • Set ANDROID_API_LEVEL automatically from getprop ro.build.version.sdk in both hermes update and install flows to reduce setup failures.

Example

No code snippet is provided as the issue does not contain sufficient information to generate a specific example.

Notes

The proposed solution requires modifications to the hermes_cli/main.py file and may involve additional changes to the hermes update flow. The exact implementation details will depend on the specific requirements and constraints of the project.

Recommendation

Apply workaround: Modify the hermes update flow to reuse existing cache and wheels before rebuilding Python dependencies, as this is likely to significantly improve performance on Termux devices.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

If the dependency set and environment have not changed, I would prefer hermes update to let pip reuse existing cache/wheels first instead of forcing a fresh rebuild.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Feature]: on Termux: make hermes update reuse pip cache before rebuilding Python dependencies [2 comments, 2 participants]