Skip to content

fix(whatsapp): write pairing code to file for immediate access#745

Merged
gavrielc merged 1 commit intoqwibitai:mainfrom
glifocat:upstream/fix-pairing-code-display
Mar 6, 2026
Merged

fix(whatsapp): write pairing code to file for immediate access#745
gavrielc merged 1 commit intoqwibitai:mainfrom
glifocat:upstream/fix-pairing-code-display

Conversation

@glifocat
Copy link
Copy Markdown
Collaborator

@glifocat glifocat commented Mar 5, 2026

Fixes #747

Type of Change

  • Skill - adds a new skill in .claude/skills/
  • Fix - bug fix or security fix to source code
  • Simplification - reduces or simplifies source code

Description

When using pairing code auth in a buffered execution context (e.g. Claude Code's Bash tool), stdout is held until the process exits (~120s). By then the 60-second pairing code window has already expired.

Write the pairing code to store/pairing-code.txt immediately when ready, so callers can poll the file and show the code within seconds. Update the add-whatsapp skill instructions to use a background process + file-poll pattern.

For Skills

  • I have not made any changes to source code
  • My skill contains instructions for Claude to follow (not pre-built code)
  • I tested this skill on a fresh clone

The pairing code was only emitted to stdout, which is buffered by the
calling process and not visible until the auth command exits (~120s).
By also writing to store/pairing-code.txt the moment the code is ready,
callers can poll that file and display the code to the user within seconds
instead of after the 60s expiry window.

Update the add-whatsapp skill instructions to use the background +
file-poll pattern instead of waiting on buffered stdout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@gavrielc gavrielc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Clean fix for the buffered stdout timing issue.

@gavrielc gavrielc merged commit be19911 into qwibitai:main Mar 6, 2026
5 checks passed
terrylica pushed a commit to terrylica/nanoclaw that referenced this pull request Mar 8, 2026
# [1.3.0](v1.2.0...v1.3.0) (2026-03-08)

### Bug Fixes

* add-voice-transcription skill drops WhatsApp registerChannel call ([qwibitai#766](https://github.com/terrylica/nanoclaw/issues/766)) ([47ad2e6](47ad2e6))
* aggressive false positive prevention — 5-layer MiniMax pipeline, devil's advocate round, FP learning ([8bfa372](8bfa372))
* atomic claim prevents scheduled tasks from executing twice ([qwibitai#657](https://github.com/terrylica/nanoclaw/issues/657)) ([f794185](f794185)), closes [qwibitai#138](https://github.com/terrylica/nanoclaw/issues/138) [qwibitai#138](https://github.com/terrylica/nanoclaw/issues/138) [qwibitai#211](https://github.com/terrylica/nanoclaw/issues/211) [qwibitai#300](https://github.com/terrylica/nanoclaw/issues/300) [qwibitai#578](https://github.com/terrylica/nanoclaw/issues/578) [qwibitai#601](https://github.com/terrylica/nanoclaw/issues/601) [qwibitai#138](https://github.com/terrylica/nanoclaw/issues/138) [qwibitai#300](https://github.com/terrylica/nanoclaw/issues/300) [qwibitai#138](https://github.com/terrylica/nanoclaw/issues/138)
* cc-skills now reads label strategy + content types; Claude JSON parsing hardened ([fd7fc7f](fd7fc7f))
* correct misleading send_message tool description for scheduled tasks ([qwibitai#729](https://github.com/terrylica/nanoclaw/issues/729)) ([ec0e42b](ec0e42b))
* **db:** add LIMIT to unbounded message history queries ([qwibitai#692](https://github.com/terrylica/nanoclaw/issues/692)) ([qwibitai#735](https://github.com/terrylica/nanoclaw/issues/735)) ([74b02c8](74b02c8))
* format src/index.ts to pass CI prettier check ([qwibitai#711](https://github.com/terrylica/nanoclaw/issues/711)) ([df2bac6](df2bac6)), closes [qwibitai#710](https://github.com/terrylica/nanoclaw/issues/710)
* grant write permissions to CLAUDE.md maintenance claude -p call ([9ddb433](9ddb433))
* rename _chatJid to chatJid in onMessage callback ([1436186](1436186))
* use 'state' instead of 'stateReason' for gh compatibility on bigblack ([a4f2e92](a4f2e92))
* **whatsapp:** add error handling to messages.upsert handler ([qwibitai#695](https://github.com/terrylica/nanoclaw/issues/695)) ([5e3d8b6](5e3d8b6))
* **whatsapp:** write pairing code to file for immediate access ([qwibitai#745](https://github.com/terrylica/nanoclaw/issues/745)) ([be19911](be19911))

### Features

* add /add-ollama skill for local model inference ([qwibitai#712](https://github.com/terrylica/nanoclaw/issues/712)) ([298c3ea](298c3ea))
* add ast-grep rules for Python static analysis ([a548761](a548761))
* add mise deploy task for bigblack deployment ([c39a1f4](c39a1f4))
* add NDJSON telemetry logging for all Telegram messages ([7f64ea6](7f64ea6))
* add update_task tool and return task ID from schedule_task ([68123fd](68123fd))
* cc-skills integration — enhanced issue creation with taxonomy-aware labels, type-specific templates, and discovery provenance ([602e65d](602e65d))
* CLAUDE.md maintenance creates GitHub issues with full link to Telegram ([ba34620](ba34620))
* CLAUDE.md maintenance, devil's advocate fix, OpenGrep + proactive scanning ([ce66e88](ce66e88))
* confidence scoring, verification scripts, log rotation — 3 more FP prevention layers ([0ff2c3c](0ff2c3c))
* iterative MiniMax self-validation (3 adversarial rounds) ([fc05aff](fc05aff))
* Phase 0 — enable Telegram channel and Docker Compose deployment ([ebbf59c](ebbf59c))
* Phase 2 — MiniMax orchestrator loop for continuous validation ([17e90a3](17e90a3))
* proactive algo correctness scanning with full Telegram + GitHub issue reporting ([4b68c3e](4b68c3e))
* **skills:** add image vision skill for WhatsApp ([qwibitai#770](https://github.com/terrylica/nanoclaw/issues/770)) ([af937d6](af937d6))
* **skills:** add pdf-reader skill ([qwibitai#772](https://github.com/terrylica/nanoclaw/issues/772)) ([0b260ec](0b260ec))
* **skills:** add use-local-whisper skill package ([qwibitai#702](https://github.com/terrylica/nanoclaw/issues/702)) ([03f792b](03f792b))
* timezone-aware context injection for agent prompts ([qwibitai#691](https://github.com/terrylica/nanoclaw/issues/691)) ([632713b](632713b)), closes [qwibitai#483](https://github.com/terrylica/nanoclaw/issues/483) [qwibitai#483](https://github.com/terrylica/nanoclaw/issues/483) [qwibitai#526](https://github.com/terrylica/nanoclaw/issues/526)
* whole-repo scanning instead of 3-file batches ([1ace951](1ace951))
* wire trace UUIDs into all Telegram notifications ([b48f0e9](b48f0e9))
onesmash pushed a commit to onesmash/nanoclaw that referenced this pull request Mar 14, 2026
…tai#745)

The pairing code was only emitted to stdout, which is buffered by the
calling process and not visible until the auth command exits (~120s).
By also writing to store/pairing-code.txt the moment the code is ready,
callers can poll that file and display the code to the user within seconds
instead of after the 60s expiry window.

Update the add-whatsapp skill instructions to use the background +
file-poll pattern instead of waiting on buffered stdout.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
squarewings pushed a commit to squarewings/nanoclaw that referenced this pull request Mar 15, 2026
…tai#745)

The pairing code was only emitted to stdout, which is buffered by the
calling process and not visible until the auth command exits (~120s).
By also writing to store/pairing-code.txt the moment the code is ready,
callers can poll that file and display the code to the user within seconds
instead of after the 60s expiry window.

Update the add-whatsapp skill instructions to use the background +
file-poll pattern instead of waiting on buffered stdout.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
bogdano2 pushed a commit to bogdano2/nanoclaw that referenced this pull request Mar 17, 2026
…tai#745)

The pairing code was only emitted to stdout, which is buffered by the
calling process and not visible until the auth command exits (~120s).
By also writing to store/pairing-code.txt the moment the code is ready,
callers can poll that file and display the code to the user within seconds
instead of after the 60s expiry window.

Update the add-whatsapp skill instructions to use the background +
file-poll pattern instead of waiting on buffered stdout.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
onlyforart pushed a commit to onlyforart/nanoclaw that referenced this pull request Mar 27, 2026
…tai#745)

The pairing code was only emitted to stdout, which is buffered by the
calling process and not visible until the auth command exits (~120s).
By also writing to store/pairing-code.txt the moment the code is ready,
callers can poll that file and display the code to the user within seconds
instead of after the 60s expiry window.

Update the add-whatsapp skill instructions to use the background +
file-poll pattern instead of waiting on buffered stdout.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
XiRoSe pushed a commit to XiRoSe/nova-agent that referenced this pull request Apr 9, 2026
…tai#745)

The pairing code was only emitted to stdout, which is buffered by the
calling process and not visible until the auth command exits (~120s).
By also writing to store/pairing-code.txt the moment the code is ready,
callers can poll that file and display the code to the user within seconds
instead of after the 60s expiry window.

Update the add-whatsapp skill instructions to use the background +
file-poll pattern instead of waiting on buffered stdout.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
dm-j pushed a commit to dm-j/nanoclaw that referenced this pull request Apr 13, 2026
…tai#745)

The pairing code was only emitted to stdout, which is buffered by the
calling process and not visible until the auth command exits (~120s).
By also writing to store/pairing-code.txt the moment the code is ready,
callers can poll that file and display the code to the user within seconds
instead of after the 60s expiry window.

Update the add-whatsapp skill instructions to use the background +
file-poll pattern instead of waiting on buffered stdout.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@glifocat glifocat deleted the upstream/fix-pairing-code-display branch April 14, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Fix Bug fix Status: Needs Review Ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(whatsapp): pairing code expires before caller can display it

3 participants