Skip to content

cleanup: remove dead USER_TYPE branches from non-stubbed modules - #637

Closed
Flo5k5 wants to merge 2 commits into
Twigpine:mainfrom
Flo5k5:cleanup/remove-dead-user-type-branches
Closed

Flo5k5 wants to merge 2 commits into
Twigpine:mainfrom
Flo5k5:cleanup/remove-dead-user-type-branches

Conversation

@Flo5k5

@Flo5k5 Flo5k5 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove ~45 process.env.USER_TYPE === 'ant' checks that gate purely internal/dead code across 28 source files
  • Continues the cleanup started in cleanup: remove dead USER_TYPE branches from fast mode and setup #315 by gnanam1990
  • Categories removed: undercover guards, internal CLI commands (/bridge-kick, /tag, /files, /version), bridge debug infrastructure (fault injection, SIGUSR2 handler, debug handles), internal tool stubs (REPLTool, TungstenTool, ConfigTool, SuggestBackgroundPRTool), internal performance/analytics instrumentation, and internal insights remote host collection

Does NOT touch USER_TYPE gates that protect useful features (agent nesting in constants/tools.ts, effort overrides, sandbox config, computer use).

Files changed (28 files, -607 lines)

Category Files
Undercover guards commit.ts, commit-push-pr.ts
Internal CLI commands bridge-kick.ts, tag/index.ts, files/index.ts, version.ts
Bridge debug infra replBridge.ts, bridgeMain.ts, bridgeUI.ts, bridgeConfig.ts, initReplBridge.ts, sessionRunner.ts
Internal tools tools.ts
Internal state/perf state.ts, print.ts
Internal insights insights.ts, context-noninteractive.ts
Misc internal code update.ts, osc.ts, caches.ts, conversation.ts, cost/index.ts, cost/cost.ts, initMode.ts, feedback/index.ts, createMovedToPluginCommand.ts, thinkback-play.ts, readOnlyValidation.ts

Test plan

  • bun run build compiles successfully
  • bun run smoke passes
  • Verify no regressions in external user workflows (commit, PR, feedback, insights commands)
  • Verify bridge/remote-control mode still works for non-ant users

Remove ~45 process.env.USER_TYPE === 'ant' checks that gate purely
internal code: debug logging, internal CLI commands, undercover mode
guards, bridge testing infrastructure, and internal tool includes.

Continues the cleanup started in Twigpine#315. Does NOT touch USER_TYPE gates
that protect useful features (agent nesting, effort overrides, sandbox
config, computer use).

Categories removed:
- Undercover guards (isUndercover() always returns false)
- Internal CLI commands (/bridge-kick, /tag, /files, /version)
- Bridge debug infrastructure (fault injection, signal handlers)
- Internal tool stubs (REPLTool, TungstenTool, ConfigTool)
- Internal performance/analytics instrumentation
- Internal insights remote host collection
Copilot AI review requested due to automatic review settings April 12, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes process.env.USER_TYPE === 'ant'-guarded branches that previously enabled internal-only behaviors across CLI commands, bridge/debug infrastructure, tools registration, and analytics/insights paths—continuing the dead-code cleanup started in #315.

Changes:

  • Eliminates ant-only branches for internal CLI commands and internal-only prompt/UX behaviors.
  • Removes ant-only bridge debug/fault-injection hooks and related dev overrides.
  • Removes ant-only tool wiring and internal insights/remote-host collection logic.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/tools/BashTool/readOnlyValidation.ts Removes ant-only command allowlist merge from read-only validation.
