Skip to content

Instantly share code, notes, and snippets.

View patleeman's full-sized avatar
🤷‍♂️

Patrick Lee patleeman

🤷‍♂️
View GitHub Profile
@patleeman
patleeman / EXTENSION_SYSTEM_REPORT.md
Created June 8, 2026 17:02
Neon Pilot local extension system report - Thread Kanban

Thread Kanban Extension System Report

Context

This was the first local user extension built in this Neon Pilot install. The extension lives at:

~/.local/state/neon-pilot/extensions/thread-kanban
@patleeman
patleeman / codex-desktop-deeplinks.md
Created May 27, 2026 16:00
Codex Desktop codex:// deep-link mapping for 26.519.81530
@patleeman
patleeman / ds4-q158-experiment-prompt.md
Created May 16, 2026 11:52
DS4 64GB Mac 1.58-bit quantization experiment prompt

DS4 64GB Mac Quantization Experiment Prompt

We want to investigate whether antirez/ds4 can be modified to produce a smaller-than-current-Q2 DeepSeek V4 Flash GGUF that may fit and run on a 64GB MacBook.

Context:

  • DS4 currently uses a DeepSeek V4 Flash-specific quantization scheme.
  • Current Q2 is not whole-model 2-bit. It aggressively quantizes routed MoE experts while leaving sensitive non-expert tensors at higher precision.
  • Existing DS4 Q2 policy:
    • routed expert gate/up: IQ2_XXS
    • routed expert down: Q2_K
@patleeman
patleeman / README.md
Last active June 4, 2026 08:02
How OpenAI Codex implements the /goal slash command -- persisted long-running task objectives

Codex /goal Implementation

How OpenAI's Codex CLI implements the /goal slash command for persisted long-running task objectives.

The /goal command sets a persisted objective for a long-running task. It's a five-layer system: a SQLite table stores one goal per thread with status (active/paused/budget_limited/complete), optional token budget, and running usage counters. The app-server exposes thread/goal/set/get/clear JSON-RPC methods. The model sees three tools — create_goal, update_goal(complete), and get_goal — but can't pause/resume; those are system-controlled. A runtime event bus hooks into turn lifecycle to track token + wall-clock deltas for accounting, auto-pauses on interrupt, auto-reactivates paused goals on thread resume, and injects budget-limit steering into the model's response stream. The TUI handles the /goal slash command and displays goal state in the status bar.

Author: etraut-openai | 5 PRs, ~15K additions, landed in ~10 days (Apr 16–25, 2026)


@patleeman
patleeman / pi-openai-native-compaction.ts
Created April 10, 2026 17:26
Single-file Pi extension for native OpenAI/Codex compaction replay
/**
* Pi extension: native OpenAI / Codex compaction replay.
*
* What it does:
* - On Pi compaction, call OpenAI's native compact endpoint
* - Keep Pi's normal text summary for portability
* - Store the opaque native replacement history in compaction details
* - On later supported requests, replace Pi's summary replay with native replay
*
* Usage:
@patleeman
patleeman / README.md
Created April 23, 2025 20:39
Sunsplode HDR Script
@patleeman
patleeman / build.sh
Created October 10, 2019 14:57
Example build script for project Meristem.
#!/bin/bash
# Set git fetch match pattern to fetch all branches.
# If this isn't set, running git fetch may not pull all the branches we need.
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git clone ${REPO_URL} tmp/
cd tmp/
git fetch --all
@patleeman
patleeman / build.sh
Created October 10, 2019 14:57
Example build script for project Meristem.
#!/bin/bash
# Set git fetch match pattern to fetch all branches.
# If this isn't set, running git fetch may not pull all the branches we need.
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git clone ${REPO_URL} tmp/
cd tmp/
git fetch --all
@patleeman
patleeman / userChrome.css
Last active February 14, 2019 14:00
Firefox userChrome.css for use with treestyletabs
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* to hide the native tabs */
.toolbar-items {
visibility: collapse;
}
/* to hide the sidebar header */
#sidebar-header {
visibility: collapse;
Accept:image/webp,image/apng,image/*,*/*;q=0.8
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Cookie:lkqdid=rzYCEP95q7M; p_0=H4sIAAAAAAAAAJWQPU4EMQyFG0DRaqsgLdPQDQKBPMqPndi3oECinjiTZkWzFFyPC3ACBFyFEazSb_dZen5-z5vJPNiRuLETiTBrC4DeIQgRQZEY14FzDmH4_nz_ON9MZjpJb8zZ8HWki07mSJPZnnh9Z8emKYlmhrDUDFi5gnhUICxlZi2sWbv-yo4J54RNERTJAzpiKJocaI2UUDWiSk879ow3R7o2t_bSZ0kuCjuXMcTMlKiv3PWV-07QC0Y75sWXuYmutRa3BuAEHDRDK54bxqyplu6G3YM65e7Gdpz9-iKhCqG4tX6o6-NiaRBVwrK0ULW54edPvzNity_P-8c3ej0c9vXp_8ov66Qu8vUBAAA
Host:t.lkqd.net
Pragma:no-cache
Referer:http://disqusads.com/ads-iframe/prebid/?aol=0&experiment=network_default&safetylevel=30&lq=0&serverbid=0&thumbnails_allowed=1&display_only=0&forum_pk=2581396&position=top&forum_shortname=<censored>&appnexus=0&category=culture&display_bidding_enabled=1&stories_allowed=1&service=dynamic&display_allowed=1&video_allowed=1&provider=prebid&adx=0&t=1504719092&rubicon=0&sandbox_display=1&links_allowed=1&doublewide_allowed=1&shortname=<c