Claude/fix aiwb termux headless 2o m ey#190
Merged
juanitto-maker merged 2 commits intomainfrom Feb 25, 2026
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.