src/tools.ts Removes ant-only tool registration paths and internal tool conditional imports.
src/ink/termio/osc.ts Removes ant-only gating for OSC 21337 support check (now hard-disabled).
src/commands/version.ts Disables internal-only /version command.
src/commands/thinkback-play/thinkback-play.ts Removes internal marketplace routing; always uses official marketplace id.
src/commands/tag/index.ts Disables internal-only /tag command.
src/commands/insights.ts Removes internal remote-host collection + internal feedback sections from insights flow.
src/commands/initMode.ts Removes ant auto-enable path for NEW_INIT; now only env-controlled.
src/commands/files/index.ts Disables internal-only /files command.
src/commands/feedback/index.ts Removes ant-only suppression from feedback command enablement logic.
src/commands/createMovedToPluginCommand.ts Removes ant-only plugin-install instructions branch; uses public/private marketplace path only.
src/commands/cost/index.ts Removes ant-only visibility override for /cost.
src/commands/cost/cost.ts Removes ant-only “show cost anyway” branch for subscribers.
src/commands/context/context-noninteractive.ts Removes ant-only internal sections from noninteractive context output.
src/commands/commit.ts Removes undercover instruction injection branch from commit prompt.
src/commands/commit-push-pr.ts Removes undercover branch that altered reviewer/changelog/slack steps.
src/commands/clear/conversation.ts Removes ant-only env session-id mutation during conversation clear.
src/commands/clear/caches.ts Removes ant-only tungsten session usage cache clearing hook.
src/commands/bridge-kick.ts Disables internal-only /bridge-kick command.
src/cli/update.ts Removes ant-only package-name selection from manual update guidance.
src/cli/print.ts Removes ant-only exit-after-first-render timing path.
src/bridge/sessionRunner.ts Removes ant-only verbose fallback for bridge session debug logs.
src/bridge/replBridge.ts Removes ant-only bridge fault injection, SIGUSR2 handler, and debug handle plumbing.
src/bridge/initReplBridge.ts Removes ant-only session ingress URL override; always uses baseUrl.
src/bridge/bridgeUI.ts Removes ant-only debug log path banner output.
src/bridge/bridgeMain.ts Removes ant-only debug log path wiring and session ingress override.
src/bridge/bridgeConfig.ts Removes ant-only dev override readers for bridge token/base URL (now stubbed).
src/bootstrap/state.ts Removes ant-only state shape and slow-operation tracking implementation (now no-op).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ink/termio/osc.ts
Comment thread src/bridge/bridgeConfig.ts Outdated
Comment thread src/tools.ts
Comment thread src/tools/BashTool/readOnlyValidation.ts
Comment thread src/commands/insights.ts Outdated
@Flo5k5
Flo5k5 marked this pull request as draft April 12, 2026 20:04
1. osc.ts: rewire supportsTabStatus() to tengu_terminal_sidebar feature
   flag instead of hardcoding false
2. tools.ts: remove dead ConfigTool and TungstenTool imports
3. readOnlyValidation.ts: remove orphaned ANT_ONLY_COMMAND_ALLOWLIST
4. insights.ts: remove entire remote collection plumbing (types,
   functions, options, display logic)
5. bridgeConfig.ts: ungate bridge override functions — return env vars
   directly instead of hardcoded undefined
@Flo5k5
Flo5k5 marked this pull request as ready for review April 12, 2026 20:31
Copilot AI review requested due to automatic review settings April 12, 2026 20:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR continues the cleanup of legacy process.env.USER_TYPE === 'ant' branches by removing ant-only/internal code paths from non-stubbed modules, reducing conditional complexity and dead code in commands, bridge tooling, and internal instrumentation.

Changes:

  • Removed ant-only CLI commands/tools and related gating logic (e.g. internal commands, REPL/SuggestBackgroundPR tooling hooks).
  • Deleted ant-only bridge debug infrastructure and various internal-only reporting/insights features.
  • Simplified several feature/enablement checks by removing USER_TYPE-based overrides.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/tools/BashTool/readOnlyValidation.ts Removes ant-only command allowlist merge for read-only validation.
src/tools.ts Removes ant-gated internal tools from the base tool registry (now stubbed to null).
src/ink/termio/osc.ts Replaces ant-only tab status support with a GrowthBook feature gate.
src/commands/version.ts Disables the internal-only /version command.
src/commands/thinkback-play/thinkback-play.ts Removes ant-only marketplace selection logic.
src/commands/tag/index.ts Disables the internal-only /tag command.
src/commands/insights.ts Removes ant-only remote host collection + internal feedback sections.
src/commands/initMode.ts Removes ant-only enablement for NEW_INIT; now env-var controlled.
src/commands/files/index.ts Disables the internal-only /files command.
src/commands/feedback/index.ts Removes ant-only hiding behavior for feedback commands.
src/commands/createMovedToPluginCommand.ts Removes ant-only “private marketplace” install instructions branch.
src/commands/cost/index.ts Removes ant-only visibility exception for /cost.
src/commands/cost/cost.ts Removes ant-only “show cost anyway” text path.
src/commands/context/context-noninteractive.ts Removes ant-only context reporting sections (system tools/prompt/message breakdown).
src/commands/commit.ts Removes ant-only undercover prompt prefix injection.
src/commands/commit-push-pr.ts Removes ant-only undercover prompt alterations (reviewer/changelog/slack steps).
src/commands/clear/conversation.ts Removes ant-only session-id env var update during conversation clear.
src/commands/clear/caches.ts Removes ant-only Tungsten usage tracking cleanup hook.
src/commands/bridge-kick.ts Disables the internal-only /bridge-kick command.
src/cli/update.ts Removes ant-only package name selection; always references @anthropic-ai/claude-code.
src/cli/print.ts Removes ant-only early-exit performance timing behavior.
src/bridge/sessionRunner.ts Removes ant-only implicit verbose logging behavior for bridge session logs.
src/bridge/replBridge.ts Removes ant-only fault injection/debug handles and SIGUSR2 reconnect hook.
src/bridge/initReplBridge.ts Removes ant-only Session-Ingress URL override selection logic.
src/bridge/bridgeUI.ts Removes ant-only “internal logs path” status output.
src/bridge/bridgeMain.ts Removes ant-only debug log path behavior and Session-Ingress URL override logic.
src/bridge/bridgeConfig.ts Makes bridge base URL/token overrides generally available (no longer ant-gated).
src/bootstrap/state.ts Removes ant-only slow-operation tracking by turning addSlowOperation into a no-op.
Comments suppressed due to low confidence (1)

src/tools/BashTool/readOnlyValidation.ts:1144

  • After removing the ant-only allowlist merge, the GH_READ_ONLY_COMMANDS import from readOnlyCommandValidation.js appears to be unused in this module. Please remove the now-unused import to avoid keeping dead validation maps in the bundle and to keep the allowlist source-of-truth clear.
function getCommandAllowlist(): Record<string, CommandConfig> {
  let allowlist: Record<string, CommandConfig> = COMMAND_ALLOWLIST
  // On Windows, xargs can be used as a data-to-code bridge: if a file contains
  // a UNC path, `cat file | xargs cat` feeds that path to cat, triggering SMB
  // resolution. Since the UNC path is in file contents (not the command string),

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/bridge/bridgeMain.ts
Comment thread src/bridge/bridgeMain.ts
Comment thread src/bridge/initReplBridge.ts
Comment thread src/bootstrap/state.ts
Comment thread src/tools.ts
Flo5k5 added a commit to Flo5k5/openclaude that referenced this pull request Apr 12, 2026
Remove 13 process.env.USER_TYPE === 'ant' gates that restricted useful
features to Anthropic employees. These features work without Anthropic
infrastructure and are now available to all open-build users.

Features opened:
- Agent nesting (sub-agents can spawn sub-agents)
- Effort 'max' persistence in settings
- Plan mode interview phase (controlled by feature flags)
- Sandbox disabled commands (via ~/.claude/feature-flags.json)
- All tips visible to all users (plan mode, feedback, shift-tab)

Simplified:
- Fullscreen defaults to off (use /config to enable)
- Explore agent always uses haiku model
- Plan mode tool uses conservative prompt for all users

Continues the USER_TYPE cleanup from Twigpine#637 (dead code) and builds
on Twigpine#639 (local feature flags).

@Vasanthdev2004 Vasanthdev2004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review: PR #637 — Remove dead USER_TYPE branches from non-stubbed modules

Reviewed on head 44e357d. CI green ✅. kevincodex1 approved. 28 files, +42/-715.

All 5 Copilot comments addressed in commit f37ccad:

  • ✅ supportsTabStatus() now uses GrowthBook tengu_terminal_sidebar instead of hardcoded false
  • ✅ getBridgeTokenOverride()/getBridgeBaseUrlOverride() ungated — return env vars directly without USER_TYPE check
  • ✅ Dead ConfigTool/TungstenTool imports removed from tools.ts
  • ✅ ANT_ONLY_COMMAND_ALLOWLIST and unused GH_READ_ONLY_COMMANDS import deleted from readOnlyValidation.ts — wait, GH_READ_ONLY_COMMANDS is still imported (line 18). See nits below.
  • ✅ Remote collection plumbing fully removed from insights.ts
  • ✅ sessionIngressUrl hardcoded to baseUrl — correct for open builds (production Envoy routes session-ingress; the separate port scenario was Anthropic-internal)
  • ✅ addSlowOperation() made no-op; dead code cleaned — see nits below
  • ✅ eslint-disable narrowed to @typescript-eslint/no-require-imports only — wait, still has combined disable. See nits below.

✅ Scope is correct

PR description accurately states what's removed and what's preserved. The preserved gates (agent nesting in tools.ts, effort overrides, sandbox config, computer use) are all still intact. All removed branches were genuinely ant-only dead code in the open build.

✅ No behavioral regressions

  • Bridge debug infrastructure (fault injection, SIGUSR2 handler, debug handles) — internal testing only, correctly removed
  • Internal CLI commands (/bridge-kick, /tag, /files, /version) — disabled, not deleted from disk, can be re-enabled if needed
  • addSlowOperation() → no-op, getSlowOperations() → always returns EMPTY_SLOW_OPERATIONS
  • Undercover instruction injection removed from commit/PR flows — correct
  • Internal marketplace routing in thinkback-play simplified to official marketplace only

🟡 Minor nits (non-blocking)

  1. GH_READ_ONLY_COMMANDS import still present in readOnlyValidation.ts line 18. It was only used by the deleted ANT_ONLY_COMMAND_ALLOWLIST. Now a dead import. Should be removed in a follow-up.

  2. MAX_SLOW_OPERATIONS still declared in state.ts line 1561 but never referenced (since addSlowOperation is a no-op). The getSlowOperations() implementation still has the full TTL-filtering logic and a stale comment about addSlowOperation() reassigns STATE.slowOperations, but it's effectively unreachable since nothing ever pushes to slowOperations. Should be cleaned up (remove MAX_SLOW_OPERATIONS, simplify getSlowOperations to just return EMPTY_SLOW_OPERATIONS).

  3. Combined eslint-disable on line 15 of tools.ts still includes custom-rules/no-process-env-top-level even though the block no longer reads process.env at the top level. Could be narrowed to just @typescript-eslint/no-require-imports. Very minor.

None of these affect correctness or behavior — just dead code tidy-up.


Verdict: Approve-ready ✅

Clean, well-scoped dead code removal. All Copilot concerns addressed. CI green. The three minor nits are non-blocking follow-up material.

Flo5k5 added a commit to Flo5k5/openclaude that referenced this pull request Apr 13, 2026
…pine#637, Twigpine#644)

Consolidates PRs Twigpine#637 and Twigpine#644:
- Remove ~45 dead USER_TYPE=ant guards across 28+ files (-1200 lines)
- Open 13 useful features to all users (agent nesting, effort persistence,
  plan mode interview, sandbox config, tips visibility)
- Key: src/constants/tools.ts — unlocks recursive agent spawning
kevincodex1 pushed a commit that referenced this pull request Apr 14, 2026
* feat: open useful USER_TYPE-gated features to all users

Remove 13 process.env.USER_TYPE === 'ant' gates that restricted useful
features to Anthropic employees. These features work without Anthropic
infrastructure and are now available to all open-build users.

Features opened:
- Agent nesting (sub-agents can spawn sub-agents)
- Effort 'max' persistence in settings
- Plan mode interview phase (controlled by feature flags)
- Sandbox disabled commands (via ~/.claude/feature-flags.json)
- All tips visible to all users (plan mode, feedback, shift-tab)

Simplified:
- Fullscreen defaults to off (use /config to enable)
- Explore agent always uses haiku model
- Plan mode tool uses conservative prompt for all users

Continues the USER_TYPE cleanup from #637 (dead code) and builds
on #639 (local feature flags).

* fix: address Copilot review comments — remove residual dead code

1. bridgeConfig.ts: ungate bridge override functions — return env vars
   directly instead of hardcoded undefined
2. bridgeMain.ts + initReplBridge.ts: ungate sessionIngressUrl — read
   CLAUDE_BRIDGE_SESSION_INGRESS_URL without USER_TYPE check
3. tools.ts: remove dead ConfigTool/TungstenTool imports, narrow
   eslint-disable scope, stub REPLTool/SuggestBackgroundPRTool to null
4. readOnlyValidation.ts: remove orphaned ANT_ONLY_COMMAND_ALLOWLIST
   and unused GH_READ_ONLY_COMMANDS import
5. insights.ts: remove entire remote collection plumbing (types,
   functions, options, display logic)
6. osc.ts: hardcode supportsTabStatus() to false (internal-only feature)
7. state.ts: simplify addSlowOperation/getSlowOperations to no-ops,
   remove dead constants

* fix: address Copilot review on PR #644

1. settings/types.ts: allow 'max' effort level for all users in Zod
   schema — was still gated behind USER_TYPE=ant, causing 'max' to be
   silently dropped on settings reload
2. shouldUseSandbox.ts: defensively normalize disabledCommands from
   feature flag config with Array.isArray() guards

* fix: address second round of Copilot review on PR #644

1. shouldUseSandbox.ts: validate top-level shape of disabledCommands
   before accessing properties (handles null/primitive from feature flag)
2. fullscreen.ts: update JSDoc to reflect removal of USER_TYPE default
3. osc.ts: update JSDoc — "Ant-only" → "Currently disabled"
@kevincodex1

Copy link
Copy Markdown
Member

hello @Flo5k5 kindly you rebase this to latest main and please fix conflicts.

@gnanam1990 gnanam1990 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I appreciate the cleanup goal here, but this branch still touches a surprisingly wide surface for what is framed as dead-code removal, including command paths, bridge/session behavior, state handling, and tool wiring. Because this is specifically removing USER_TYPE-guarded behavior, I’m not comfortable approving it from the current verification story alone. I’d want this either split into smaller clearly-auditable pieces or backed by much stronger targeted regression coverage across the affected external paths.

@Flo5k5

Flo5k5 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor Author

I appreciate the cleanup goal here, but this branch still touches a surprisingly wide surface for what is framed as dead-code removal, including command paths, bridge/session behavior, state handling, and tool wiring. Because this is specifically removing USER_TYPE-guarded behavior, I’m not comfortable approving it from the current verification story alone. I’d want this either split into smaller clearly-auditable pieces or backed by much stronger targeted regression coverage across the affected external paths.

Hey @gnanam1990 , which part is concerning for you ?

@gnanam1990 gnanam1990 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice cleanup. Appreciate the explicit call-out in the PR body about which USER_TYPE gates are preserved (agent nesting, effort overrides, sandbox, computer use) — that's the right framing. Two things worth a quick spot-check before merging: (1) addSlowOperation is now a no-op, so please confirm there are no readers of STATE.slowOperations expecting live data. (2) CLAUDE_BRIDGE_* dev overrides are now always-on rather than ant-gated — probably fine for a fork, but worth noting in the PR. LGTM.

C1ph3r404 pushed a commit to C1ph3r404/openclaude that referenced this pull request Apr 29, 2026
* feat: open useful USER_TYPE-gated features to all users

Remove 13 process.env.USER_TYPE === 'ant' gates that restricted useful
features to Anthropic employees. These features work without Anthropic
infrastructure and are now available to all open-build users.

Features opened:
- Agent nesting (sub-agents can spawn sub-agents)
- Effort 'max' persistence in settings
- Plan mode interview phase (controlled by feature flags)
- Sandbox disabled commands (via ~/.claude/feature-flags.json)
- All tips visible to all users (plan mode, feedback, shift-tab)

Simplified:
- Fullscreen defaults to off (use /config to enable)
- Explore agent always uses haiku model
- Plan mode tool uses conservative prompt for all users

Continues the USER_TYPE cleanup from Twigpine#637 (dead code) and builds
on Twigpine#639 (local feature flags).

* fix: address Copilot review comments — remove residual dead code

1. bridgeConfig.ts: ungate bridge override functions — return env vars
   directly instead of hardcoded undefined
2. bridgeMain.ts + initReplBridge.ts: ungate sessionIngressUrl — read
   CLAUDE_BRIDGE_SESSION_INGRESS_URL without USER_TYPE check
3. tools.ts: remove dead ConfigTool/TungstenTool imports, narrow
   eslint-disable scope, stub REPLTool/SuggestBackgroundPRTool to null
4. readOnlyValidation.ts: remove orphaned ANT_ONLY_COMMAND_ALLOWLIST
   and unused GH_READ_ONLY_COMMANDS import
5. insights.ts: remove entire remote collection plumbing (types,
   functions, options, display logic)
6. osc.ts: hardcode supportsTabStatus() to false (internal-only feature)
7. state.ts: simplify addSlowOperation/getSlowOperations to no-ops,
   remove dead constants

* fix: address Copilot review on PR Twigpine#644

1. settings/types.ts: allow 'max' effort level for all users in Zod
   schema — was still gated behind USER_TYPE=ant, causing 'max' to be
   silently dropped on settings reload
2. shouldUseSandbox.ts: defensively normalize disabledCommands from
   feature flag config with Array.isArray() guards

* fix: address second round of Copilot review on PR Twigpine#644

1. shouldUseSandbox.ts: validate top-level shape of disabledCommands
   before accessing properties (handles null/primitive from feature flag)
2. fullscreen.ts: update JSDoc to reflect removal of USER_TYPE default
3. osc.ts: update JSDoc — "Ant-only" → "Currently disabled"

@jatmn jatmn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Findings

  • [P1] Remove the stale bridge debug assignment
    src/bridge/replBridge.ts:1301
    This PR removes the debugFireClose declaration with the ant-only bridge debug handle, but wireTransport still assigns debugFireClose = handleTransportPermanentClose before registering the close handler. Because this module runs in ESM/strict mode, assigning to that undeclared identifier throws a ReferenceError as soon as a bridge transport is wired, so Remote Control/REPL bridge sessions can fail before the close handler is installed. Please remove this assignment and the stale debug comment along with the deleted debug plumbing, or keep an explicitly declared local if a remaining path still needs it.

The-FOOL-00 pushed a commit to The-FOOL-00/openclaude that referenced this pull request May 24, 2026
* feat: open useful USER_TYPE-gated features to all users

Remove 13 process.env.USER_TYPE === 'ant' gates that restricted useful
features to Anthropic employees. These features work without Anthropic
infrastructure and are now available to all open-build users.

Features opened:
- Agent nesting (sub-agents can spawn sub-agents)
- Effort 'max' persistence in settings
- Plan mode interview phase (controlled by feature flags)
- Sandbox disabled commands (via ~/.claude/feature-flags.json)
- All tips visible to all users (plan mode, feedback, shift-tab)

Simplified:
- Fullscreen defaults to off (use /config to enable)
- Explore agent always uses haiku model
- Plan mode tool uses conservative prompt for all users

Continues the USER_TYPE cleanup from Twigpine#637 (dead code) and builds
on Twigpine#639 (local feature flags).

* fix: address Copilot review comments — remove residual dead code

1. bridgeConfig.ts: ungate bridge override functions — return env vars
   directly instead of hardcoded undefined
2. bridgeMain.ts + initReplBridge.ts: ungate sessionIngressUrl — read
   CLAUDE_BRIDGE_SESSION_INGRESS_URL without USER_TYPE check
3. tools.ts: remove dead ConfigTool/TungstenTool imports, narrow
   eslint-disable scope, stub REPLTool/SuggestBackgroundPRTool to null
4. readOnlyValidation.ts: remove orphaned ANT_ONLY_COMMAND_ALLOWLIST
   and unused GH_READ_ONLY_COMMANDS import
5. insights.ts: remove entire remote collection plumbing (types,
   functions, options, display logic)
6. osc.ts: hardcode supportsTabStatus() to false (internal-only feature)
7. state.ts: simplify addSlowOperation/getSlowOperations to no-ops,
   remove dead constants

* fix: address Copilot review on PR Twigpine#644

1. settings/types.ts: allow 'max' effort level for all users in Zod
   schema — was still gated behind USER_TYPE=ant, causing 'max' to be
   silently dropped on settings reload
2. shouldUseSandbox.ts: defensively normalize disabledCommands from
   feature flag config with Array.isArray() guards

* fix: address second round of Copilot review on PR Twigpine#644

1. shouldUseSandbox.ts: validate top-level shape of disabledCommands
   before accessing properties (handles null/primitive from feature flag)
2. fullscreen.ts: update JSDoc to reflect removal of USER_TYPE default
3. osc.ts: update JSDoc — "Ant-only" → "Currently disabled"
discopops pushed a commit to discopops/openclaude that referenced this pull request May 28, 2026
* feat: open useful USER_TYPE-gated features to all users

Remove 13 process.env.USER_TYPE === 'ant' gates that restricted useful
features to Anthropic employees. These features work without Anthropic
infrastructure and are now available to all open-build users.

Features opened:
- Agent nesting (sub-agents can spawn sub-agents)
- Effort 'max' persistence in settings
- Plan mode interview phase (controlled by feature flags)
- Sandbox disabled commands (via ~/.claude/feature-flags.json)
- All tips visible to all users (plan mode, feedback, shift-tab)

Simplified:
- Fullscreen defaults to off (use /config to enable)
- Explore agent always uses haiku model
- Plan mode tool uses conservative prompt for all users

Continues the USER_TYPE cleanup from Twigpine#637 (dead code) and builds
on Twigpine#639 (local feature flags).

* fix: address Copilot review comments — remove residual dead code

1. bridgeConfig.ts: ungate bridge override functions — return env vars
   directly instead of hardcoded undefined
2. bridgeMain.ts + initReplBridge.ts: ungate sessionIngressUrl — read
   CLAUDE_BRIDGE_SESSION_INGRESS_URL without USER_TYPE check
3. tools.ts: remove dead ConfigTool/TungstenTool imports, narrow
   eslint-disable scope, stub REPLTool/SuggestBackgroundPRTool to null
4. readOnlyValidation.ts: remove orphaned ANT_ONLY_COMMAND_ALLOWLIST
   and unused GH_READ_ONLY_COMMANDS import
5. insights.ts: remove entire remote collection plumbing (types,
   functions, options, display logic)
6. osc.ts: hardcode supportsTabStatus() to false (internal-only feature)
7. state.ts: simplify addSlowOperation/getSlowOperations to no-ops,
   remove dead constants

* fix: address Copilot review on PR Twigpine#644

1. settings/types.ts: allow 'max' effort level for all users in Zod
   schema — was still gated behind USER_TYPE=ant, causing 'max' to be
   silently dropped on settings reload
2. shouldUseSandbox.ts: defensively normalize disabledCommands from
   feature flag config with Array.isArray() guards

* fix: address second round of Copilot review on PR Twigpine#644

1. shouldUseSandbox.ts: validate top-level shape of disabledCommands
   before accessing properties (handles null/primitive from feature flag)
2. fullscreen.ts: update JSDoc to reflect removal of USER_TYPE default
3. osc.ts: update JSDoc — "Ant-only" → "Currently disabled"
@jatmn

jatmn commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Closing as abandoned

@jatmn jatmn closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants