Skip to content

Commit fd4c66c

Browse files
AnExiledDevclaude
andauthored
Release v2.2.1 — alias UX + session tokens path fix (#76)
* Add Claude Code Router + Codex CLI features, extract dashboard, restructure docs Container: - Add claude-code-router feature for LLM provider routing (DeepSeek, Gemini, OpenRouter) - Add codex-cli feature for OpenAI Codex terminal agent - Add defaults/ directory with factory config templates - Update ccusage feature with Codex support - Update auth scripts for new provider API keys Dashboard: - Extract dashboard/ to separate CodeDirective repository - Add dashboard/ to .gitignore (deprecated in monorepo) Documentation: - Restructure docs: getting-started → start-here, features/customization → use/customize - Move plugins/ under extend/ section - Add new reference pages: agents, skills, cli-tools, environment-variables - Consolidate architecture and troubleshooting in reference/ Housekeeping: - Gitignore temp directories and screenshots * Remove dashboard feature from devcontainer Dashboard extracted to separate CodeDirective repository. Remove: - codeforge-dashboard devcontainer feature - Dashboard port forwarding and config from devcontainer.json - Dashboard documentation page and sidebar references - Dashboard mentions from README, CLAUDE.md, and related docs * Remove deprecated container/.codeforge directory Configuration migrated to container/.devcontainer/defaults/codeforge/. The .codeforge directory at package root was a development artifact that should not ship with the npm package. * Add behavioral rules for Claude Code sessions New rules in defaults/codeforge/config/rules/: - auto-memory.md: memory constraints and staleness cleanup - zero-tolerance-bugs.md: bugs always in scope, must be fixed - scope-discipline.md: only user defines scope - explicit-start.md: never start without clear instruction - plan-presentation.md: compressed overview before full plan - surface-decisions.md: surface assumptions before acting * Update hook gate path to ~/.claude/disabled-hooks.json All plugin scripts now check ~/.claude/disabled-hooks.json instead of .codeforge/config/disabled-hooks.json for the hook disable list. * Update defaults configuration - settings.json: update to opus-4-7, reduce thinking tokens (31999), disable adaptive thinking, add effort_level max, adjust compaction thresholds, disable agent teams, add background tasks and no-flicker - main-system-prompt.md: streamline prompt content - file-manifest.json: update file list for new rules - claude-code-router.json: add default router configuration * Update agent definitions: remove worktree isolation, upgrade models - Remove isolation: worktree from write-capable agents (documenter, implementer, migrator, refactorer, test-writer) — run in main worktree - Upgrade investigator and security-auditor from sonnet to opus * Update documentation and refactor CLAUDE.md structure - Move devcontainer guide from CLAUDE.md to AGENTS.md - CLAUDE.md now uses @AGENTS.md include directive - docs: update changelog, cli-tools reference, troubleshooting - docs: remove dashboard references, fix sidebar formatting - deps: update docs package-lock.json * Pin agent models to opus-4-5 Update all 9 opus-based agents to use explicit model version opus-4-5. * Bump version to 2.2.0 with comprehensive changelog Update changelog with all changes since v2.1.1: - Claude Code Router and Codex CLI features - Dashboard feature removed from devcontainer - 6 new behavioral rules - Agent model pinning to opus-4-5 - Worktree isolation removed from write-capable agents - Configuration updates (opus-4-7, reduced thinking tokens, max effort) - Hook gate path changed to ~/.claude/ - Config directory restructure - Documentation overhaul Version updated in package.json and README.md. * Add effort frontmatter to all agents and skills Configure Opus 4.7 adaptive thinking via effort: field in frontmatter: - 19 agents: max (2), xhigh (10), high (4), medium (5) - 23 skills: xhigh (3), high (10), medium (9), low (1) Effort levels calibrated by task complexity: - max: architect, spec-writer (deep reasoning required) - xhigh: implementer, migrator, refactorer, etc. (code writing) - high: debug-logs, dependency-analyst, etc. (analysis tasks) - medium: explorer, bash-exec, etc. (simple operations) - low: worktree (basic git commands) * Add session tokens command for thinking token analysis - New `codeforge session tokens` command analyzes thinking token usage - Shows exact billed output tokens and visible content breakdown - Thinking Density table: % turns with thinking, avg chars, session intensity - Per-session breakdown: turns with thinking, density, avg chars per turn - Filter by --project, --model, --since, --until - Output formats: text (colorized) and JSON Bump CLI version to 0.2.0 * Add oh-my-claude devcontainer feature (disabled) Add oh-my-claude multi-provider proxy feature for Chinese LLM routing (Kimi, DeepSeek, Qwen, Zhipu, MiniMax). Feature is disabled pending refinement — omc install modifies settings.json despite --skip-* flags. Feature structure: - devcontainer-feature.json with version, autostart, providerAgentsOnly options - install.sh with backup/restore approach to protect settings.json - poststart-hook.sh for auto-starting proxy - README.md documenting usage and configuration Supporting changes: - .secrets.example: Add Chinese LLM provider API keys - disabled-hooks.json: Add omc memory/preference hooks - setup-aliases.sh: Add --disallowedTools for omc MCP tools, omc-apply alias - devcontainer.json: Add Chinese provider secrets (feature commented out) Note: claude-code-router also commented out pending router consolidation. * Ignore .research/ directory * Fix documentation and security issues from PR #71 review - Fix CLI version in README (0.1.0 → 0.2.0) - Update 16 path references in AGENTS.md (.codeforge/ → defaults/codeforge/) - Replace unsafe eval pattern with getent passwd in 9 install scripts The eval echo "~$USERNAME" pattern could theoretically allow command injection if username validation were removed in future changes. Using getent passwd is safer and matches the pattern already used in codex-cli/install.sh. * Fix container tests for new config location Update test.js to reference .devcontainer/defaults/codeforge/ instead of the removed .codeforge/ directory. Test 8 now validates the defaults directory structure rather than comparing against a source that no longer exists. * Fix disallowed tools alias splitting * Pass --thinking-display summarized in claude aliases Add `--thinking-display summarized` to cc, claude, ccw, and cc-orc so thinking output stays tidy in the terminal. ccraw stays vanilla. Also flip default viewMode from verbose to focus for a cleaner UI. * Fix session tokens --project filter for absolute paths The filter compared Claude's on-disk project slug (e.g. "-workspaces-projects-CodeForge") to the raw --project path (e.g. "/workspaces/projects/CodeForge"), which never matched — so passing an absolute path per the session-search convention returned zero sessions. Encode absolute and ./..-relative inputs to slug form (replace / and . with -) before comparing. Plain substrings without separators still pass through unchanged, so --project CodeForge keeps working. Bump CLI to 0.2.1 and add tokens.test.ts covering the transform. * Bump container to 2.2.1 Ships the UX changes from this staging cycle: - --thinking-display summarized in cc/claude/ccw/cc-orc aliases - viewMode focus default - Disallowed tools alias splitting fix * Implement session tokens --since / --until filters Both options were parsed but never applied in analyzeTokens, so they were silent no-ops. Apply them session-level using file mtime (last activity), skipping out-of-window files before the expensive per-file parse. Extract isFileWithinTimeRange as a pure, exported helper so the bound checks are unit-testable without fixture files. Inclusive on both ends. Folded into v0.2.1 CHANGELOG alongside the --project fix. * Set default effort level to high * Remove stale test-dashboard CI job The dashboard/ package was extracted in bd688a5 but its CI job remained, causing every CI run to fail with "No such file or directory" when the job tried to cd into the nonexistent dashboard/. Drop the job and its path filter. * Fix pathToProjectSlug on Windows resolve() on Windows returns backslash-separated paths (D:\a\foo), and the slug regex only replaced forward slashes, leaving backslashes unchanged in the output. Normalize \ to / before slugging so test-cli (windows-latest) passes. * Pin zod to v3 to unbreak docs build @astrojs/sitemap@3.7.2 declared zod@^4.3.6 as a direct dep, and zod-to-json-schema@3.25.2 (an astro transitive) accepts v3 or v4, so npm hoisted zod@4 at the root. Vite's SSR bundler then resolved "zod" to v4 during the docs build, which crashes Starlight's HeadConfigSchema (written for zod v3's z.record() single-arg form) with "Cannot read properties of undefined (reading '_zod')" while rendering the 404 route. - Pin @astrojs/sitemap to 3.7.0 (last zod-v3-compatible release); later versions use v4-only syntax internally so we can't just override zod for them. - Add an "overrides" block to force zod@3.25.76 across the tree so zod-to-json-schema stops hoisting v4. - Sync regenerated docs changelog (incidental, produced by the sync-changelog.mjs step in npm run build). Note: dependabot PR #57 would bump sitemap to 3.7.1 and re-break this. Close or ignore that PR. * Default to opus-4-5, add cc7/ccw7/cc-orc7 for opus-4-7 (#77) Flip ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_OPUS_MODEL in default settings.json from claude-opus-4-7 to claude-opus-4-5. Remove the global CLAUDE_CODE_MAX_CONTEXT_TOKENS and CLAUDE_CODE_AUTO_COMPACT_WINDOW env vars (they pinned 250k globally, which would exceed 4.5's 200k API ceiling). Move context-window control inline per alias: - cc / claude / ccw / cc-orc: 200k (opus-4-5) - cc7 / ccw7 / cc-orc7: 400k (opus-4-7) — new variants Thinking-related env vars (MAX_THINKING_TOKENS, adaptive-thinking flag, effort level) remain global. ccraw is unchanged. Also adds legacy-cleanup sed entries for cc7/ccw7/cc-orc7 so future renames stay idempotent, updates the Commands table in AGENTS.md, and documents the change in CHANGELOG.md. * Scope pathToProjectSlug leading-dash assertion to POSIX On Windows, resolve('./foo') returns a drive-letter path like D:\...\foo. The normalizer rewrites backslashes to forward slashes and the encoder replaces [./] with '-', producing e.g. D--a-CodeForge-foo. Starts with a letter, not a dash. Guard the POSIX-only startsWith('-') assertion on process.platform so Windows CI passes while keeping the POSIX contract tested. * Fix release.yml changelog extraction header pattern The sed pattern was matching '## [v${VERSION}]' (bracketed) but the container CHANGELOG uses unbracketed '## v${VERSION} — date' headers. The match always failed and release notes silently fell back to the 'Release v${VERSION}' placeholder. Switch to the same unbracketed pattern release-cli.yml uses (with a trailing space sentinel to avoid prefix collisions like v2.2.1 vs v2.2.10). --------- Co-authored-by: Claude <claude@anthropic.com>
1 parent 84714b9 commit fd4c66c

File tree

14 files changed

+261
-65
lines changed

14 files changed

+261
-65
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: CI
33
on:
44
push:
55
branches: [main, staging]
6-
paths: ['container/**', 'cli/**', 'dashboard/**']
6+
paths: ['container/**', 'cli/**']
77
pull_request:
88
branches: [main, staging]
9-
paths: ['container/**', 'cli/**', 'dashboard/**']
9+
paths: ['container/**', 'cli/**']
1010

1111
jobs:
1212
test:
@@ -52,13 +52,3 @@ jobs:
5252
working-directory: cli
5353
- run: bun test
5454
working-directory: cli
55-
56-
test-dashboard:
57-
runs-on: ubuntu-latest
58-
steps:
59-
- uses: actions/checkout@v6
60-
- uses: oven-sh/setup-bun@v2
61-
- run: bun install
62-
working-directory: dashboard
63-
- run: bun test
64-
working-directory: dashboard

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
id: changelog
5151
run: |
5252
VERSION="${{ needs.validate.outputs.version }}"
53-
NOTES=$(sed -n "/^## \[v${VERSION}\]/,/^## \[v/{ /^## \[v${VERSION}\]/d; /^## \[v/d; p; }" container/.devcontainer/CHANGELOG.md)
53+
NOTES=$(sed -n "/^## v${VERSION} /,/^## v/{ /^## v${VERSION} /d; /^## v/d; p; }" container/.devcontainer/CHANGELOG.md)
5454
if [ -z "$NOTES" ]; then
5555
NOTES="Release v${VERSION}"
5656
fi

cli/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CodeForge CLI Changelog
22

3+
## v0.2.1 — 2026-04-16
4+
5+
### Fixes
6+
7+
- **`session tokens --project` now works with absolute paths** — the filter was comparing an on-disk slug (e.g. `-workspaces-projects-CodeForge`) to the raw `--project` path (e.g. `/workspaces/projects/CodeForge`), which never matched. Absolute paths and paths starting with `./` / `../` are now encoded to Claude's slug form (replacing `/` and `.` with `-`) before matching. Plain substrings without separators still pass through unchanged, so `--project CodeForge` keeps working.
8+
- **`session tokens --since` / `--until` now actually filter results** — both options were parsed but never applied. Filtering is session-level and uses file mtime (last-activity time) so sessions outside the window are skipped without being parsed.
9+
310
## v0.2.0 — 2026-04-16
411

512
### New Command

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.2.0",
6+
"version": "0.2.1",
77
"description": "CLI for CodeForge development workflows",
88
"keywords": [
99
"codeforge",

cli/src/commands/session/tokens.ts

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import chalk from "chalk";
22
import type { Command } from "commander";
3-
import { basename } from "path";
3+
import { stat } from "fs/promises";
4+
import { basename, isAbsolute, resolve } from "path";
45
import { readLines } from "../../search/engine.js";
56
import { discoverSessionFiles } from "../../utils/glob.js";
67
import { parseRelativeTime, parseTime } from "../../utils/time.js";
@@ -80,6 +81,54 @@ function extractProjectFromPath(filePath: string): string | undefined {
8081
return undefined;
8182
}
8283

84+
/**
85+
* Normalize a user-provided --project value for matching against Claude's
86+
* on-disk project slugs.
87+
*
88+
* Claude encodes project cwds by replacing `/` and `.` with `-`, e.g.
89+
* /workspaces/projects/CodeForge -> -workspaces-projects-CodeForge
90+
* /workspaces/.devcontainer -> -workspaces--devcontainer
91+
*
92+
* Behavior:
93+
* - Absolute paths are converted to slug form.
94+
* - Relative paths beginning with `./` or `../` are resolved against cwd first.
95+
* - Plain substrings without separators pass through unchanged so users can
96+
* filter with `--project CodeForge` against the slug (backwards-compatible).
97+
*/
98+
export function pathToProjectSlug(input: string): string {
99+
const looksLikePath =
100+
isAbsolute(input) || input.startsWith("./") || input.startsWith("../");
101+
if (looksLikePath) {
102+
const abs = isAbsolute(input) ? input : resolve(input);
103+
// Normalize Windows separators so the slug logic (which encodes `/` and
104+
// `.` as `-`) produces identical output on all platforms. Without this,
105+
// `resolve("./foo")` on Windows returns `D:\...\foo` and the backslashes
106+
// leak through unchanged.
107+
const normalized = abs.replace(/\\/g, "/");
108+
return normalized.replace(/\/+$/, "").replace(/[./]/g, "-");
109+
}
110+
return input;
111+
}
112+
113+
/**
114+
* Pure check for whether a file's last-modified time falls within an optional
115+
* [since, until] window. Exported for direct unit testing without fixtures.
116+
*
117+
* Semantics:
118+
* - `since`: mtime must be >= since (inclusive)
119+
* - `until`: mtime must be <= until (inclusive)
120+
* - If both bounds are omitted, always returns true.
121+
*/
122+
export function isFileWithinTimeRange(
123+
mtime: Date,
124+
since?: Date,
125+
until?: Date,
126+
): boolean {
127+
if (since && mtime < since) return false;
128+
if (until && mtime > until) return false;
129+
return true;
130+
}
131+
83132
function isSubagentPath(filePath: string): boolean {
84133
return filePath.includes("/subagents/");
85134
}
@@ -304,11 +353,30 @@ async function analyzeTokens(options: {
304353
const mainSessions: SessionTokenStats[] = [];
305354
const subagentSessions: SessionTokenStats[] = [];
306355

356+
const projectNeedle = options.project
357+
? pathToProjectSlug(options.project)
358+
: undefined;
359+
360+
const hasTimeFilter = !!(options.since || options.until);
361+
307362
for (const filePath of files) {
308-
// Filter by project
309-
if (options.project) {
363+
// Filter by project (slug-to-slug match; absolute paths are encoded).
364+
if (projectNeedle) {
310365
const project = extractProjectFromPath(filePath);
311-
if (!project?.includes(options.project)) continue;
366+
if (!project?.includes(projectNeedle)) continue;
367+
}
368+
369+
// Filter by file mtime (session activity time) before the expensive
370+
// per-file parse. Sessions outside the window are skipped without reads.
371+
if (hasTimeFilter) {
372+
try {
373+
const st = await stat(filePath);
374+
if (!isFileWithinTimeRange(st.mtime, options.since, options.until)) {
375+
continue;
376+
}
377+
} catch {
378+
continue;
379+
}
312380
}
313381

314382
const stats = await analyzeSessionTokens(filePath);

cli/tests/tokens.test.ts

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import { describe, expect, test } from "bun:test";
2+
import {
3+
isFileWithinTimeRange,
4+
pathToProjectSlug,
5+
} from "../src/commands/session/tokens.js";
6+
7+
describe("pathToProjectSlug", () => {
8+
test("encodes absolute paths to claude's slug form", () => {
9+
expect(pathToProjectSlug("/workspaces/projects/CodeForge")).toBe(
10+
"-workspaces-projects-CodeForge",
11+
);
12+
});
13+
14+
test("encodes dotfiles with double dashes like claude does", () => {
15+
// /workspaces/.devcontainer -> /workspaces/-devcontainer (slash -> dash,
16+
// then the leading dot on the next segment becomes another dash)
17+
expect(pathToProjectSlug("/workspaces/.devcontainer")).toBe(
18+
"-workspaces--devcontainer",
19+
);
20+
});
21+
22+
test("strips trailing slashes before encoding", () => {
23+
expect(pathToProjectSlug("/workspaces/projects/CodeForge/")).toBe(
24+
"-workspaces-projects-CodeForge",
25+
);
26+
expect(pathToProjectSlug("/workspaces/projects/CodeForge///")).toBe(
27+
"-workspaces-projects-CodeForge",
28+
);
29+
});
30+
31+
test("passes plain substrings through unchanged for backwards compat", () => {
32+
// No separator -> user wants substring match against a slug
33+
expect(pathToProjectSlug("CodeForge")).toBe("CodeForge");
34+
expect(pathToProjectSlug("projects-CodeForge")).toBe("projects-CodeForge");
35+
});
36+
37+
test("resolves relative ./ and ../ paths before encoding", () => {
38+
const abs = pathToProjectSlug("./foo");
39+
// Resolved path always ends with /foo; after encoding trailing segment is -foo
40+
expect(abs.endsWith("-foo")).toBe(true);
41+
// On POSIX, resolved absolute paths start with `/` which encodes to `-`.
42+
// On Windows they start with a drive letter (e.g. `D:`) so the leading
43+
// `-` assertion is POSIX-only.
44+
if (process.platform !== "win32") {
45+
expect(abs.startsWith("-")).toBe(true);
46+
}
47+
48+
const abs2 = pathToProjectSlug("../bar");
49+
expect(abs2.endsWith("-bar")).toBe(true);
50+
});
51+
});
52+
53+
describe("isFileWithinTimeRange", () => {
54+
const jan1 = new Date("2026-01-01T00:00:00Z");
55+
const feb1 = new Date("2026-02-01T00:00:00Z");
56+
const mar1 = new Date("2026-03-01T00:00:00Z");
57+
58+
test("returns true when no bounds are given", () => {
59+
expect(isFileWithinTimeRange(feb1)).toBe(true);
60+
});
61+
62+
test("since: includes mtimes at or after the bound", () => {
63+
expect(isFileWithinTimeRange(feb1, jan1)).toBe(true);
64+
expect(isFileWithinTimeRange(feb1, feb1)).toBe(true); // inclusive
65+
expect(isFileWithinTimeRange(feb1, mar1)).toBe(false);
66+
});
67+
68+
test("until: includes mtimes at or before the bound", () => {
69+
expect(isFileWithinTimeRange(feb1, undefined, mar1)).toBe(true);
70+
expect(isFileWithinTimeRange(feb1, undefined, feb1)).toBe(true); // inclusive
71+
expect(isFileWithinTimeRange(feb1, undefined, jan1)).toBe(false);
72+
});
73+
74+
test("since + until: inclusive range", () => {
75+
expect(isFileWithinTimeRange(feb1, jan1, mar1)).toBe(true);
76+
expect(isFileWithinTimeRange(jan1, feb1, mar1)).toBe(false);
77+
expect(isFileWithinTimeRange(mar1, jan1, feb1)).toBe(false);
78+
});
79+
});

container/.devcontainer/AGENTS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ Config files deploy via `defaults/codeforge/file-manifest.json` on every contain
2222

2323
| Command | Purpose |
2424
|---------|---------|
25-
| `cc` / `claude` | Run Claude Code with auto-configuration |
25+
| `cc` / `claude` | Run Claude Code with auto-configuration (opus-4-5, 200k context) |
2626
| `codeforge config apply` | Deploy config files to `~/.claude/` (same as container start) |
2727
| `ccraw` | Vanilla Claude Code (bypasses config) |
28-
| `ccw` | Claude Code with writing system prompt |
29-
| `cc-orc` | Claude Code in orchestrator mode (delegation-first) |
28+
| `ccw` | Claude Code with writing system prompt (opus-4-5, 200k context) |
29+
| `cc-orc` | Claude Code in orchestrator mode, delegation-first (opus-4-5, 200k context) |
30+
| `cc7` / `ccw7` / `cc-orc7` | Claude Code on opus-4-7 with 400k context (main / writing / orchestrator modes) |
3031
| `codex` | OpenAI Codex CLI terminal coding agent |
3132
| `ccms` | Session history search _(disabled — requires Rust toolchain; uncomment in devcontainer.json to enable)_ |
3233
| `codeforge proxy` | Launch Claude Code through mitmproxy — inspect API traffic in browser (port 8081) |

container/.devcontainer/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# CodeForge Devcontainer Changelog
22

3+
## v2.2.1 — 2026-04-16
4+
5+
### Configuration
6+
7+
- **Default model changed to `claude-opus-4-5`**`ANTHROPIC_MODEL` and `ANTHROPIC_DEFAULT_OPUS_MODEL` in default settings flipped from `claude-opus-4-7` to `claude-opus-4-5`. Subagents also run on 4.5 by default.
8+
- **Per-alias context windows**`CLAUDE_CODE_MAX_CONTEXT_TOKENS` and `CLAUDE_CODE_AUTO_COMPACT_WINDOW` removed from global `settings.json env` (they pinned 250k globally, which would exceed 4.5's 200k ceiling). Context is now set inline per alias: `cc` / `claude` / `ccw` / `cc-orc` = 200k; `cc7` / `ccw7` / `cc-orc7` = 400k.
9+
- **New 4.7 alias variants**`cc7`, `ccw7`, `cc-orc7` run Claude Code on `claude-opus-4-7` with a 400k context window (main / writing / orchestrator system prompts respectively). Use these for sessions that need 4.7's larger window; use `cc` / `ccw` / `cc-orc` (now on 4.5) for standard work.
10+
- **Thinking display set to summarized**`cc`, `claude`, `ccw`, and `cc-orc` aliases now pass `--thinking-display summarized`, keeping the terminal tidy while still surfacing thinking. `ccraw` is unaffected (stays vanilla).
11+
- **View mode set to focus**`viewMode` changed from `verbose` to `focus` in default settings for a cleaner terminal UI.
12+
13+
### Fixes
14+
15+
- **Disallowed tools alias splitting** — oh-my-claude disallowed tools are now stored as a bash array and expanded per-argument in the Claude aliases, so `--disallowedTools` and each tool name are passed as separate argv entries in both bash and zsh.
16+
317
## v2.2.0 — 2026-04-16
418

519
### Claude Code Router

container/.devcontainer/defaults/codeforge/config/settings.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"autoCompact": true,
44
"alwaysThinkingEnabled": true,
55
"env": {
6-
"ANTHROPIC_MODEL": "claude-opus-4-7",
7-
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-7",
6+
"ANTHROPIC_MODEL": "claude-opus-4-5",
7+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5",
88
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
99
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
1010
"BASH_DEFAULT_TIMEOUT_MS": "120000",
@@ -13,13 +13,11 @@
1313
"MAX_MCP_OUTPUT_TOKENS": "10000",
1414
"MAX_THINKING_TOKENS": "31999",
1515
"CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING": "1",
16-
"CLAUDE_CODE_EFFORT_LEVEL": "max",
16+
"CLAUDE_CODE_EFFORT_LEVEL": "high",
1717
"MCP_TIMEOUT": "120000",
1818
"MCP_TOOL_TIMEOUT": "30000",
1919
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "80",
2020
"FORCE_AUTOUPDATE_PLUGINS": "1",
21-
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "250000",
22-
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "250000",
2321
"CLAUDE_CODE_SCROLL_SPEED": "3",
2422

2523
"ENABLE_TOOL_SEARCH": "auto:5",
@@ -51,7 +49,7 @@
5149
},
5250
"autoMemoryDirectory": "./.claude/memory",
5351
"plansDirectory": "./.claude/plans",
54-
"viewMode": "verbose",
52+
"viewMode": "focus",
5553
"spinnerVerbs": {
5654
"mode": "replace",
5755
"verbs": [

container/.devcontainer/scripts/setup-aliases.sh

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ for rc in ~/.bashrc ~/.zshrc; do
6161
sed -i "/^alias claude='/d" "$rc"
6262
sed -i "/^alias ccraw='/d" "$rc"
6363
sed -i "/^alias ccw='/d" "$rc"
64+
sed -i "/^alias cc7='/d" "$rc"
65+
sed -i "/^alias ccw7='/d" "$rc"
66+
sed -i "/^alias cc-orc7='/d" "$rc"
6467
sed -i '/^alias check-setup=/d' "$rc"
6568
# cc-tools function from old format
6669
if grep -q "^cc-tools()" "$rc" 2>/dev/null; then
@@ -93,14 +96,35 @@ else
9396
fi
9497
9598
# oh-my-claude tools to disable (memory, preferences, coworker - keep only proxy tools)
96-
# Note: no quotes around tool names - they don't contain spaces and quotes would be passed literally
97-
_OMC_DISALLOWED_TOOLS='--disallowedTools mcp__oh-my-claude__remember mcp__oh-my-claude__recall mcp__oh-my-claude__get_memory mcp__oh-my-claude__forget mcp__oh-my-claude__list_memories mcp__oh-my-claude__memory_status mcp__oh-my-claude__compact_memories mcp__oh-my-claude__clear_memories mcp__oh-my-claude__summarize_memories mcp__oh-my-claude__add_preference mcp__oh-my-claude__list_preferences mcp__oh-my-claude__get_preference mcp__oh-my-claude__update_preference mcp__oh-my-claude__delete_preference mcp__oh-my-claude__match_preferences mcp__oh-my-claude__preference_stats mcp__oh-my-claude__coworker_task'
98-
99-
alias cc='CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --system-prompt-file "\$CLAUDE_CONFIG_DIR/main-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions \$_OMC_DISALLOWED_TOOLS'
100-
alias claude='CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --system-prompt-file "\$CLAUDE_CONFIG_DIR/main-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions \$_OMC_DISALLOWED_TOOLS'
99+
_OMC_DISALLOWED_TOOLS=(
100+
--disallowedTools
101+
mcp__oh-my-claude__remember
102+
mcp__oh-my-claude__recall
103+
mcp__oh-my-claude__get_memory
104+
mcp__oh-my-claude__forget
105+
mcp__oh-my-claude__list_memories
106+
mcp__oh-my-claude__memory_status
107+
mcp__oh-my-claude__compact_memories
108+
mcp__oh-my-claude__clear_memories
109+
mcp__oh-my-claude__summarize_memories
110+
mcp__oh-my-claude__add_preference
111+
mcp__oh-my-claude__list_preferences
112+
mcp__oh-my-claude__get_preference
113+
mcp__oh-my-claude__update_preference
114+
mcp__oh-my-claude__delete_preference
115+
mcp__oh-my-claude__match_preferences
116+
mcp__oh-my-claude__preference_stats
117+
mcp__oh-my-claude__coworker_task
118+
)
119+
120+
alias cc='CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000 CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --system-prompt-file "\$CLAUDE_CONFIG_DIR/main-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions --thinking-display summarized "\${_OMC_DISALLOWED_TOOLS[@]}"'
121+
alias claude='CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000 CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --system-prompt-file "\$CLAUDE_CONFIG_DIR/main-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions --thinking-display summarized "\${_OMC_DISALLOWED_TOOLS[@]}"'
101122
alias ccraw='command "\$_CLAUDE_BIN"'
102-
alias ccw='CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --system-prompt-file "\$CLAUDE_CONFIG_DIR/writing-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions \$_OMC_DISALLOWED_TOOLS'
103-
alias cc-orc='CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --system-prompt-file "\$CLAUDE_CONFIG_DIR/orchestrator-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions \$_OMC_DISALLOWED_TOOLS'
123+
alias ccw='CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000 CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --system-prompt-file "\$CLAUDE_CONFIG_DIR/writing-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions --thinking-display summarized "\${_OMC_DISALLOWED_TOOLS[@]}"'
124+
alias cc-orc='CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000 CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --system-prompt-file "\$CLAUDE_CONFIG_DIR/orchestrator-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions --thinking-display summarized "\${_OMC_DISALLOWED_TOOLS[@]}"'
125+
alias cc7='CLAUDE_CODE_MAX_CONTEXT_TOKENS=400000 CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000 CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --model claude-opus-4-7 --system-prompt-file "\$CLAUDE_CONFIG_DIR/main-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions --thinking-display summarized "\${_OMC_DISALLOWED_TOOLS[@]}"'
126+
alias ccw7='CLAUDE_CODE_MAX_CONTEXT_TOKENS=400000 CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000 CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --model claude-opus-4-7 --system-prompt-file "\$CLAUDE_CONFIG_DIR/writing-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions --thinking-display summarized "\${_OMC_DISALLOWED_TOOLS[@]}"'
127+
alias cc-orc7='CLAUDE_CODE_MAX_CONTEXT_TOKENS=400000 CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000 CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 "\$_CLAUDE_WRAP" "\$_CLAUDE_BIN" --model claude-opus-4-7 --system-prompt-file "\$CLAUDE_CONFIG_DIR/orchestrator-system-prompt.md" --permission-mode plan --allow-dangerously-skip-permissions --thinking-display summarized "\${_OMC_DISALLOWED_TOOLS[@]}"'
104128
alias ccr-apply='codeforge config apply && (ccr restart 2>/dev/null || ccr start) && echo "CCR config applied and restarted"'
105129
alias omc-apply='codeforge config apply && (omc proxy restart 2>/dev/null || omc proxy start) && echo "OMC config applied and proxy restarted"'
106130
@@ -131,11 +155,14 @@ BLOCK_EOF
131155
done
132156

133157
echo "[setup-aliases] Aliases configured:"
134-
echo " cc -> claude with \$CLAUDE_CONFIG_DIR/main-system-prompt.md"
135-
echo " claude -> claude with \$CLAUDE_CONFIG_DIR/main-system-prompt.md"
158+
echo " cc -> claude (opus-4-5, 200k ctx) with \$CLAUDE_CONFIG_DIR/main-system-prompt.md"
159+
echo " claude -> claude (opus-4-5, 200k ctx) with \$CLAUDE_CONFIG_DIR/main-system-prompt.md"
136160
echo " ccraw -> vanilla claude without any config"
137-
echo " ccw -> claude with \$CLAUDE_CONFIG_DIR/writing-system-prompt.md"
138-
echo " cc-orc -> claude with \$CLAUDE_CONFIG_DIR/orchestrator-system-prompt.md (delegation mode)"
161+
echo " ccw -> claude (opus-4-5, 200k ctx) with \$CLAUDE_CONFIG_DIR/writing-system-prompt.md"
162+
echo " cc-orc -> claude (opus-4-5, 200k ctx) with \$CLAUDE_CONFIG_DIR/orchestrator-system-prompt.md (delegation mode)"
163+
echo " cc7 -> claude (opus-4-7, 400k ctx) with \$CLAUDE_CONFIG_DIR/main-system-prompt.md"
164+
echo " ccw7 -> claude (opus-4-7, 400k ctx) with \$CLAUDE_CONFIG_DIR/writing-system-prompt.md"
165+
echo " cc-orc7 -> claude (opus-4-7, 400k ctx) with \$CLAUDE_CONFIG_DIR/orchestrator-system-prompt.md (delegation mode)"
139166
echo " ccr-apply -> redeploy claude-code-router config + restart daemon"
140167
echo " cc-tools -> list all available CodeForge tools"
141168
echo " check-setup -> verify CodeForge setup health"

0 commit comments

Comments
 (0)