{"_id":"@dhrxv29/autocodex","name":"@dhrxv29/autocodex","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@dhrxv29/autocodex","version":"0.1.0","description":"Paste a Codex thread id. Autocodex waits out the usage limit and resumes that same session.","type":"module","bin":{"autocodex":"dist/cli.js"},"exports":{".":"./dist/index.js"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test":"tsx --test test/*.test.ts","start":"node dist/cli.js","dev":"tsx src/cli.ts","prepack":"npm run build","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/dhrxv8/autocodex.git"},"homepage":"https://github.com/dhrxv8/autocodex","publishConfig":{"access":"public"},"engines":{"node":">=22"},"keywords":["codex","openai","cli","usage-limit","resume"],"author":{"name":"Dhruv Rao"},"license":"MIT","private":false,"devDependencies":{"@types/node":"^24.3.0","@types/react":"^19.2.18","tsx":"^4.20.5","typescript":"^5.9.2"},"dependencies":{"ink":"^7.1.1","react":"^19.2.8"},"gitHead":"7087ed55c2d663aa622dde40565525db0abeda54","_id":"@dhrxv29/autocodex@0.1.0","bugs":{"url":"https://github.com/dhrxv8/autocodex/issues"},"_nodeVersion":"26.8.1","_npmVersion":"11.19.0","dist":{"integrity":"sha512-8Qx6ZO372/m0tE4AhHGHe77WbXpSMIB1ckFPrzeDkdBU7utGyDGwjsEcQRGh7dVEOGLodrGe3jzjrU97/SnHlg==","shasum":"bdfd177a1cf4feb53fe02f6d9c433168be64f6f2","tarball":"https://registry.npmjs.org/@dhrxv29/autocodex/-/autocodex-0.1.0.tgz","fileCount":60,"unpackedSize":222332,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHesCelV1v3eTFRIT+mZKow+71YIeW7YFKv0dA01wMEAAiEA1pfH6h4Dfe/HZThGV7JtP1VgZ0MGufXEfXGlHZdCvnM="}]},"_npmUser":{"name":"dhrxv29","email":"dhruvrao500@gmail.com"},"directories":{},"maintainers":[{"name":"dhrxv29","email":"dhruvrao500@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/autocodex_0.1.0_1788889016083_0.27685672182441823"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-08T17:36:55.828Z","0.1.0":"2026-09-08T17:36:56.233Z","modified":"2026-09-08T17:36:56.421Z"},"maintainers":[{"name":"dhrxv29","email":"dhruvrao500@gmail.com"}],"description":"Paste a Codex thread id. Autocodex waits out the usage limit and resumes that same session.","homepage":"https://github.com/dhrxv8/autocodex","keywords":["codex","openai","cli","usage-limit","resume"],"repository":{"type":"git","url":"git+https://github.com/dhrxv8/autocodex.git"},"author":{"name":"Dhruv Rao"},"bugs":{"url":"https://github.com/dhrxv8/autocodex/issues"},"license":"MIT","readme":"# autocodex\n\nPaste a Codex thread id. That's the whole setup.\n\n```bash\nnpx autocodex\n```\n\n1. Run that (Node 22+).\n2. Paste the id. In Codex type `/status` and copy the bit that looks like `thr_…`.\n3. Done. On a Mac you can close the window — it keeps watching.\n\nWhen Codex hits a usage limit, autocodex waits for the real reset time, then continues **that same chat**. It never starts a new one.\n\n## 2-minute check\n\nNo Codex account needed. This only checks that the tracker opens.\n\n1. `node -v` — needs v22 or newer.\n2. `npx autocodex`\n3. You should see **Paste a Codex thread id** and a box that says type `/status` / copy `thr_…`.\n4. Type `thr_demo` and press Enter.\n5. You should see **tracking** and **Auto-resume ON**.\n6. Press `q` to quit.\n\nIf step 2 says to open a terminal, do that — this is a terminal app, not a web page.\n\nTo actually continue a real Codex chat after a limit, Codex must already be installed and signed in on this Mac (`codex login`). Autocodex never asks for an API key.\n\n## What works today\n\n### Implemented and verified (tests, fake clock, no Codex binary)\n\n- First-run screen: paste an id, with a hard-to-miss `/status` tip\n- Track that same chat (`watch`)\n- Wait until the official reset time\n- Resume the **same** id and send **one** continue prompt (never twice for the same reset)\n- Refuse `--last` / a different chat\n- If Codex is still using the chat: stay on that id, show “close that Codex window”, retry\n- Background helper on a Mac (tests fake `launchctl`; never print its raw errors)\n- Every failure shows **one** plain-English next step\n\n### Needs a live Codex install (not run in CI)\n\n- Talking to real `codex app-server`\n- A real usage-limit wait and a real continue after reset\n- The Mac helper surviving sleep and reboot on your machine\n\n### Not published yet\n\n`npx autocodex` works **after** this package is on npm. Until then, from a clone: `npm install && npm run build && node dist/cli.js`.\n\nCI does **not** ship a mock continue to your real Codex. Tests use a fake Codex and a fake clock.\n\n## Why\n\nCodex does not continue by itself after a usage-limit reset. Autocodex waits for the official time, then resumes the same session. It does not bypass limits, scrape the screen, or start a new chat.\n\n## From source / power users\n\n```bash\nnpm install\nnpm test\nnpm run typecheck\nnpm run build\nnode dist/cli.js            # same tracker as npx autocodex\nnode dist/cli.js status     # text status\nnode dist/cli.js watch thr_…  # track without the UI\n```\n\n| What | Path |\n| --- | --- |\n| Mac helper | `~/Library/LaunchAgents/com.autocodex.agent.plist` |\n| Saved state | `~/.autocodex/state.sqlite` |\n| Helper logs | `~/.autocodex/daemon.stdout.log` and `daemon.stderr.log` |\n\nLinux: leave the tracker window open (no background helper).\n\nIf Codex itself is still open on that chat, close it. Autocodex will retry the **same** id. It will not start a different chat.\n\nA continue may auto-accept Codex’s “allow this?” prompts so it can finish unattended. Change those settings in Codex, not here.\n\n## Advanced CLI\n\n```bash\nautocodex enable              # on + start Mac helper\nautocodex disable             # off + stop helper\nautocodex daemon              # used by the helper\nautocodex status\nautocodex sessions\nautocodex watch <sessionId>\nautocodex step\nautocodex cancel [sessionId]\nautocodex logs [--limit 50]\n```\n\n`--data-dir` defaults to `~/.autocodex`. `--poll-seconds` (default 30) is only how often it wakes; the reset time in the database is what matters.\n\n## Publish to npm (maintainers)\n\nThe name `autocodex` is free on npm. From this repo, logged in to npm as the owner:\n\n```bash\nnpm publish --access public\n```\n\nThat builds `dist/` first, then uploads `dist/`, `README.md`, and `LICENSE`.\n\nIf npm asks for a one-time password, type the 2FA code. There is no publish without that login.\n\n## License\n\nMIT.\n\n## Hard rules\n\n- Official Codex only. No screen scraping.\n- Same chat id only. Missing id is an error. Never `--last`, never a new chat.\n- One continue per reset. Never spend extra quota to skip a limit.\n","readmeFilename":"README.md","_rev":"1-dadfc84b88378c21116f011b0f44f073"}