Skip to content

Claude/fix aiwb termux headless 2o m ey#190

Merged
juanitto-maker merged 2 commits intomainfrom
claude/fix-aiwb-termux-headless-2oMEy
Feb 25, 2026
Merged

Claude/fix aiwb termux headless 2o m ey#190
juanitto-maker merged 2 commits intomainfrom
claude/fix-aiwb-termux-headless-2oMEy

Conversation

@juanitto-maker
Copy link
Owner

No description provided.

Issue 1: /tmp is read-only on Termux. Add aiwb_mktemp() wrapper in
lib/common.sh that ensures TMPDIR exists before calling mktemp (which
honours TMPDIR on all platforms). Replace all 40+ bare mktemp calls
across lib/api.sh, lib/config.sh, lib/context_state.sh, lib/editor.sh,
lib/github.sh, lib/security.sh, and lib/swarm.sh. Also fix hardcoded
/tmp paths in aiwb cleanup, clear-old-context.sh, and the Termux
installer script.

Issue 2: getcwd() can fail when CWD is deleted (common on Termux after
app switches). Add early CWD guard in aiwb and aiwb_headless that
falls back to $HOME. Add safe_cwd() helper in lib/common.sh and use
it in lib/editor.sh detect_repo().

https://claude.ai/code/session_01S4LbuwcL52G82uE6YbskKQ
- Add --timeout flag to headless mode (default AIWB_HEADLESS_TIMEOUT or
  300s). Uses a background watchdog that saves partial output on timeout.
- Make verifier failure non-fatal in headless mode: if verification
  times out or fails, the generator output is still preserved and
  copied to --output.
- Always attempt --output copy after mode_run, even on failure, so
  partial results are available to the caller (Clide bot).
- Replace remaining $(pwd) calls in lib/editor.sh, lib/modes.sh, and
  lib/ui.sh with safe_cwd() for Termux CWD resilience.

https://claude.ai/code/session_01S4LbuwcL52G82uE6YbskKQ
@juanitto-maker juanitto-maker merged commit 161debf into main Feb 25, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants