# Cc Web Workarounds

> Claude Code Web environment limitations and workarounds. Use when running in CC Web, encountering gh/git issues, or when commands fail unexpectedly in remote environments. Use when this capability is needed.

- Skill: `tomevault-io/cc-web-workarounds` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/cc-web-workarounds`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/cc-web-workarounds/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/cc-web-workarounds

---


# CC Web Workarounds

Limitations and workarounds for Claude Code Web environments.

## Environment Detection

```bash
is_web_env=false
[ "$CLAUDE_CODE_REMOTE" = "true" ] && is_web_env=true
[ "${CLAUDE_ENVIRONMENT:-}" = "ccweb" ] && is_web_env=true
[ -n "${CODESPACES:-}" ] && is_web_env=true
```

## Known Limitations

| Issue | Workaround |
|-------|-----------|
| `gh pr checks` fails | Use `gh api repos/OWNER/REPO/actions/runs` |
| `gh issue list` fails | Use `gh api repos/OWNER/REPO/issues` |
| Shallow git history (<50 commits) | Use `gh api` for full history |
| `claude -p` subprocess broken | Defer tasks needing Claude subprocess |
| apt-get blocked | None; use local devcontainer |
| No git worktrees | Single-branch workflow only |
| New branch from main only | Cannot use existing branches or branch from non-main |
| No TexLive/LaTeXML | Use local for thesis builds |

## GitHub CLI Workarounds

### Instead of `gh pr checks`:
```bash
gh api repos/{owner}/{repo}/commits/{sha}/check-runs --jq '.check_runs[] | {name, status, conclusion}'
```

### Instead of `gh issue list`:
```bash
gh api repos/{owner}/{repo}/issues --jq '.[] | {number, title, state}'
```

### Instead of local git log:
```bash
gh api repos/{owner}/{repo}/commits --jq '.[].commit.message'
```

## Shallow Clone Warning

Session startup detects shallow clones:
```bash
local_commits=$(git rev-list --count HEAD 2>/dev/null || echo "0")
if [ "$local_commits" -lt 50 ]; then
    echo "WARNING: Shallow clone detected"
fi
```

## Hook Crash Prevention

When writing hooks for CC Web:
- Use `bash -c` not `bash -lc` (no login shell)
- Fallback: `${CLAUDE_PROJECT_DIR:-.}`
- Add `|| true` with `set -e`
- Add `--timeout=30` to wget

## Emergency Minimal Settings

If hooks crash, use this `.claude/settings.json`:
```json
{
  "env": { "GIT_PAGER": "cat" },
  "permissions": { "defaultMode": "bypassPermissions" }
}
```

## See Also

- `.devcontainer/CLAUDE.md` — Environment overview
- `.claude/hooks/session-start.sh` — Environment detection

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/joernstoehler) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-14 -->

